]> icculus.org git repositories - divverent/nexuiz.git/blob - data/qcsrc/server/merge-entities-def.pl
fix misnamed trigger_hurt_touch (spawnfunc rename)
[divverent/nexuiz.git] / data / qcsrc / server / merge-entities-def.pl
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 my %spawnfuncs;
7 my %entitiesdef;
8
9 -f "qc.asm"
10         or (system 'fteqcc -Fwasm'
11                 and die "fteqcc died");
12 open my $fh, '<', 'qc.asm'
13         or die "qc.asm: $!";
14 while(<$fh>)
15 {
16         chomp;
17         /^void \(\) spawnfunc_(.*);$/
18                 and $spawnfuncs{$1} = 1;
19 }
20 close $fh;
21
22 open $fh, '+<', '../../entities.def'
23         or die "entities.def: $!";
24 my $s = do { undef local $/; <$fh>; };
25 while($s =~ s/\n\/\*QUAKED (\S+) (.*?)\*\//\n/s)
26 {
27         $entitiesdef{$1} = $2;
28 }
29
30 use Data::Dumper;
31 print Dumper \%entitiesdef;
32
33 I KNOW THIS WON'T COMPILE, I WILL FINISH IT LATER
34 example description
35 "(0 .5 0) (-8 -8 -8) (8 8 8)
36 Aiming target for entities like light, misc_portal_camera and trigger_push (jump pads) in particular.
37 -------- KEYS --------
38 targetname : the entity that requires an aiming direction points to this.
39 notfree : when set to 1, entity will not spawn in "Free for all" and "Tournament" modes.
40 notteam : when set to 1, entity will not spawn in "Teamplay" and "CTF" modes.
41 notsingle : when set to 1, entity will not spawn in Single Player mode (bot play mode).
42 -------- NOTES --------
43 To make a jump pad, place this entity at the highest point of the jump and target it with a trigger_push entity."