Split up and rename var/flags (#17794)

* Split up and rename `var/flags`

* Various fixes

* CL

* Don't rename Phoron Guard phoron preset

---------

Co-authored-by: Cody Brittain <cbrittain10@live.com>
This commit is contained in:
Cody Brittain
2023-11-22 11:27:51 -05:00
committed by GitHub
parent 4b9303a1e9
commit 06601c9ec3
335 changed files with 763 additions and 674 deletions

View File

@@ -4,7 +4,7 @@
icon = 'icons/obj/ammo.dmi'
icon_state = "s-casing"
randpixel = 10
flags = CONDUCT
obj_flags = OBJ_FLAG_CONDUCTABLE
slot_flags = SLOT_BELT | SLOT_EARS
throwforce = 1
w_class = ITEMSIZE_TINY
@@ -94,7 +94,7 @@
desc = "A magazine for some kind of gun."
icon_state = "357"
icon = 'icons/obj/ammo.dmi'
flags = CONDUCT
obj_flags = OBJ_FLAG_CONDUCTABLE
slot_flags = SLOT_BELT
item_state = "box"
matter = list(DEFAULT_WALL_MATERIAL = 500)

View File

@@ -50,7 +50,7 @@
icon_state = "pistol"
item_state = "pistol"
contained_sprite = TRUE
flags = CONDUCT
obj_flags = OBJ_FLAG_CONDUCTABLE
slot_flags = SLOT_BELT|SLOT_HOLSTER
matter = list(DEFAULT_WALL_MATERIAL = 2000)
w_class = ITEMSIZE_NORMAL

View File

@@ -212,7 +212,7 @@
w_class = ITEMSIZE_LARGE
accuracy = 1
force = 10
flags = CONDUCT
obj_flags = OBJ_FLAG_CONDUCTABLE
slot_flags = SLOT_BACK
charge_cost = 300
max_shots = 4

View File

@@ -320,7 +320,7 @@
edge = TRUE
anchored = 0
armor_penetration = 40
flags = NOBLOODY
atom_flags = ATOM_FLAG_NO_BLOOD
can_embed = 0
self_recharge = 1
recharge_time = 2

View File

@@ -5,7 +5,7 @@
switching to HARM intent, then click where you wish to fire. To reload it, insert the appropriate items. Some weapons may require additional drawing of the string or charging, \
which can typically be done with the Unique-Action macro or button located in the bottom right of the screen."
w_class = ITEMSIZE_HUGE
flags = CONDUCT
obj_flags = OBJ_FLAG_CONDUCTABLE
slot_flags = SLOT_BACK
var/release_force = 0

View File

@@ -6,7 +6,7 @@
item_state = "pneumatic"
slot_flags = SLOT_BELT
w_class = ITEMSIZE_HUGE
flags = CONDUCT
obj_flags = OBJ_FLAG_CONDUCTABLE
fire_sound_text = "a loud whoosh of moving air"
fire_delay = 50
fire_sound = 'sound/weapons/tablehit1.ogg'

View File

@@ -8,7 +8,7 @@
throw_speed = 2
throw_range = 10
force = 5.0
flags = CONDUCT
obj_flags = OBJ_FLAG_CONDUCTABLE
slot_flags = 0
origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 5)
fire_sound = 'sound/weapons/rocketlaunch.ogg'

View File

@@ -5,7 +5,7 @@
icon_state = "syringe-cartridge"
var/icon_flight = "syringe-cartridge-flight" //so it doesn't look so weird when shot
matter = list(DEFAULT_WALL_MATERIAL = 125, MATERIAL_GLASS = 375)
flags = CONDUCT
obj_flags = OBJ_FLAG_CONDUCTABLE
slot_flags = SLOT_BELT | SLOT_EARS
throwforce = 3
force = 3

View File

@@ -51,7 +51,7 @@
max_shells = 4
w_class = ITEMSIZE_LARGE
force = 10
flags = CONDUCT
obj_flags = OBJ_FLAG_CONDUCTABLE
slot_flags = SLOT_BACK
caliber = "shotgun"
origin_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 2)
@@ -140,7 +140,7 @@
max_shells = 2
w_class = ITEMSIZE_LARGE
force = 10
flags = CONDUCT
obj_flags = OBJ_FLAG_CONDUCTABLE
is_wieldable = TRUE
var/has_wield_state = TRUE
slot_flags = SLOT_BACK

View File

@@ -12,7 +12,7 @@ Firing pins as a rule can't be removed without replacing them, blame a really sh
icon_state = "firing_pin"
item_state = "pen"
origin_tech = list(TECH_MATERIAL = 2, TECH_COMBAT = 2)
flags = CONDUCT
obj_flags = OBJ_FLAG_CONDUCTABLE
w_class = ITEMSIZE_TINY
attack_verb = list("poked")
var/emagged = FALSE
@@ -100,7 +100,7 @@ Pins Below.
/obj/item/device/firing_pin/test_range/pin_auth(mob/living/user)
var/area/A = get_area(src)
if (A && (A.flags & FIRING_RANGE))
if (A && (A.area_flags & AREA_FLAG_FIRING_RANGE))
return 1
else
return 0

View File

@@ -1,19 +1,21 @@
//Helper proc to check if you can hit them or not.
/proc/check_trajectory(atom/target as mob|obj, atom/firer as mob|obj, var/pass_flags=PASSTABLE|PASSGLASS|PASSGRILLE|PASSRAILING, flags=null)
/proc/check_trajectory(atom/target as mob|obj, atom/firer as mob|obj, pass_flags=PASSTABLE|PASSGLASS|PASSGRILLE|PASSRAILING, obj_flags=null, item_flags=null)
if(!istype(target) || !istype(firer))
return 0
var/obj/item/projectile/test/trace = new /obj/item/projectile/test(get_turf(firer)) //Making the test....
//Set the flags and pass flags to that of the real projectile...
if(!isnull(flags))
trace.flags = flags
if(!isnull(obj_flags))
trace.obj_flags = obj_flags
if(!isnull(item_flags))
trace.item_flags = item_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)
/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, obj_flags, item_flags)
//"Tracing" projectile
/obj/item/projectile/test //Used to see if you can hit them.