[MIRROR] Moves "catch this var/flag" code from obj/init and datum/new into the types that use it [MDB IGNORE] (#16091)

* Moves "catch this var/flag" code from obj/init and datum/new into the types that use it

* Update atoms_movable.dm

* Update airlock.dm

* SRCC

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
Co-authored-by: John Doe <gamingskeleton3@gmail.com>
This commit is contained in:
SkyratBot
2022-09-11 22:21:16 -07:00
committed by GitHub
co-authored by LemonInTheDark Zonespace John Doe
parent 7d84a2c507
commit 049b19bb18
29 changed files with 191 additions and 99 deletions
@@ -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)
@@ -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)
+15 -5
View File
@@ -383,7 +383,11 @@
/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 +488,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 +1072,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)
+30 -12
View File
@@ -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{
+15 -6
View File
@@ -4240,8 +4240,11 @@
default_price = 0;
extended_inventory = 1;
extra_price = 0;
fair_market_price = 0;
set_obj_flags = "EMAGGED"
fair_market_price = 0
},
/obj/effect/mapping_helpers/atom_injector/obj_flag{
inject_flags = 1;
target_type = /obj/machinery/vending/boozeomat
},
/turf/open/indestructible/hotelwood,
/area/centcom/holding/cafedorms)
@@ -4608,8 +4611,11 @@
default_price = 0;
extended_inventory = 1;
extra_price = 0;
fair_market_price = 0;
set_obj_flags = "EMAGGED"
fair_market_price = 0
},
/obj/effect/mapping_helpers/atom_injector/obj_flag{
inject_flags = 1;
target_type = /obj/machinery/vending/boozeomat
},
/obj/structure/sign/poster/contraband/space_cola{
pixel_y = 32
@@ -10710,8 +10716,11 @@
default_price = 0;
extended_inventory = 1;
extra_price = 0;
fair_market_price = 0;
set_obj_flags = "EMAGGED"
fair_market_price = 0
},
/obj/effect/mapping_helpers/atom_injector/obj_flag{
inject_flags = 1;
target_type = /obj/machinery/vending/boozeomat
},
/turf/open/floor/wood,
/area/centcom/holding/cafe)
+7 -8
View File
@@ -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
+2
View File
@@ -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
-1
View File
@@ -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,
))
+6 -3
View File
@@ -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
+8
View File
@@ -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
-8
View File
@@ -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
@@ -1574,10 +1570,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(mapload, obj/docking_port/mobile/port, obj/docking_port/stationary/dock)
return
+35 -7
View File
@@ -97,20 +97,49 @@
/// Whether a user will face atoms on entering them with a mouse. Despite being a mob variable, it is here for performances //SKYRAT EDIT ADDITION
var/face_mouse = FALSE //SKYRAT EDIT ADDITION
/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)
@@ -119,7 +148,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)
+1 -2
View File
@@ -149,8 +149,6 @@
flags_1 = HTML_USE_INITAL_ICON_1
rad_insulation = RAD_MEDIUM_INSULATION
network_id = NETWORK_DOOR_AIRLOCKS
/obj/machinery/door/airlock/Initialize(mapload)
//SKYRAT EDIT ADDITION BEGIN - Door aesthetic overhaul
vis_overlay1 = new()
@@ -171,6 +169,7 @@
vis_overlay2.dir = src.dir
update_overlays()
//SKYRAT EDIT END
init_network_id(NETWORK_DOOR_AIRLOCKS)
wires = set_wires()
if(frequency)
set_frequency(frequency)
+1 -1
View File
@@ -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)
+1
View File
@@ -145,6 +145,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)
+1 -1
View File
@@ -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)
+12 -30
View File
@@ -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))
@@ -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 ..()
+11
View File
@@ -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"
+5
View File
@@ -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++]"
/**
-1
View File
@@ -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
@@ -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)
..()
+5 -1
View File
@@ -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
+4 -1
View File
@@ -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
+7 -1
View File
@@ -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)
+4 -1
View File
@@ -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)
@@ -46,6 +46,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
@@ -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)
@@ -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)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 20 KiB