diff --git a/_maps/RandomRuins/LavaRuins/lavaland_biodome_beach.dmm b/_maps/RandomRuins/LavaRuins/lavaland_biodome_beach.dmm index 8d9f2c13f0b..de106c87bb8 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_biodome_beach.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_biodome_beach.dmm @@ -32,8 +32,10 @@ /turf/open/floor/carpet/orange, /area/ruin/powered/beach) "aF" = ( -/obj/machinery/vending/boozeomat{ - set_obj_flags = "EMAGGED" +/obj/machinery/vending/boozeomat, +/obj/effect/mapping_helpers/atom_injector/obj_flag{ + inject_flags = 1; + target_type = /obj/machinery/vending/boozeomat }, /turf/open/floor/wood, /area/ruin/powered/beach) diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_greed.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_greed.dmm index f21ffaedf9b..27e36df29f7 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_greed.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_greed.dmm @@ -38,8 +38,10 @@ /turf/open/floor/carpet, /area/ruin/powered/greed) "k" = ( -/obj/machinery/computer/arcade/battle{ - set_obj_flags = "EMAGGED" +/obj/machinery/computer/arcade/battle, +/obj/effect/mapping_helpers/atom_injector/obj_flag{ + inject_flags = 1; + target_type = /obj/machinery/computer/arcade/battle }, /turf/open/floor/engine/cult, /area/ruin/powered/greed) diff --git a/_maps/RandomRuins/SpaceRuins/crashedship.dmm b/_maps/RandomRuins/SpaceRuins/crashedship.dmm index 301a3f63a8f..ab70914a43d 100644 --- a/_maps/RandomRuins/SpaceRuins/crashedship.dmm +++ b/_maps/RandomRuins/SpaceRuins/crashedship.dmm @@ -383,7 +383,10 @@ /obj/machinery/porta_turret{ dir = 8; installation = /obj/item/gun/energy/lasercannon; - set_obj_flags = "EMAGGED" + }, +/obj/effect/mapping_helpers/atom_injector/obj_flag{ + inject_flags = 1; + target_type = /obj/machinery/porta_turret }, /obj/effect/turf_decal/trimline/brown/filled/warning{ dir = 1 @@ -484,8 +487,11 @@ /obj/effect/turf_decal/trimline/brown/line, /obj/machinery/porta_turret{ dir = 8; - installation = /obj/item/gun/energy/lasercannon; - set_obj_flags = "EMAGGED" + installation = /obj/item/gun/energy/lasercannon + }, +/obj/effect/mapping_helpers/atom_injector/obj_flag{ + inject_flags = 1; + target_type = /obj/machinery/porta_turret }, /turf/open/floor/plating/airless, /area/awaymission/bmpship/midship) @@ -1065,8 +1071,11 @@ }, /obj/machinery/porta_turret{ dir = 8; - installation = /obj/item/gun/energy/lasercannon; - set_obj_flags = "EMAGGED" + installation = /obj/item/gun/energy/lasercannon + }, +/obj/effect/mapping_helpers/atom_injector/obj_flag{ + inject_flags = 1; + target_type = /obj/machinery/porta_turret }, /turf/open/floor/plating/airless, /area/awaymission/bmpship/midship) diff --git a/_maps/RandomZLevels/moonoutpost19.dmm b/_maps/RandomZLevels/moonoutpost19.dmm index 42230fbd2b9..6eb9c054b3c 100644 --- a/_maps/RandomZLevels/moonoutpost19.dmm +++ b/_maps/RandomZLevels/moonoutpost19.dmm @@ -753,8 +753,11 @@ /obj/machinery/door/airlock/public/glass{ density = 0; icon_state = "open"; - name = "Dormitories"; - set_obj_flags = "EMAGGED" + name = "Dormitories" + }, +/obj/effect/mapping_helpers/atom_injector/obj_flag{ + inject_flags = 1; + target_type = /obj/machinery/door/airlock }, /obj/item/stack/rods, /obj/item/shard{ @@ -1048,8 +1051,11 @@ icon_state = "open"; id_tag = "awaydorm4"; name = "Dorm 1"; - opacity = 0; - set_obj_flags = "EMAGGED" + opacity = 0 + }, +/obj/effect/mapping_helpers/atom_injector/obj_flag{ + inject_flags = 1; + target_type = /obj/machinery/door/airlock }, /obj/effect/decal/cleanable/dirt, /turf/open/floor/wood{ @@ -1311,8 +1317,11 @@ /obj/machinery/door/airlock/external/ruin{ density = 0; icon_state = "open"; - opacity = 0; - set_obj_flags = "EMAGGED" + opacity = 0 + }, +/obj/effect/mapping_helpers/atom_injector/obj_flag{ + inject_flags = 1; + target_type = /obj/machinery/door/airlock }, /obj/effect/mapping_helpers/airlock/access/all/syndicate/general, /obj/effect/mapping_helpers/airlock/cyclelink_helper, @@ -1400,8 +1409,11 @@ /obj/machinery/door/airlock/external/ruin{ density = 0; icon_state = "open"; - opacity = 0; - set_obj_flags = "EMAGGED" + opacity = 0 + }, +/obj/effect/mapping_helpers/atom_injector/obj_flag{ + inject_flags = 1; + target_type = /obj/machinery/door/airlock }, /obj/effect/mapping_helpers/airlock/access/all/syndicate/general, /obj/effect/mapping_helpers/airlock/cyclelink_helper{ @@ -1926,8 +1938,11 @@ density = 0; icon_state = "open"; name = "Xenobiology Lab"; - opacity = 0; - set_obj_flags = "EMAGGED" + opacity = 0 + }, +/obj/effect/mapping_helpers/atom_injector/obj_flag{ + inject_flags = 1; + target_type = /obj/machinery/door/airlock }, /obj/effect/mapping_helpers/airlock/access/all/away/maintenance, /obj/structure/cable, @@ -2892,8 +2907,11 @@ density = 0; icon_state = "open"; name = "Research Director's Office"; - opacity = 0; - set_obj_flags = "EMAGGED" + opacity = 0 + }, +/obj/effect/mapping_helpers/atom_injector/obj_flag{ + inject_flags = 1; + target_type = /obj/machinery/door/airlock }, /obj/effect/mapping_helpers/airlock/access/all/away/maintenance, /turf/open/floor/iron/cafeteria{ diff --git a/code/__DEFINES/obj_flags.dm b/code/__DEFINES/obj_flags.dm index d98e0c4c116..9d05ece7d6b 100644 --- a/code/__DEFINES/obj_flags.dm +++ b/code/__DEFINES/obj_flags.dm @@ -6,14 +6,13 @@ #define CAN_BE_HIT (1<<2) //can this be bludgeoned by items? #define BEING_SHOCKED (1<<3) // Whether this thing is currently (already) being shocked by a tesla #define DANGEROUS_POSSESSION (1<<4) //Admin possession yes/no -#define ON_BLUEPRINTS (1<<5) //Are we visible on the station blueprints at roundstart? -#define UNIQUE_RENAME (1<<6) // can you customize the description/name of the thing? -#define USES_TGUI (1<<7) //put on things that use tgui on ui_interact instead of custom/old UI. -#define BLOCK_Z_OUT_DOWN (1<<8) // Should this object block z falling from loc? -#define BLOCK_Z_OUT_UP (1<<9) // Should this object block z uprise from loc? -#define BLOCK_Z_IN_DOWN (1<<10) // Should this object block z falling from above? -#define BLOCK_Z_IN_UP (1<<11) // Should this object block z uprise from below? -#define NO_BUILD (1<<12) // Can we build on this object? +#define UNIQUE_RENAME (1<<5) // can you customize the description/name of the thing? +#define USES_TGUI (1<<6) //put on things that use tgui on ui_interact instead of custom/old UI. +#define BLOCK_Z_OUT_DOWN (1<<7) // Should this object block z falling from loc? +#define BLOCK_Z_OUT_UP (1<<8) // Should this object block z uprise from loc? +#define BLOCK_Z_IN_DOWN (1<<9) // Should this object block z falling from above? +#define BLOCK_Z_IN_UP (1<<10) // Should this object block z uprise from below? +#define NO_BUILD (1<<11) // Can we build on this object? // If you add new ones, be sure to add them to /obj/Initialize as well for complete mapping support diff --git a/code/__HELPERS/lighting.dm b/code/__HELPERS/lighting.dm index 08c360849b5..0a000b99a83 100644 --- a/code/__HELPERS/lighting.dm +++ b/code/__HELPERS/lighting.dm @@ -6,6 +6,8 @@ /// Produces a mutable appearance glued to the [EMISSIVE_PLANE] dyed to be the [EM_BLOCK_COLOR]. /proc/emissive_blocker(icon, icon_state = "", layer = FLOAT_LAYER, alpha = 255, appearance_flags = NONE) + // Note: alpha doesn't "do" anything, since it's overriden by the color set shortly after + // Consider removing it someday? var/mutable_appearance/appearance = mutable_appearance(icon, icon_state, layer, EMISSIVE_PLANE, alpha, appearance_flags | EMISSIVE_APPEARANCE_FLAGS) appearance.color = GLOB.em_block_color return appearance diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index 35116eb6ba1..6c11494ced5 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -279,7 +279,6 @@ DEFINE_BITFIELD(obj_flags, list( "EMAGGED" = EMAGGED, "IN_USE" = IN_USE, "NO_BUILD" = NO_BUILD, - "ON_BLUEPRINTS" = ON_BLUEPRINTS, "UNIQUE_RENAME" = UNIQUE_RENAME, "USES_TGUI" = USES_TGUI, )) diff --git a/code/datums/armor.dm b/code/datums/armor.dm index b3e379f73b7..ff0a11071a9 100644 --- a/code/datums/armor.dm +++ b/code/datums/armor.dm @@ -6,7 +6,6 @@ . = new /datum/armor(melee, bullet, laser, energy, bomb, bio, fire, acid, wound, consume) /datum/armor - datum_flags = DF_USE_TAG var/melee var/bullet var/laser @@ -29,7 +28,7 @@ src.acid = acid src.wound = wound src.consume = consume - tag = ARMORID + GenerateTag() /datum/armor/proc/modifyRating(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, fire = 0, acid = 0, wound = 0, consume = 0) return getArmor(src.melee+melee, src.bullet+bullet, src.laser+laser, src.energy+energy, src.bomb+bomb, src.bio+bio, src.fire+fire, src.acid+acid, src.wound+wound, src.consume+consume) @@ -61,10 +60,14 @@ /datum/armor/proc/detachArmor(datum/armor/AA) return getArmor(melee-AA.melee, bullet-AA.bullet, laser-AA.laser, energy-AA.energy, bomb-AA.bomb, bio-AA.bio, fire-AA.fire, acid-AA.acid, wound-AA.wound, consume-AA.consume) +/datum/armor/GenerateTag() + . = ..() + tag = ARMORID + /datum/armor/vv_edit_var(var_name, var_value) if (var_name == NAMEOF(src, tag)) return FALSE . = ..() - tag = ARMORID // update tag in case armor values were edited + GenerateTag() #undef ARMORID diff --git a/code/datums/datum.dm b/code/datums/datum.dm index 8dfeb56a523..8cc88b9dc53 100644 --- a/code/datums/datum.dm +++ b/code/datums/datum.dm @@ -265,3 +265,11 @@ return SEND_SIGNAL(source, COMSIG_CD_RESET(index), S_TIMER_COOLDOWN_TIMELEFT(source, index)) TIMER_COOLDOWN_END(source, index) + +///Generate a tag for this /datum, if it implements one +///Should be called as early as possible, best would be in New, to avoid weakref mistargets +///Really just don't use this, you don't need it, global lists will do just fine MOST of the time +///We really only use it for mobs to make id'ing people easier +/datum/proc/GenerateTag() + datum_flags |= DF_USE_TAG + diff --git a/code/game/atoms.dm b/code/game/atoms.dm index bb3db2c57bc..05d1b1bc14d 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -173,16 +173,12 @@ * if the preloader is being used and then call [InitAtom][/datum/controller/subsystem/atoms/proc/InitAtom] of which the ultimate * result is that the Intialize proc is called. * - * We also generate a tag here if the DF_USE_TAG flag is set on the atom */ /atom/New(loc, ...) //atom creation method that preloads variables at creation if(GLOB.use_preloader && (src.type == GLOB._preloader.target_path))//in case the instanciated atom is creating other atoms in New() world.preloader_load(src) - if(datum_flags & DF_USE_TAG) - GenerateTag() - var/do_initialize = SSatoms.initialized if(do_initialize != INITIALIZATION_INSSATOMS) args[1] = do_initialize == INITIALIZATION_INNEW_MAPLOAD @@ -1572,10 +1568,6 @@ /atom/proc/analyzer_act_secondary(mob/living/user, obj/item/tool) return -///Generate a tag for this atom -/atom/proc/GenerateTag() - return - ///Connect this atom to a shuttle /atom/proc/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock) return diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index a01d50ac396..5d995248ce2 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -94,19 +94,49 @@ /// The degree of pressure protection that mobs in list/contents have from the external environment, between 0 and 1 var/contents_pressure_protection = 0 +/mutable_appearance/emissive_blocker + +/mutable_appearance/emissive_blocker/New() + . = ..() + // Need to do this here because it's overriden by the parent call + plane = EMISSIVE_PLANE + color = EM_BLOCK_COLOR + appearance_flags = EMISSIVE_APPEARANCE_FLAGS + /atom/movable/Initialize(mapload) . = ..() switch(blocks_emissive) if(EMISSIVE_BLOCK_GENERIC) - var/mutable_appearance/gen_emissive_blocker = mutable_appearance(icon, icon_state, plane = EMISSIVE_PLANE, alpha = src.alpha) - gen_emissive_blocker.color = GLOB.em_block_color - gen_emissive_blocker.dir = dir - gen_emissive_blocker.appearance_flags |= appearance_flags - add_overlay(list(gen_emissive_blocker)) + var/static/mutable_appearance/emissive_blocker/blocker = new() + blocker.icon = icon + blocker.icon_state = icon_state + blocker.dir = dir + blocker.appearance_flags |= appearance_flags + // Ok so this is really cursed, but I want to set with this blocker cheaply while + // Still allowing it to be removed from the overlays list later + // So I'm gonna flatten it, then insert the flattened overlay into overlays AND the managed overlays list, directly + // I'm sorry + var/mutable_appearance/flat = blocker.appearance + overlays += flat + if(managed_overlays) + if(islist(managed_overlays)) + managed_overlays += flat + else + managed_overlays = list(managed_overlays, flat) + else + managed_overlays = flat if(EMISSIVE_BLOCK_UNIQUE) render_target = ref(src) em_block = new(src, render_target) - add_overlay(list(em_block)) + overlays += em_block + if(managed_overlays) + if(islist(managed_overlays)) + managed_overlays += em_block + else + managed_overlays = list(managed_overlays, em_block) + else + managed_overlays = em_block + if(opacity) AddElement(/datum/element/light_blocking) switch(light_system) @@ -115,7 +145,6 @@ if(MOVABLE_LIGHT_DIRECTIONAL) AddComponent(/datum/component/overlay_lighting, is_directional = TRUE) - /atom/movable/Destroy(force) QDEL_NULL(language_holder) QDEL_NULL(em_block) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index e691a0af0d2..a8bf5a3517e 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -149,10 +149,9 @@ flags_1 = HTML_USE_INITAL_ICON_1 rad_insulation = RAD_MEDIUM_INSULATION - network_id = NETWORK_DOOR_AIRLOCKS - /obj/machinery/door/airlock/Initialize(mapload) . = ..() + init_network_id(NETWORK_DOOR_AIRLOCKS) wires = set_wires() if(frequency) set_frequency(frequency) diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 26ebb3e7307..ee57f51cc5c 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -16,7 +16,6 @@ pass_flags_self = PASSGLASS can_atmos_pass = ATMOS_PASS_PROC interaction_flags_machine = INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_REQUIRES_SILICON | INTERACT_MACHINE_OPEN - network_id = NETWORK_DOOR_AIRLOCKS set_dir_on_move = FALSE var/obj/item/electronics/airlock/electronics = null var/reinf = 0 @@ -27,6 +26,7 @@ /obj/machinery/door/window/Initialize(mapload, set_dir, unres_sides) . = ..() + init_network_id(NETWORK_DOOR_AIRLOCKS) flags_1 &= ~PREVENT_CLICK_UNDER_1 if(set_dir) setDir(set_dir) diff --git a/code/game/objects/effects/contraband.dm b/code/game/objects/effects/contraband.dm index 520db51c460..7532a9b17cb 100644 --- a/code/game/objects/effects/contraband.dm +++ b/code/game/objects/effects/contraband.dm @@ -139,6 +139,7 @@ poster_item_desc = initial(selected.poster_item_desc) poster_item_icon_state = initial(selected.poster_item_icon_state) ruined = initial(selected.ruined) + update_appearance() /obj/structure/sign/poster/attackby(obj/item/I, mob/user, params) if(I.tool_behaviour == TOOL_WIRECUTTER) diff --git a/code/game/objects/items/control_wand.dm b/code/game/objects/items/control_wand.dm index 7fac85e903c..c80cee27215 100644 --- a/code/game/objects/items/control_wand.dm +++ b/code/game/objects/items/control_wand.dm @@ -14,10 +14,10 @@ var/mode = WAND_OPEN var/region_access = REGION_GENERAL var/list/access_list - network_id = NETWORK_DOOR_REMOTES /obj/item/door_remote/Initialize(mapload) . = ..() + init_network_id(NETWORK_DOOR_REMOTES) access_list = SSid_access.get_region_access_list(list(region_access)) RegisterSignal(src, COMSIG_COMPONENT_NTNET_NAK, .proc/bad_signal) diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 4c5ebe084db..57f7d825089 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -3,7 +3,6 @@ animate_movement = SLIDE_STEPS speech_span = SPAN_ROBOT var/obj_flags = CAN_BE_HIT - var/set_obj_flags // ONLY FOR MAPPING: Sets flags from a string list, handled in Initialize. Usage: set_obj_flags = "EMAGGED;!CAN_BE_HIT" to set EMAGGED and clear CAN_BE_HIT. var/damtype = BRUTE var/force = 0 @@ -48,35 +47,18 @@ return FALSE return ..() -/obj/Initialize(mapload) - . = ..() - - if (set_obj_flags) - var/flagslist = splittext(set_obj_flags,";") - var/list/string_to_objflag = GLOB.bitfields["obj_flags"] - for (var/flag in flagslist) - if(flag[1] == "!") - flag = copytext(flag, length(flag[1]) + 1) // Get all but the initial ! - obj_flags &= ~string_to_objflag[flag] - else - obj_flags |= string_to_objflag[flag] - - if((obj_flags & ON_BLUEPRINTS) && isturf(loc)) - var/turf/T = loc - T.add_blueprints_preround(src) - - if(network_id) - var/area/A = get_area(src) - if(A) - if(!A.network_root_id) - log_telecomms("Area '[A.name]([REF(A)])' has no network network_root_id, force assigning in object [src]([REF(src)])") - SSnetworks.lookup_area_root_id(A) - network_id = NETWORK_NAME_COMBINE(A.network_root_id, network_id) // I regret nothing!! - else - log_telecomms("Created [src]([REF(src)] in nullspace, assuming network to be in station") - network_id = NETWORK_NAME_COMBINE(STATION_NETWORK_ROOT, network_id) // I regret nothing!! - AddComponent(/datum/component/ntnet_interface, network_id, id_tag) - +// Call this if you want to add your object to a network +/obj/proc/init_network_id(network_id) + var/area/A = get_area(src) + if(A) + if(!A.network_root_id) + log_telecomms("Area '[A.name]([REF(A)])' has no network network_root_id, force assigning in object [src]([REF(src)])") + SSnetworks.lookup_area_root_id(A) + network_id = NETWORK_NAME_COMBINE(A.network_root_id, network_id) // I regret nothing!! + else + log_telecomms("Created [src]([REF(src)] in nullspace, assuming network to be in station") + network_id = NETWORK_NAME_COMBINE(STATION_NETWORK_ROOT, network_id) // I regret nothing!! + AddComponent(/datum/component/ntnet_interface, network_id, id_tag) /obj/Destroy(force) if(!ismachinery(src)) diff --git a/code/modules/atmospherics/machinery/atmosmachinery.dm b/code/modules/atmospherics/machinery/atmosmachinery.dm index 76263b9a5c7..32dbb954164 100644 --- a/code/modules/atmospherics/machinery/atmosmachinery.dm +++ b/code/modules/atmospherics/machinery/atmosmachinery.dm @@ -19,7 +19,7 @@ layer = GAS_PIPE_HIDDEN_LAYER //under wires resistance_flags = FIRE_PROOF max_integrity = 200 - obj_flags = CAN_BE_HIT | ON_BLUEPRINTS + obj_flags = CAN_BE_HIT ///Check if the object can be unwrenched var/can_unwrench = FALSE ///Bitflag of the initialized directions (NORTH | SOUTH | EAST | WEST) @@ -92,6 +92,7 @@ var/turf/turf_loc = null if(isturf(loc)) turf_loc = loc + turf_loc.add_blueprints_preround(src) SSspatial_grid.add_grid_awareness(src, SPATIAL_GRID_CONTENTS_TYPE_ATMOS) SSspatial_grid.add_grid_membership(src, turf_loc, SPATIAL_GRID_CONTENTS_TYPE_ATMOS) return ..() diff --git a/code/modules/mapping/mapping_helpers.dm b/code/modules/mapping/mapping_helpers.dm index 52e72bcbdfe..c0e2b63bbb3 100644 --- a/code/modules/mapping/mapping_helpers.dm +++ b/code/modules/mapping/mapping_helpers.dm @@ -283,6 +283,17 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava) /obj/effect/mapping_helpers/atom_injector/proc/generate_stack_trace() . = "[name] found no targets at ([x], [y], [z]). First Match Only: [first_match_only ? "true" : "false"] target type: [target_type] | target name: [target_name]" +/obj/effect/mapping_helpers/atom_injector/obj_flag + name = "Obj Flag Injector" + icon_state = "objflag_helper" + var/inject_flags = NONE + +/obj/effect/mapping_helpers/atom_injector/obj_flag/inject(atom/target) + if(!isobj(target)) + return + var/obj/obj_target = target + obj_target.obj_flags |= inject_flags + ///This helper applies components to things on the map directly. /obj/effect/mapping_helpers/atom_injector/component_injector name = "Component Injector" diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index bdbae02ead7..4b80fc7750e 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -50,6 +50,10 @@ return ..() +/mob/New() + // This needs to happen IMMEDIATELY. I'm sorry :( + GenerateTag() + return ..() /** * Intialize a mob @@ -97,6 +101,7 @@ * This is simply "mob_"+ a global incrementing counter that goes up for every mob */ /mob/GenerateTag() + . = ..() tag = "mob_[next_mob_id++]" /** diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 96fd9b0e214..c901e969c94 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -7,7 +7,6 @@ * Has a lot of the creature game world logic, such as health etc */ /mob - datum_flags = DF_USE_TAG density = TRUE layer = MOB_LAYER plane = GAME_PLANE_FOV_HIDDEN diff --git a/code/modules/modular_computers/hardware/network_card.dm b/code/modules/modular_computers/hardware/network_card.dm index ea711dddfe1..b542c4550ca 100644 --- a/code/modules/modular_computers/hardware/network_card.dm +++ b/code/modules/modular_computers/hardware/network_card.dm @@ -3,7 +3,6 @@ desc = "A basic wireless network card for usage with standard NTNet frequencies." power_usage = 50 icon_state = "radio_mini" - network_id = NETWORK_CARDS // Network we are on var/hardware_id = null // Identification ID. Technically MAC address of this device. Can't be changed by user. var/identification_string = "" // Identification string, technically nickname seen in the network. Can be set by user. var/long_range = 0 @@ -11,6 +10,9 @@ malfunction_probability = 1 device_type = MC_NET +/obj/item/computer_hardware/network_card/Initialize(mapload) + . = ..() + init_network_id(NETWORK_CARDS) /obj/item/computer_hardware/network_card/diagnostics(mob/user) ..() diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 8cca10f28b9..600655e9acf 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -19,7 +19,7 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri color = "yellow" layer = WIRE_LAYER //Above hidden pipes, GAS_PIPE_HIDDEN_LAYER anchored = TRUE - obj_flags = CAN_BE_HIT | ON_BLUEPRINTS + obj_flags = CAN_BE_HIT var/linked_dirs = 0 //bitflag var/node = FALSE //used for sprites display var/cable_layer = CABLE_LAYER_2 //bitflag @@ -47,6 +47,10 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri Connect_cable() AddElement(/datum/element/undertile, TRAIT_T_RAY_VISIBLE) RegisterSignal(src, COMSIG_RAT_INTERACT, .proc/on_rat_eat) + if(isturf(loc)) + var/turf/turf_loc = loc + turf_loc.add_blueprints_preround(src) + /obj/structure/cable/proc/on_rat_eat(datum/source, mob/living/simple_animal/hostile/regalrat/king) SIGNAL_HANDLER diff --git a/code/modules/power/pipecleaners.dm b/code/modules/power/pipecleaners.dm index 573e3025c9e..4130b687649 100644 --- a/code/modules/power/pipecleaners.dm +++ b/code/modules/power/pipecleaners.dm @@ -41,7 +41,7 @@ By design, d1 is the smallest direction and d2 is the highest icon_state = "0-1" layer = WIRE_LAYER //Above hidden pipes, GAS_PIPE_HIDDEN_LAYER anchored = TRUE - obj_flags = CAN_BE_HIT | ON_BLUEPRINTS + obj_flags = CAN_BE_HIT color = COLOR_RED /// Pipe_cleaner direction 1 (see above) var/d1 = 0 @@ -91,6 +91,9 @@ By design, d1 is the smallest direction and d2 is the highest var/random_color = pick(pipe_cleaner_colors) color = pipe_cleaner_colors[random_color] update_appearance() + if(isturf(loc)) + var/turf/turf_loc = loc + turf_loc.add_blueprints_preround(src) /obj/structure/pipe_cleaner/Destroy() // called when a pipe_cleaner is deleted //If we have a stored item at this point, lets just delete it, since that should be diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index 60ae485aff3..a8f844c76b5 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -10,13 +10,19 @@ name = null icon = 'icons/obj/power.dmi' anchored = TRUE - obj_flags = CAN_BE_HIT | ON_BLUEPRINTS + obj_flags = CAN_BE_HIT var/datum/powernet/powernet = null use_power = NO_POWER_USE idle_power_usage = 0 active_power_usage = 0 var/machinery_layer = MACHINERY_LAYER_1 //cable layer to which the machine is connected +/obj/machinery/power/Initialize(mapload) + . = ..() + if(isturf(loc)) + var/turf/turf_loc = loc + turf_loc.add_blueprints_preround(src) + /obj/machinery/power/Destroy() disconnect_from_network() addtimer(CALLBACK(GLOBAL_PROC, .proc/update_cable_icons_on_turf, get_turf(src)), 3) diff --git a/code/modules/recycling/disposal/pipe.dm b/code/modules/recycling/disposal/pipe.dm index 1b11630e67a..b06b8444aa0 100644 --- a/code/modules/recycling/disposal/pipe.dm +++ b/code/modules/recycling/disposal/pipe.dm @@ -6,7 +6,7 @@ icon = 'icons/obj/atmospherics/pipes/disposal.dmi' anchored = TRUE density = FALSE - obj_flags = CAN_BE_HIT | ON_BLUEPRINTS + obj_flags = CAN_BE_HIT dir = NONE // dir will contain dominant direction for junction pipes max_integrity = 200 armor = list(MELEE = 25, BULLET = 10, LASER = 10, ENERGY = 100, BOMB = 0, BIO = 0, FIRE = 90, ACID = 30) @@ -42,6 +42,9 @@ dpdir |= turn(dir, 180) AddElement(/datum/element/undertile, TRAIT_T_RAY_VISIBLE) + if(isturf(loc)) + var/turf/turf_loc = loc + turf_loc.add_blueprints_preround(src) // pipe is deleted // ensure if holder is present, it is expelled diff --git a/code/modules/wiremod/components/ntnet/ntnet_receive.dm b/code/modules/wiremod/components/ntnet/ntnet_receive.dm index dae0c668682..1fe5d40b847 100644 --- a/code/modules/wiremod/components/ntnet/ntnet_receive.dm +++ b/code/modules/wiremod/components/ntnet/ntnet_receive.dm @@ -10,8 +10,6 @@ circuit_flags = CIRCUIT_FLAG_OUTPUT_SIGNAL //trigger_output - network_id = __NETWORK_CIRCUITS - /// The list type var/datum/port/input/option/list_options @@ -21,6 +19,10 @@ /// Encryption key var/datum/port/input/enc_key +/obj/item/circuit_component/ntnet_receive/Initialize(mapload) + . = ..() + init_network_id(__NETWORK_CIRCUITS) + /obj/item/circuit_component/ntnet_receive/populate_options() list_options = add_option_port("List Type", GLOB.wiremod_basic_types) diff --git a/code/modules/wiremod/components/ntnet/ntnet_send.dm b/code/modules/wiremod/components/ntnet/ntnet_send.dm index f5f544c767f..0cad7f11e4a 100644 --- a/code/modules/wiremod/components/ntnet/ntnet_send.dm +++ b/code/modules/wiremod/components/ntnet/ntnet_send.dm @@ -11,8 +11,6 @@ circuit_flags = CIRCUIT_FLAG_INPUT_SIGNAL - network_id = __NETWORK_CIRCUITS - /// The list type var/datum/port/input/option/list_options @@ -22,6 +20,10 @@ /// Encryption key var/datum/port/input/enc_key +/obj/item/circuit_component/ntnet_send/Initialize(mapload) + . = ..() + init_network_id(__NETWORK_CIRCUITS) + /obj/item/circuit_component/ntnet_send/populate_options() list_options = add_option_port("List Type", GLOB.wiremod_basic_types) diff --git a/icons/effects/mapping_helpers.dmi b/icons/effects/mapping_helpers.dmi index 0f52777704e..8eabf729bbd 100644 Binary files a/icons/effects/mapping_helpers.dmi and b/icons/effects/mapping_helpers.dmi differ