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-18 09:36:36 +01:00
parent 650ee09942
commit 3abdbbaa1c
150 changed files with 414 additions and 431 deletions
+2 -2
View File
@@ -13,7 +13,7 @@
/obj/item/reagent_containers/glass/beaker/vial/random
flags = 0
atom_flags = 0
var/list/random_reagent_list = list(list("water" = 15) = 1, list("cleaner" = 15) = 1)
@@ -28,7 +28,7 @@
/obj/item/reagent_containers/glass/beaker/vial/random/Initialize()
. = ..()
if(is_open_container())
flags ^= OPENCONTAINER
atom_flags ^= OPENCONTAINER
var/list/picked_reagents = pickweight(random_reagent_list)
for(var/reagent in picked_reagents)
reagents.add_reagent(reagent, picked_reagents[reagent])
+2 -2
View File
@@ -105,7 +105,7 @@
plane = TURF_PLANE
layer = ABOVE_TURF_LAYER
w_class = ITEMSIZE_LARGE
flags = NOBLOODY
item_flags = NOBLOODY
var/circuit = /obj/item/circuitboard/geiger
var/number = 0
var/last_tick //used to delay the powercheck
@@ -170,4 +170,4 @@
/obj/item/geiger/wall/west
pixel_x = -28
dir = WEST
dir = WEST
@@ -6,7 +6,7 @@
anchored = 1
w_class = ITEMSIZE_LARGE
canhear_range = 2
flags = NOBLOODY
item_flags = NOBLOODY
var/circuit = /obj/item/circuitboard/intercom
var/number = 0
var/wiresexposed = 0
@@ -195,4 +195,4 @@
/obj/item/radio/intercom/locked/confessional
name = "confessional intercom"
frequency = 1480
frequency = 1480
+2 -2
View File
@@ -381,7 +381,7 @@ HALOGEN COUNTER - Radcount on mobs
drop_sound = 'sound/items/drop/device.ogg'
icon_state = "spectrometer"
w_class = ITEMSIZE_SMALL
flags = OPENCONTAINER
atom_flags = OPENCONTAINER
slot_flags = SLOT_BELT
throwforce = 5
throw_speed = 4
@@ -463,7 +463,7 @@ HALOGEN COUNTER - Radcount on mobs
return
if(!isnull(O.reagents))
if(!(O.flags & OPENCONTAINER)) // The idea is that the scanner has to touch the reagents somehow. This is done to prevent cheesing unidentified autoinjectors.
if(!(O.atom_flags & OPENCONTAINER)) // The idea is that the scanner has to touch the reagents somehow. This is done to prevent cheesing unidentified autoinjectors.
to_chat(user, span("warning", "\The [O] is sealed, and cannot be scanned by \the [src] until unsealed."))
return
+1 -1
View File
@@ -11,7 +11,7 @@
icon_state = "jar"
w_class = ITEMSIZE_SMALL
matter = list("glass" = 200)
flags = NOBLUDGEON
item_flags = NOBLUDGEON
var/list/accept_mobs = list(/mob/living/simple_mob/animal/passive/lizard, /mob/living/simple_mob/animal/passive/mouse, /mob/living/simple_mob/animal/sif/leech, /mob/living/simple_mob/animal/sif/frostfly, /mob/living/simple_mob/animal/sif/glitterfly)
var/contains = 0 // 0 = nothing, 1 = money, 2 = animal, 3 = spiderling
drop_sound = 'sound/items/drop/glass.ogg'
@@ -36,7 +36,7 @@
throwforce = 1.0
throw_speed = 5
throw_range = 20
flags = 0
atom_flags = 0
origin_tech = list(TECH_BIO = 1)
no_variants = FALSE
drop_sound = 'sound/items/drop/herb.ogg'
@@ -64,7 +64,7 @@
throwforce = 1.0
throw_speed = 5
throw_range = 20
flags = 0
atom_flags = 0
no_variants = FALSE
drop_sound = 'sound/items/drop/wooden.ogg'
pickup_sound = 'sound/items/pickup/wooden.ogg'
@@ -112,7 +112,7 @@
throwforce = 1.0
throw_speed = 5
throw_range = 20
flags = 0
atom_flags = 0
no_variants = FALSE
drop_sound = 'sound/items/drop/cloth.ogg'
pickup_sound = 'sound/items/pickup/cloth.ogg'
@@ -244,7 +244,7 @@
throwforce = 1.0
throw_speed = 5
throw_range = 20
flags = 0
atom_flags = 0
no_variants = FALSE
/obj/item/stack/tile/wmarble
@@ -256,7 +256,7 @@
throwforce = 15.0
throw_speed = 5
throw_range = 20
flags = 0
atom_flags = 0
no_variants = FALSE
/obj/item/stack/tile/bmarble
@@ -268,7 +268,7 @@
throwforce = 15.0
throw_speed = 5
throw_range = 20
flags = 0
atom_flags = 0
no_variants = FALSE
/obj/item/stack/tile/roofing
@@ -283,4 +283,4 @@
uses_charge = 1
charge_costs = list(250)
stacktype = /obj/item/stack/tile/roofing
build_type = /obj/item/stack/tile/roofing
build_type = /obj/item/stack/tile/roofing
+1 -1
View File
@@ -7,7 +7,7 @@
item_state = "rcd"
drop_sound = 'sound/items/drop/gun.ogg'
pickup_sound = 'sound/items/pickup/gun.ogg'
flags = NOBLUDGEON
item_flags = NOBLUDGEON
force = 10
throwforce = 10
throw_speed = 1
+4 -4
View File
@@ -16,8 +16,8 @@
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand.dmi',
slot_r_hand_str = 'icons/mob/items/righthand.dmi',
)
flags = NOBLUDGEON
)
item_flags = NOBLUDGEON
force = 10
throwforce = 10
throw_speed = 1
@@ -183,7 +183,7 @@
activate()
animate_deletion(A)
return
if((mode & PAINT_MODE)) //Paint pipes
if(istype(A, /obj/machinery/atmospherics/pipe))
var/obj/machinery/atmospherics/pipe/P = A
@@ -291,4 +291,4 @@
#undef BUILD_MODE
#undef WRENCH_MODE
#undef DESTROY_MODE
#undef PAINT_MODE
#undef PAINT_MODE
+2 -2
View File
@@ -27,7 +27,7 @@
/obj/item/clothing/mask/chewable/Initialize()
. = ..()
flags |= NOREACT // so it doesn't react until you light it
atom_flags |= NOREACT // so it doesn't react until you light it
create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 15
for(var/R in filling)
reagents.add_reagent(R, filling[R])
@@ -262,4 +262,4 @@
if(chewtime < 1)
if(ismob(loc))
to_chat(loc, SPAN_NOTICE("There's no more of \the [name] left!"))
spitout(0)
spitout(0)
@@ -105,7 +105,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/smokable/Initialize()
. = ..()
flags |= NOREACT // so it doesn't react until you light it
atom_flags |= NOREACT // so it doesn't react until you light it
create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 15
if(smoketime && !max_smoketime)
max_smoketime = smoketime
@@ -118,7 +118,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(ishuman(loc))
var/mob/living/carbon/human/C = loc
if (src == C.wear_mask && C.check_has_mouth()) // if it's in the human/monkey mouth, transfer reagents to the mob
reagents.trans_to_mob(C, amount, CHEM_INGEST, 1.5) // I don't predict significant balance issues by letting blunts actually WORK.
reagents.trans_to_mob(C, amount, CHEM_INGEST, 1.5) // I don't predict significant balance issues by letting blunts actually WORK.
else // else just remove some of the reagents
reagents.remove_any(REM)
@@ -183,7 +183,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
e.start()
qdel(src)
return
flags &= ~NOREACT // allowing reagents to react after being lit
atom_flags &= ~NOREACT // allowing reagents to react after being lit
reagents.handle_reactions()
var/turf/T = get_turf(src)
T.visible_message(flavor_text)
@@ -705,4 +705,4 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/flame/lighter/zippo/rainbow
name = "\improper rainbow Zippo lighter"
icon_state = "rainbowzippo"
icon_state = "rainbowzippo"
+1 -1
View File
@@ -153,7 +153,7 @@
icon_state = "ecartridge"
matter = list("metal" = 50, "glass" = 10)
volume = 20
flags = OPENCONTAINER
atom_flags = OPENCONTAINER
/obj/item/reagent_containers/ecig_cartridge/Initialize()
. = ..()
@@ -5,7 +5,7 @@
icon = 'icons/obj/assemblies.dmi'
icon_state = "plastic-explosive0"
item_state = "plasticx"
flags = NOBLUDGEON
item_flags = NOBLUDGEON
w_class = ITEMSIZE_SMALL
origin_tech = list(TECH_ILLEGAL = 2)
var/datum/wires/explosive/c4/wires = null
@@ -81,7 +81,7 @@
target = get_atom_on_turf(src)
if(!target)
target = src
var/turf/T = get_turf(target)
if (!T && length(location))
T = locate(location[1], location[2], location[3])
@@ -126,4 +126,4 @@
blast_flash = blast_light + round(new_blast_power * 0.75)
else
to_chat(user, "<span class='notice'>The [I] is not any better than the component already installed into this charge!</span>")
return .
return .
@@ -44,7 +44,7 @@
matter[material_type] *= force_divisor // May require a new var instead.
if(!(material.conductive))
src.flags |= NOCONDUCT
atom_flags |= NOCONDUCT
/obj/item/material/get_material()
return material
@@ -7,7 +7,8 @@
sharp = 0
edge = 0
armor_penetration = 50
flags = NOCONDUCT | NOBLOODY
atom_flags = NOCONDUCT
item_flags = NOBLOODY
var/lrange = 2
var/lpower = 2
var/lcolor = "#0099FF"
@@ -267,7 +268,7 @@
throw_speed = 1
throw_range = 5
w_class = ITEMSIZE_SMALL
flags = NOBLOODY
item_flags = NOBLOODY
origin_tech = list(TECH_MAGNET = 3, TECH_ILLEGAL = 4)
sharp = 1
edge = 1
@@ -354,7 +355,7 @@
sharp = 1
edge = 1
armor_penetration = 0
flags = NOBLOODY
item_flags = NOBLOODY
lrange = 2
lpower = 2
lcolor = "#0000FF"
@@ -427,7 +428,7 @@
throw_speed = 1
throw_range = 1
w_class = ITEMSIZE_LARGE//So you can't hide it in your pocket or some such.
flags = NOBLOODY
item_flags = NOBLOODY
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
var/mob/living/creator
var/datum/effect_system/spark_spread/spark_system
+1 -1
View File
@@ -10,7 +10,7 @@ GLOBAL_LIST_BOILERPLATE(all_mops, /obj/item/mop)
throw_speed = 5
throw_range = 10
w_class = ITEMSIZE_NORMAL
flags = NOCONDUCT
atom_flags = NOCONDUCT
attack_verb = list("mopped", "bashed", "bludgeoned", "whacked")
var/mopping = 0
var/mopcount = 0
+1 -2
View File
@@ -15,7 +15,7 @@ var/global/list/cached_icons = list()
possible_transfer_amounts = list(10,20,30,60)
volume = 60
unacidable = 0
flags = OPENCONTAINER
atom_flags = OPENCONTAINER
var/paint_type = "red"
/obj/item/reagent_containers/glass/paint/afterattack(turf/simulated/target, mob/user, proximity)
@@ -67,4 +67,3 @@ var/global/list/cached_icons = list()
/obj/item/reagent_containers/glass/paint/white
icon_state = "paint_white"
paint_type = "white"
+1 -1
View File
@@ -118,7 +118,7 @@
icon_state = "eshield"
item_state = "eshield"
slot_flags = SLOT_EARS
flags = NOCONDUCT
atom_flags = NOCONDUCT
force = 3.0
throwforce = 5.0
throw_speed = 1
@@ -219,9 +219,9 @@
/obj/item/storage/fancy/cigarettes/Initialize()
. = ..()
flags |= NOREACT
atom_flags |= NOREACT
create_reagents(15 * storage_slots)//so people can inject cigarettes without opening a packet, now with being able to inject the whole one
flags |= OPENCONTAINER
atom_flags |= OPENCONTAINER
if(brand)
for(var/obj/item/clothing/mask/smokable/cigarette/C in src)
C.brand = brand
@@ -333,7 +333,7 @@
/obj/item/storage/fancy/cigar/Initialize()
. = ..()
flags |= NOREACT
atom_flags |= NOREACT
create_reagents(15 * storage_slots)
/obj/item/storage/fancy/cigar/update_icon()
+2 -2
View File
@@ -9,7 +9,7 @@
sharp = 0
edge = 0
throwforce = 7
flags = NOCONDUCT
atom_flags = NOCONDUCT
w_class = ITEMSIZE_NORMAL
drop_sound = 'sound/items/drop/metalweapon.ogg'
pickup_sound = 'sound/items/pickup/metalweapon.ogg'
@@ -264,4 +264,4 @@
// Borg version, for the lost module.
/obj/item/melee/baton/shocker/robot
use_external_power = TRUE
use_external_power = TRUE
+2 -4
View File
@@ -16,7 +16,7 @@
for (var/obj/item/grab/G in H.grabbed_by)
if (G.loc == user && G.state >= GRAB_AGGRESSIVE)
return TRUE
return FALSE
/obj/item/tape_roll/attack(var/mob/living/carbon/human/H, var/mob/user)
@@ -116,15 +116,13 @@
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "tape"
w_class = ITEMSIZE_TINY
item_flags = NOBLUDGEON
plane = MOB_PLANE
anchored = FALSE
drop_sound = null
var/obj/item/stuck = null
/obj/item/ducttape/Initialize()
. = ..()
flags |= NOBLUDGEON
/obj/item/ducttape/examine(mob/user)
return stuck.examine(user)
+1 -1
View File
@@ -237,7 +237,7 @@
if(!istype(W))
return
if((W.flags & NOCONDUCT) || !shock(user, 70, pick(BP_L_HAND, BP_R_HAND)))
if((W.atom_flags & NOCONDUCT) || !shock(user, 70, pick(BP_L_HAND, BP_R_HAND)))
user.setClickCooldown(user.get_attack_speed(W))
user.do_attack_animation(src)
playsound(src, 'sound/effects/grillehit.ogg', 40, 1)
+2 -2
View File
@@ -8,7 +8,7 @@
var/parts
var/list/climbers = list()
var/block_turf_edges = FALSE // If true, turf edge icons will not be made on the turf this occupies.
var/list/connections = list("0", "0", "0", "0")
var/list/other_connections = list("0", "0", "0", "0")
var/list/blend_objects = newlist() // Objects which to blend with
@@ -93,7 +93,7 @@
if(istype(O,/obj/structure))
var/obj/structure/S = O
if(S.climbable) continue
if(O && O.density && !(O.flags & ON_BORDER)) //ON_BORDER structures are handled by the Adjacent() check.
if(O && O.density && !(O.atom_flags & ON_BORDER)) //ON_BORDER structures are handled by the Adjacent() check.
return O
return 0
+1 -2
View File
@@ -150,7 +150,7 @@
return
//window placing end
else if((W.flags & NOCONDUCT) || !shock(user, 70))
else if((W.atom_flags & NOCONDUCT) || !shock(user, 70))
user.setClickCooldown(user.get_attack_speed(W))
user.do_attack_animation(src)
playsound(src, 'sound/effects/grillehit.ogg', 80, 1)
@@ -286,4 +286,3 @@
health -= damage
spawn(1) healthcheck()
return 1
+2 -2
View File
@@ -8,7 +8,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
icon_state = "cart"
anchored = 0
density = 1
flags = OPENCONTAINER
atom_flags = OPENCONTAINER
climbable = TRUE
//copypaste sorry
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
@@ -304,7 +304,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
icon_state = "pussywagon"
anchored = 1
density = 1
flags = OPENCONTAINER
atom_flags = OPENCONTAINER
//copypaste sorry
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
var/obj/item/storage/bag/trash/mybag = null
+3 -3
View File
@@ -7,13 +7,13 @@
climbable = 1
anchored = 1
var/solidledge = 1
flags = ON_BORDER
atom_flags = ON_BORDER
layer = STAIRS_LAYER
icon_state = "ledge"
/obj/structure/ledge_corner
icon_state = "ledge-corner"
flags = 0
atom_flags = 0
name = "rock ledge"
desc = "An easily scaleable rocky ledge."
icon = 'icons/obj/ledges.dmi'
@@ -82,4 +82,4 @@
if(occupied)
to_chat(user, "<span class='danger'>You can't climb there, there's \a [occupied] in the way.</span>")
return 0
return 1
return 1
+1 -1
View File
@@ -7,7 +7,7 @@
climbable = 1
w_class = ITEMSIZE_NORMAL
pressure_resistance = 5
flags = OPENCONTAINER
atom_flags = OPENCONTAINER
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
GLOBAL_LIST_BOILERPLATE(all_mopbuckets, /obj/structure/mopbucket)
+2 -2
View File
@@ -8,7 +8,7 @@
climbable = 1
layer = WINDOW_LAYER
anchored = 1
flags = ON_BORDER
atom_flags = ON_BORDER
icon_state = "railing0"
var/broken = FALSE
var/health = 70
@@ -326,5 +326,5 @@
if(istype(O,/obj/structure))
var/obj/structure/S = O
if(S.climbable) continue
if(O && O.density && !(O.flags & ON_BORDER && !(turn(O.dir, 180) & dir)))
if(O && O.density && !(O.atom_flags & ON_BORDER && !(turn(O.dir, 180) & dir)))
return O
+2 -2
View File
@@ -9,7 +9,7 @@
layer = WINDOW_LAYER
pressure_resistance = 4*ONE_ATMOSPHERE
anchored = 1.0
flags = ON_BORDER
atom_flags = ON_BORDER
var/maxhealth = 14.0
var/maximal_heat = T0C + 100 // Maximal heat before this window begins taking damage from fire
var/damage_per_fire_tick = 2.0 // Amount of damage per fire tick. Regular windows are not fireproof so they might as well break quickly.
@@ -262,7 +262,7 @@
hit(50)
return
if(W.flags & NOBLUDGEON) return
if(W.item_flags & NOBLUDGEON) return
if(W.is_screwdriver())
if(reinf && state >= 1)