replaces atom.initialized with ATOM_INITIALIZED

refactors atom/var/flags to atom_flags and area_flags
moves NOBLOODY, NOBLUDGEON, and PHORONGUARD to item_flags instead of atom_flags
corrects various misapplied flags
This commit is contained in:
spookerton
2022-10-17 15:23:31 +01:00
parent 650ee09942
commit 3abdbbaa1c
150 changed files with 414 additions and 431 deletions
+2 -2
View File
@@ -135,7 +135,7 @@
var/impact_effect_type = null
var/list/impacted_mobs = list()
// TGMC Ammo HUD Port
var/hud_state = "unknown" // What HUD state we use when we have ammunition.
var/hud_state_empty = "unknown" // The empty state. DON'T USE _FLASH IN THE NAME OF THE EMPTY STATE STRING, THAT IS ADDED BY THE CODE.
@@ -636,7 +636,7 @@
return 1
/obj/item/projectile/proc/check_fire(atom/target as mob, mob/living/user as mob) //Checks if you can hit them or not.
check_trajectory(target, user, pass_flags, flags)
check_trajectory(target, user, pass_flags, atom_flags)
/obj/item/projectile/CanPass()
return TRUE
+3 -3
View File
@@ -1,6 +1,6 @@
// Helper proc to check if you can hit them or not.
// Will return a list of hit mobs/objects.
/proc/check_trajectory(atom/target as mob|obj, atom/firer as mob|obj, var/pass_flags=PASSTABLE|PASSGLASS|PASSGRILLE, flags=null)
/proc/check_trajectory(atom/target as mob|obj, atom/firer as mob|obj, var/pass_flags=PASSTABLE|PASSGLASS|PASSGRILLE, flags=0)
if(!istype(target) || !istype(firer))
return 0
@@ -8,13 +8,13 @@
//Set the flags and pass flags to that of the real projectile...
if(!isnull(flags))
trace.flags = flags
trace.atom_flags = flags
trace.pass_flags = pass_flags
return trace.launch_projectile(target) //Test it!
/obj/item/projectile/proc/_check_fire(atom/target as mob, var/mob/living/user as mob) //Checks if you can hit them or not.
check_trajectory(target, user, pass_flags, flags)
check_trajectory(target, user, pass_flags, atom_flags)
//"Tracing" projectile
/obj/item/projectile/test //Used to see if you can hit them.