super-coop/tools/fixsrcnames.fish

198 lines
5.6 KiB
Fish

#!/usr/bin/env fish
set reps \
WriteByte write_byte \
WriteChar write_char \
WriteShort write_short \
WriteLong write_long \
WriteCoord write_coord \
WriteAngle write_angle \
WriteString write_string \
WriteEntity write_entity \
makevectors make_vectors \
setorigin set_origin \
setmodel set_model \
setsize set_size \
objerror error_obj \
vlen vec_len \
vectoyaw vec_yaw \
traceline trace_line \
checkclient check_client \
stuffcmd cmd_client \
localcmd cmd_server \
findradius find_radius \
sprint print_cl \
bprint print_all \
dprint print_dbg \
coredump core_dump \
traceon trace_on \
traceoff trace_off \
eprint print_ent \
walkmove walk_move \
droptofloor drop_to_floor \
lightstyle light_style \
checkbottom check_bottom \
pointcontents point_contents \
nextent next_ent \
ChangeYaw change_yaw \
vectoangles vec_to_angles \
movetogoal move_to_goal \
makestatic make_static \
centerprint print_center \
ambientsound ambient_sound \
setspawnparms set_spawn_parms \
infoadd info_add \
infoget info_get \
SUB_AttackFinished sub_attack_finished \
SUB_CalcMove sub_calc_move \
SUB_CalcMoveEnt sub_calc_move_ent \
SUB_CalcMoveDone sub_calc_move_done \
SUB_CalcAngleMove sub_calc_angle_move \
SUB_CalcAngleMoveDone sub_calc_angle_move_done \
SUB_CheckRefire sub_check_refire \
SUB_Null sub_null \
SUB_PainNull sub_pain_null \
SUB_UseTargets sub_use_targets \
SUB_Remove sub_remove \
T_Heal ent_heal \
CanHeal can_heal \
CanDamage ent_can_damage \
T_Damage ent_damage \
T_RadiusDamage ent_radius_damage \
T_MissileTouch ent_missile_touch \
Key1Name key_1_name \
Key2Name key_2_name \
Demon_Melee demon_melee \
Demon_JumpTouch demon_jump_touch \
DemonCheckAttack demon_check_attack \
DogCheckAttack dog_check_attack \
ShalHome shalrath_home \
ShalMissile shalrath_missile \
ShalMissileTouch shalrath_missile_touch \
ClientObituary client_obituary \
DeathBubbles death_bubbles \
ChooseTurn choose_turn \
LaunchLaser launch_laser \
SpawnBlood spawn_blood \
BecomeExplosion become_explosion \
SameTeam is_same_team \
DecodeLevelParms decode_level_parms \
CopyToBodyQue copy_to_body_queue \
InitBodyQue init_body_queue \
SuperDamageSound super_damage_sound \
W_ChangeWeapon wep_change_weapon \
W_CycleWeaponReverse wep_cycle_weapon_reverse \
W_CycleWeapon wep_cycle_weapon \
W_FireAxe wep_fire_axe \
W_FireShotgun wep_fire_shotgun \
W_FireSuperShotgun wep_fire_super_shotgun \
W_FireRocket wep_fire_rocket \
W_FireLightning wep_fire_lightning \
W_FireGrenade wep_fire_grenade \
W_FireSpikes wep_fire_nail \
W_FireSuperSpikes wep_fire_super_nail \
W_BestWeapon wep_best_weapon \
W_SetCurrentAmmo wep_set_current_ammo \
W_WeaponFrame wep_weapon_frame \
WizardCheckAttack wiz_check_attack \
PlayerDie player_die \
ImpulseCommands impulse_commands \
anglemod angle_mod \
HuntTarget hunt_target \
SightSound sight_sound \
FoundTarget found_target \
FindTarget find_target \
FacingIdeal facing_ideal \
CheckAnyAttack check_any_attack \
FindIntermission find_intermission \
GotoNextMap go_to_next_map \
ExitIntermission intermission_exit \
IntermissionThink intermission_think \
CheckSpawnPoint check_spawn_point \
SelectSpawnPoint select_spawn_point \
NextLevel next_level \
CheckRules check_rules \
PlayerDeathThink player_death_think \
PlayerJump player_jump \
WaterMove water_move \
CheckWaterJump check_water_jump \
CheckPowerups check_powerups \
BothPlayers are_both_players \
Killed killed \
T_BeamDamage beam_damage \
Demon_MeleeAttack demon_melee_attack \
CheckDemonMelee demon_check_melee \
CheckDemonJump demon_check_jump \
Dog_JumpTouch dog_jump_touch \
CheckDogMelee dog_check_melee \
CheckDogJump dog_check_jump \
EntitiesTouching entities_touching \
LinkDoors link_doors \
Laser_Touch laser_touch \
CheckAttack check_attack \
SoldierCheckAttack army_check_attack \
ShamCheckAttack sham_check_attack \
OgreCheckAttack ogre_check_attack \
CheckForCharge check_for_charge \
CheckContinueCharge check_continue_charge \
SUB_regen sub_regen \
PlaceItem place_item \
StartItem start_item \
RankForWeapon wep_rank_for_weapon \
Deathmatch_Weapon wep_deathmatch_weapon \
BackpackTouch backpack_touch \
DropBackpack drop_backpack \
FireAmbient fire_ambient \
OgreGrenadeExplode ogre_grenade_explode \
OgreGrenadeTouch ogre_grenade_touch \
OgreFireGrenade ogre_fire_grenade \
PainSound player_pain_sound \
DeathBubblesSpawn player_death_bubbles_spawn \
DeathSound player_death_sound \
PlayerDead player_dead \
VelocityForDamage player_velocity_for_damage \
ThrowGib throw_gib \
ThrowHead throw_head \
GibPlayer player_gib \
ShamClaw sham_claw \
CastLightning sham_cast_lightning \
SetMovedir set_move_dir \
InitTrigger init_trigger \
DelayThink delay_think \
Tar_JumpTouch tbaby_jump_touch \
W_Precache wep_precache \
SpawnMeatSpray spawn_meat_spray \
SpawnChunk spawn_chunk \
ClearMultiDamage multi_damage_clear \
ApplyMultiDamage multi_damage_apply \
AddMultiDamage multi_damage_add \
TraceAttack trace_attack \
FireBullets fire_bullets \
LightningDamage lightning_damage \
GrenadeExplode grenade_explode \
GrenadeTouch grenade_touch \
W_Attack wep_attack \
LaunchMissile launch_missile \
WizardAttackFinished wiz_attack_finished \
Wiz_FastFire wiz_fast_fire \
Wiz_StartFast wiz_start_fast \
Wiz_idlesound wiz_idle_sound \
Wiz_Pain wiz_pain \
Wiz_Missile wiz_missile \
ZombieGrenadeTouch zombie_grenade_touch \
ZombieFireGrenade zombie_fire_grenade \
set srcs (find source -type f)
for i in (seq 2 2 (count $reps))
set i2 (math -s0 $i - 1)
set from $reps[$i2]
set to $reps[$i]
echo $i2.$from = $i.$to
for f in $srcs
sed -i -e "s/\b$from\b/$to/g" "$f"
end
end
## EOF