Merge remote-tracking branch 'citadel/master' into the-p-o-o-l

This commit is contained in:
kevinz000
2020-01-25 17:04:37 -07:00
266 changed files with 16241 additions and 11283 deletions
+2 -6
View File
@@ -53620,10 +53620,6 @@
},
/turf/open/floor/plasteel,
/area/engine/gravity_generator)
"eZP" = (
/obj/effect/spawner/structure/window/reinforced,
/turf/open/space/basic,
/area/hallway/secondary/entry)
"fbm" = (
/obj/structure/chair/comfy/brown{
dir = 4
@@ -67472,9 +67468,9 @@ aaa
aaa
aaa
aaf
eZP
awW
auP
eZP
awW
aaf
vZs
aaa
+3 -2
View File
@@ -44934,7 +44934,7 @@
/area/maintenance/port)
"bKY" = (
/obj/machinery/power/apc{
areastring = "/area/vacant_room/office";
areastring = "/area/security/vacantoffice";
dir = 8;
name = "Vacant Office APC";
pixel_x = -25
@@ -47211,6 +47211,7 @@
dir = 4
},
/obj/item/storage/box/lights/mixed,
/obj/structure/closet/firecloset,
/turf/open/floor/plating{
icon_state = "platingdmg2"
},
@@ -96215,7 +96216,7 @@ bMA
alK
bPD
asa
pHS
alK
aaa
aaa
aaf
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+6 -2
View File
@@ -136,8 +136,12 @@
#define ORGAN_SLOT_TESTICLES "testicles"
#define ORGAN_SLOT_BREASTS "breasts"
////organ defines
#define STANDARD_ORGAN_THRESHOLD 100
#define STANDARD_ORGAN_HEALING 0.001
#define STANDARD_ORGAN_DECAY 0.00222 //designed to fail organs when left to decay for ~15 minutes
#define STANDARD_ORGAN_DECAY 0.00222 //designed to fail organs when left to decay for ~15 minutes
#define G_MALE 1
#define G_FEMALE 2
#define G_PLURAL 3
#define G_NEUTER 4
+12
View File
@@ -254,6 +254,18 @@
#define PIPING_CARDINAL_AUTONORMALIZE (1<<3) //north/south east/west doesn't matter, auto normalize on build.
//HELPERS
#define PIPING_LAYER_SHIFT(T, PipingLayer) \
if(T.dir & NORTH || T.dir & SOUTH) { \
T.pixel_x = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X;\
} \
if(T.dir & WEST || T.dir & EAST) { \
T.pixel_y = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_Y;\
}
#define PIPING_LAYER_DOUBLE_SHIFT(T, PipingLayer) \
T.pixel_x = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X;\
T.pixel_y = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_Y;
#define THERMAL_ENERGY(gas) (gas.temperature * gas.heat_capacity())
#define QUANTIZE(variable) (round(variable,0.0000001))/*I feel the need to document what happens here. Basically this is used to catch most rounding errors, however it's previous value made it so that
once gases got hot enough, most procedures wouldnt occur due to the fact that the mole counts would get rounded away. Thus, we lowered it a few orders of magnititude */
+1
View File
@@ -123,6 +123,7 @@
#define COMSIG_TURF_MULTIZ_NEW "turf_multiz_new" //from base of turf/New(): (turf/source, direction)
// /atom/movable signals
#define COMSIG_MOVABLE_PRE_MOVE "movable_pre_move" //from base of atom/movable/Moved(): (/atom)
#define COMSIG_MOVABLE_MOVED "movable_moved" //from base of atom/movable/Moved(): (/atom, dir)
#define COMSIG_MOVABLE_CROSS "movable_cross" //from base of atom/movable/Cross(): (/atom/movable)
#define COMSIG_MOVABLE_CROSSED "movable_crossed" //from base of atom/movable/Crossed(): (/atom/movable)
+1 -1
View File
@@ -37,7 +37,7 @@
#define ROLE_GANG "gangster"
#define ROLE_BLOODSUCKER "bloodsucker"
//#define ROLE_MONSTERHUNTER "monster hunter" Disabled for now
#define ROLE_GHOSTCAFE "ghostcafe"
//Missing assignment means it's not a gamemode specific role, IT'S NOT A BUG OR ERROR.
//The gamemode specific ones are just so the gamemodes can query whether a player is old enough
//(in game days played) to play that role
+3 -1
View File
@@ -14,7 +14,9 @@
#define TOOL_DRILL "drill"
#define TOOL_SCALPEL "scalpel"
#define TOOL_SAW "saw"
//Glasswork Tools
#define TOOL_BLOW "blowing_rod"
#define TOOL_GLASS_CUT "glasskit"
// If delay between the start and the end of tool operation is less than MIN_TOOL_SOUND_DELAY,
// tool sound is only played when op is started. If not, it's played twice.
+1
View File
@@ -234,6 +234,7 @@
#define ABDUCTOR_ANTAGONIST "abductor-antagonist"
#define NUKEOP_ANTAGONIST "nukeop-antagonist"
#define MADE_UNCLONEABLE "made-uncloneable"
#define TIMESTOP_TRAIT "timestop"
#define NUKEOP_TRAIT "nuke-op"
#define MEGAFAUNA_TRAIT "megafauna"
#define DEATHSQUAD_TRAIT "deathsquad"
+3 -1
View File
@@ -146,6 +146,8 @@
/datum/hud/proc/update_parallax_motionblur(client/C, animatedir, new_parallax_movedir, matrix/newtransform)
if(!C)
return
C.parallax_animate_timer = FALSE
for(var/thing in C.parallax_layers)
var/obj/screen/parallax_layer/L = thing
@@ -167,7 +169,7 @@
/datum/hud/proc/update_parallax()
var/client/C = mymob.client
var/turf/posobj = get_turf(C.eye)
if(!posobj)
if(!posobj)
return
var/area/areaobj = posobj.loc
+2 -2
View File
@@ -31,8 +31,8 @@ SUBSYSTEM_DEF(fail2topic)
return ..()
/datum/controller/subsystem/fail2topic/fire()
while (rate_limiting.len)
var/ip = rate_limiting[1]
for(var/i in 1 to length(rate_limiting))
var/ip = rate_limiting[i]
var/last_attempt = rate_limiting[ip]
if (world.time - last_attempt > rate_limit)
+107
View File
@@ -0,0 +1,107 @@
/**
* A component to reset the parent to its previous state after some time passes
*/
/datum/component/dejavu
/// The turf the parent was on when this components was applied, they get moved back here after the duration
var/turf/starting_turf
/// Determined by the type of the parent so different behaviours can happen per type
var/rewind_type
/// How many rewinds will happen before the effect ends
var/rewinds_remaining
/// How long to wait between each rewind
var/rewind_interval
/// The starting value of clone loss at the beginning of the effect
var/clone_loss = 0
/// The starting value of toxin loss at the beginning of the effect
var/tox_loss = 0
/// The starting value of oxygen loss at the beginning of the effect
var/oxy_loss = 0
/// The starting value of brain loss at the beginning of the effect
var/brain_loss = 0
/// The starting value of brute loss at the beginning of the effect
/// This only applies to simple animals
var/brute_loss
/// The starting value of integrity at the beginning of the effect
/// This only applies to objects
var/integrity
/// A list of body parts saved at the beginning of the effect
var/list/datum/saved_bodypart/saved_bodyparts
/datum/component/dejavu/Initialize(rewinds = 1, interval = 10 SECONDS)
if(!isatom(parent))
return COMPONENT_INCOMPATIBLE
starting_turf = get_turf(parent)
rewinds_remaining = rewinds
rewind_interval = interval
if(isliving(parent))
var/mob/living/L = parent
clone_loss = L.getCloneLoss()
tox_loss = L.getToxLoss()
oxy_loss = L.getOxyLoss()
brain_loss = L.getOrganLoss(ORGAN_SLOT_BRAIN)
rewind_type = .proc/rewind_living
if(iscarbon(parent))
var/mob/living/carbon/C = parent
saved_bodyparts = C.save_bodyparts()
rewind_type = .proc/rewind_carbon
else if(isanimal(parent))
var/mob/living/simple_animal/M = parent
brute_loss = M.bruteloss
rewind_type = .proc/rewind_animal
else if(isobj(parent))
var/obj/O = parent
integrity = O.obj_integrity
rewind_type = .proc/rewind_obj
addtimer(CALLBACK(src, rewind_type), rewind_interval)
/datum/component/dejavu/Destroy()
starting_turf = null
saved_bodyparts = null
return ..()
/datum/component/dejavu/proc/rewind()
to_chat(parent, "<span class=notice>You remember a time not so long ago...</span>")
//comes after healing so new limbs comically drop to the floor
if(starting_turf)
var/atom/movable/master = parent
master.forceMove(starting_turf)
rewinds_remaining --
if(rewinds_remaining)
addtimer(CALLBACK(src, rewind_type), rewind_interval)
else
to_chat(parent, "<span class=notice>But the memory falls out of your reach.</span>")
qdel(src)
/datum/component/dejavu/proc/rewind_living()
var/mob/living/master = parent
master.setCloneLoss(clone_loss)
master.setToxLoss(tox_loss)
master.setOxyLoss(oxy_loss)
master.setOrganLoss(ORGAN_SLOT_BRAIN, brain_loss)
rewind()
/datum/component/dejavu/proc/rewind_carbon()
if(saved_bodyparts)
var/mob/living/carbon/master = parent
master.apply_saved_bodyparts(saved_bodyparts)
rewind_living()
/datum/component/dejavu/proc/rewind_animal()
var/mob/living/simple_animal/master = parent
master.bruteloss = brute_loss
master.updatehealth()
rewind_living()
/datum/component/dejavu/proc/rewind_obj()
var/obj/master = parent
master.obj_integrity = integrity
rewind()
+12 -2
View File
@@ -236,7 +236,12 @@
G.fields["fingerprint"] = md5(H.dna.uni_identity)
G.fields["p_stat"] = "Active"
G.fields["m_stat"] = "Stable"
G.fields["sex"] = H.gender
if(H.gender == MALE)
G.fields["gender"] = "Male"
else if(H.gender == FEMALE)
G.fields["gender"] = "Female"
else
G.fields["gender"] = "Other"
G.fields["photo_front"] = photo_front
G.fields["photo_side"] = photo_side
general += G
@@ -274,7 +279,12 @@
L.fields["name"] = H.real_name
L.fields["rank"] = H.mind.assigned_role
L.fields["age"] = H.age
L.fields["sex"] = H.gender
if(H.gender == MALE)
G.fields["gender"] = "Male"
else if(H.gender == FEMALE)
G.fields["gender"] = "Female"
else
G.fields["gender"] = "Other"
L.fields["blood_type"] = H.dna.blood_type
L.fields["b_dna"] = H.dna.unique_enzymes
L.fields["enzymes"] = H.dna.struc_enzymes
@@ -41,7 +41,7 @@ Bonus
suppress_warning = TRUE
/datum/symptom/choking/Activate(datum/disease/advance/A)
if(!..())
if(!..() || HAS_TRAIT(A.affected_mob,TRAIT_NOBREATH))
return
var/mob/living/M = A.affected_mob
switch(A.stage)
@@ -112,7 +112,7 @@ Bonus
power = 2
/datum/symptom/asphyxiation/Activate(datum/disease/advance/A)
if(!..())
if(!..() || HAS_TRAIT(A.affected_mob,TRAIT_NOBREATH))
return
var/mob/living/M = A.affected_mob
switch(A.stage)
@@ -50,7 +50,7 @@ BONUS
symptom_delay_max = 10
/datum/symptom/cough/Activate(datum/disease/advance/A)
if(!..())
if(!..() || HAS_TRAIT(A.affected_mob,TRAIT_NOBREATH))
return
var/mob/living/M = A.affected_mob
switch(A.stage)
@@ -39,7 +39,7 @@ Bonus
suppress_warning = TRUE
/datum/symptom/sneeze/Activate(datum/disease/advance/A)
if(!..())
if(!..() || HAS_TRAIT(A.affected_mob,TRAIT_NOBREATH))
return
var/mob/living/M = A.affected_mob
switch(A.stage)
+28 -3
View File
@@ -92,7 +92,15 @@
. = ""
var/list/L = new /list(DNA_UNI_IDENTITY_BLOCKS)
L[DNA_GENDER_BLOCK] = construct_block((holder.gender!=MALE)+1, 2)
switch(holder.gender)
if(MALE)
L[DNA_GENDER_BLOCK] = construct_block(G_MALE, 4)
if(FEMALE)
L[DNA_GENDER_BLOCK] = construct_block(G_FEMALE, 4)
if(PLURAL)
L[DNA_GENDER_BLOCK] = construct_block(G_PLURAL, 4)
else
L[DNA_GENDER_BLOCK] = construct_block(G_NEUTER, 4)
if(ishuman(holder))
var/mob/living/carbon/human/H = holder
if(!GLOB.hair_styles_list.len)
@@ -165,7 +173,15 @@
if(DNA_EYE_COLOR_BLOCK)
setblock(uni_identity, blocknumber, sanitize_hexcolor(H.eye_color))
if(DNA_GENDER_BLOCK)
setblock(uni_identity, blocknumber, construct_block((H.gender!=MALE)+1, 2))
switch(H.gender)
if(MALE)
setblock(uni_identity, blocknumber, construct_block(G_MALE, 4))
if(FEMALE)
setblock(uni_identity, blocknumber, construct_block(G_FEMALE, 4))
if(PLURAL)
setblock(uni_identity, blocknumber, construct_block(G_PLURAL, 4))
else
setblock(uni_identity, blocknumber, construct_block(G_NEUTER, 4))
if(DNA_FACIAL_HAIR_STYLE_BLOCK)
setblock(uni_identity, blocknumber, construct_block(GLOB.facial_hair_styles_list.Find(H.facial_hair_style), GLOB.facial_hair_styles_list.len))
if(DNA_HAIR_STYLE_BLOCK)
@@ -307,7 +323,16 @@
/mob/living/carbon/proc/updateappearance(icon_update=1, mutcolor_update=0, mutations_overlay_update=0)
if(!has_dna())
return
gender = (deconstruct_block(getblock(dna.uni_identity, DNA_GENDER_BLOCK), 2)-1) ? FEMALE : MALE
switch(deconstruct_block(getblock(dna.uni_identity, DNA_GENDER_BLOCK), 4))
if(G_MALE)
gender = MALE
if(G_FEMALE)
gender = FEMALE
if(G_PLURAL)
gender = PLURAL
else
gender = NEUTER
/mob/living/carbon/human/updateappearance(icon_update=1, mutcolor_update=0, mutations_overlay_update=0)
..()
@@ -0,0 +1,28 @@
/datum/element/dusts_on_leaving_area
element_flags = ELEMENT_DETACH | ELEMENT_BESPOKE
id_arg_index = 2
var/list/attached_mobs = list()
var/list/area_types = list()
/datum/element/dusts_on_leaving_area/Attach(datum/target,types)
. = ..()
if(!ismob(target))
return ELEMENT_INCOMPATIBLE
attached_mobs += target
area_types = types
START_PROCESSING(SSprocessing,src)
/datum/element/dusts_on_leaving_area/Detach(mob/M)
. = ..()
if(M in attached_mobs)
attached_mobs -= M
if(!attached_mobs.len)
STOP_PROCESSING(SSprocessing,src)
/datum/element/dusts_on_leaving_area/process()
for(var/m in attached_mobs)
var/mob/M = m
var/area/A = get_area(M)
if(!(A.type in area_types))
M.dust(force = TRUE)
Detach(M)
+1 -1
View File
@@ -132,7 +132,7 @@
//CIT CHANGE - makes arousal update when transfering bodies
if(isliving(new_character)) //New humans and such are by default enabled arousal. Let's always use the new mind's prefs.
var/mob/living/L = new_character
if(L.client && L.client.prefs & L.client.prefs.auto_ooc & L.client.prefs.chat_toggles & CHAT_OOC)
if(L.client?.prefs && L.client.prefs.auto_ooc && L.client.prefs.chat_toggles & CHAT_OOC)
DISABLE_BITFIELD(L.client.prefs.chat_toggles,CHAT_OOC)
SEND_SIGNAL(src, COMSIG_MIND_TRANSFER, new_character, old_character)
+7
View File
@@ -34,3 +34,10 @@
id = "engine_tesla"
suffix = "Box/Engine/engine_tesla.dmm"
name = "Box Tesla"
// Lavaland
// Mining Base
/datum/map_template/ruin/station/lavaland/mining_base
id = "mining_public_01"
suffix = "Lavaland/Mining_Station/Mining_Station_Public_01.dmm"
name = "Public Mining Base"
+4 -5
View File
@@ -201,13 +201,12 @@
medical_record_text = "Patient's blood tests report an abnormal concentration of red blood cells in their bloodstream."
/datum/quirk/bloodpressure/add()
var/mob/living/M = quirk_holder
M.blood_ratio = 1.2
M.blood_volume += 150
quirk_holder.blood_ratio = 1.2
quirk_holder.blood_volume += 150
/datum/quirk/bloodpressure/remove()
var/mob/living/M = quirk_holder
M.blood_ratio = 1
if(quirk_holder)
quirk_holder.blood_ratio = 1
/datum/quirk/night_vision
name = "Night Vision"
+9
View File
@@ -400,3 +400,12 @@
/datum/quirk/blindness/remove()
quirk_holder?.cure_blind(ROUNDSTART_TRAIT)
/datum/quirk/coldblooded
name = "Cold-blooded"
desc = "Your body doesn't create its own internal heat, requiring external heat regulation."
value = -2
medical_record_text = "Patient is ectothermic."
mob_trait = TRAIT_COLDBLOODED
gain_text = "<span class='notice'>You feel cold-blooded.</span>"
lose_text = "<span class='notice'>You feel more warm-blooded.</span>"
-9
View File
@@ -104,15 +104,6 @@
gain_text = "<span class='notice'>You desire to be hurt.</span>"
lose_text = "<span class='notice'>Pain has become less exciting for you.</span>"
/datum/quirk/coldblooded
name = "Cold-blooded"
desc = "Your body doesn't create its own internal heat, requiring external heat regulation."
value = 0
medical_record_text = "Patient is ectothermic."
mob_trait = TRAIT_COLDBLOODED
gain_text = "<span class='notice'>You feel cold-blooded.</span>"
lose_text = "<span class='notice'>You feel more warm-blooded.</span>"
/datum/quirk/alcohol_intolerance
name = "Alcohol Intolerance"
desc = "You take toxin damage from alcohol rather than getting drunk."
+2 -2
View File
@@ -163,7 +163,7 @@
/atom/movable/proc/Move_Pulled(atom/A)
if(!pulling)
return
if(pulling.anchored || !pulling.Adjacent(src))
if(pulling.anchored || pulling.move_resist > move_force || !pulling.Adjacent(src))
stop_pulling()
return
if(isliving(pulling))
@@ -190,7 +190,7 @@
log_game("DEBUG:[src]'s pull on [pullee] wasn't broken despite [pullee] being in [pullee.loc]. Pull stopped manually.")
stop_pulling()
return
if(pulling.anchored)
if(pulling.anchored || pulling.move_resist > move_force)
stop_pulling()
return
+6 -11
View File
@@ -4,7 +4,7 @@
//Potential replacement for genetics revives or something I dunno (?)
#define CLONE_INITIAL_DAMAGE 150 //Clones in clonepods start with 150 cloneloss damage and 150 brainloss damage, thats just logical
#define MINIMUM_HEAL_LEVEL 40
#define MINIMUM_HEAL_LEVEL 20
#define SPEAK(message) radio.talk_into(src, message, radio_channel)
@@ -61,18 +61,15 @@
QDEL_LIST(unattached_flesh)
. = ..()
/obj/machinery/clonepod/RefreshParts()
/obj/machinery/clonepod/RefreshParts()
speed_coeff = 0
efficiency = 0
for(var/obj/item/stock_parts/scanning_module/S in component_parts)
efficiency += S.rating
for(var/obj/item/stock_parts/manipulator/P in component_parts)
speed_coeff += P.rating
heal_level = (efficiency * 15) + 10
if(heal_level < MINIMUM_HEAL_LEVEL)
heal_level = MINIMUM_HEAL_LEVEL
if(heal_level > 100)
heal_level = 100
speed_coeff += (P.rating / 2)
speed_coeff = max(1, speed_coeff)
heal_level = CLAMP((efficiency * 10) + 10, MINIMUM_HEAL_LEVEL, 100)
//The return of data disks?? Just for transferring between genetics machine/cloning machine.
//TO-DO: Make the genetics machine accept them.
@@ -169,9 +166,7 @@
var/mob/living/carbon/human/H = new /mob/living/carbon/human(src)
H.hardset_dna(ui, se, H.real_name, null, mrace, features)
if(prob(50 - efficiency*10)) //Chance to give a bad mutation.
H.randmutb() //100% bad mutation. Can be cured with mutadone.
H.randmutb() //100% bad mutation. Can be cured with mutadone.
H.silent = 20 //Prevents an extreme edge case where clones could speak if they said something at exactly the right moment.
occupant = H
+3 -3
View File
@@ -181,6 +181,9 @@
if(component_check)
P.play_tool_sound(src)
var/obj/machinery/new_machine = new circuit.build_path(loc)
if(new_machine.circuit)
QDEL_NULL(new_machine.circuit)
new_machine.circuit = circuit
new_machine.setAnchored(anchored)
new_machine.on_construction()
for(var/obj/O in new_machine.component_parts)
@@ -189,9 +192,6 @@
for(var/obj/O in src)
O.moveToNullspace()
new_machine.component_parts += O
if(new_machine.circuit)
QDEL_NULL(new_machine.circuit)
new_machine.circuit = circuit
circuit.moveToNullspace()
new_machine.RefreshParts()
qdel(src)
+4 -5
View File
@@ -406,12 +406,11 @@
lying_prev = 0
/obj/machinery/jukebox/proc/dance_over()
SSjukeboxes.removejukebox(SSjukeboxes.findjukeboxindex(src))
var/position = SSjukeboxes.findjukeboxindex(src)
if(!position)
return
SSjukeboxes.removejukebox(position)
STOP_PROCESSING(SSobj, src)
for(var/mob/living/L in rangers)
if(!L || !L.client)
continue
L.stop_sound_channel(CHANNEL_JUKEBOX)
rangers = list()
/obj/machinery/jukebox/disco/dance_over()
+2 -4
View File
@@ -75,8 +75,7 @@ Buildable meters
new_layer = PIPING_LAYER_DEFAULT
piping_layer = new_layer
pixel_x += (piping_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X
pixel_y += (piping_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_Y
PIPING_LAYER_SHIFT(src, piping_layer)
layer = initial(layer) + ((piping_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_LCHANGE)
/obj/item/pipe/proc/update()
@@ -232,5 +231,4 @@ Buildable meters
/obj/item/pipe_meter/proc/setAttachLayer(new_layer = PIPING_LAYER_DEFAULT)
piping_layer = new_layer
pixel_x = (new_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X
pixel_y = (new_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_Y
PIPING_LAYER_DOUBLE_SHIFT(src, piping_layer)
+5
View File
@@ -49,6 +49,7 @@
var/lights = FALSE
var/lights_power = 6
var/last_user_hud = 1 // used to show/hide the mecha hud while preserving previous preference
var/completely_disabled = FALSE //stops the mech from doing anything
var/breach_time = 0
var/recharge_rate = 0
@@ -431,6 +432,8 @@
return
if(!locate(/turf) in list(target,target.loc)) // Prevents inventory from being drilled
return
if(completely_disabled)
return
if(phasing)
occupant_message("Unable to interact with objects while phasing")
return
@@ -508,6 +511,8 @@
return 1
/obj/mecha/relaymove(mob/user,direction)
if(completely_disabled)
return
if(!direction)
return
if(user != occupant) //While not "realistic", this piece is player friendly.
@@ -48,6 +48,8 @@ would spawn and follow the beaker, even if it is carried or thrown.
holder = atom
/datum/effect_system/proc/start()
if(QDELETED(src))
return
for(var/i in 1 to number)
if(total_effects > 20)
return
@@ -69,7 +71,8 @@ would spawn and follow the beaker, even if it is carried or thrown.
for(var/j in 1 to steps_amt)
sleep(5)
step(E,direction)
addtimer(CALLBACK(src, .proc/decrement_total_effect), 20)
if(!QDELETED(src))
addtimer(CALLBACK(src, .proc/decrement_total_effect), 20)
/datum/effect_system/proc/decrement_total_effect()
total_effects--
+5
View File
@@ -481,3 +481,8 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player)
/obj/effect/landmark/stationroom/box/engine/New()
. = ..()
templates = CONFIG_GET(keyed_list/box_random_engine)
// Landmark for the mining station
/obj/effect/landmark/stationroom/lavaland/station
templates = list("Public Mining Base" = 3)
icon = 'icons/rooms/Lavaland/Mining.dmi'
@@ -39,4 +39,8 @@
/obj/effect/projectile/impact/laser/wavemotion
name = "particle impact"
icon_state = "impact_wavemotion"
icon_state = "impact_wavemotion"
/obj/effect/projectile/impact/laser/emitter
name = "emitter impact"
icon_state = "impact_emitter"
@@ -31,4 +31,8 @@
/obj/effect/projectile/muzzle/laser/wavemotion
name = "particle backblast"
icon_state = "muzzle_wavemotion"
icon_state = "muzzle_wavemotion"
/obj/effect/projectile/muzzle/laser/emitter
name = "emitter flash"
icon_state = "muzzle_emitter"
@@ -70,3 +70,7 @@
/obj/effect/projectile/tracer/laser/wavemotion
name = "particle trail"
icon_state = "tracer_wavemotion"
/obj/effect/projectile/tracer/laser/emitter
name = "emitter beam"
icon_state = "emitter"
+10 -5
View File
@@ -329,7 +329,8 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
/obj/item/pipe_dispenser/pre_attack(atom/A, mob/user)
if(!user.IsAdvancedToolUser() || istype(A, /turf/open/space/transit))
var/turf/T = get_turf(A)
if(!user.IsAdvancedToolUser() || !T || istype(T, /turf/open/space/transit) || isindestructiblewall(T))
return ..()
//So that changing the menu settings doesn't affect the pipes already being built.
@@ -376,12 +377,16 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
if(ATMOS_CATEGORY) //Making pipes
if(!can_make_pipe)
return ..()
A = T
if(is_type_in_typecache(recipe, GLOB.ventcrawl_machinery) && isclosedturf(A)) //wall escapism sanity check.
to_chat(user, "<span class='warning'>[src]'s error light flickers; there's something in the way!</span>")
return
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if (recipe.type == /datum/pipe_info/meter)
to_chat(user, "<span class='notice'>You start building a meter...</span>")
if(do_after(user, atmos_build_speed, target = A))
activate()
var/obj/item/pipe_meter/PM = new /obj/item/pipe_meter(get_turf(A))
var/obj/item/pipe_meter/PM = new /obj/item/pipe_meter(A)
PM.setAttachLayer(piping_layer)
if(mode&WRENCH_MODE)
PM.wrench_act(user, src)
@@ -391,7 +396,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
activate()
var/obj/machinery/atmospherics/path = queued_p_type
var/pipe_item_type = initial(path.construction_type) || /obj/item/pipe
var/obj/item/pipe/P = new pipe_item_type(get_turf(A), queued_p_type, queued_p_dir)
var/obj/item/pipe/P = new pipe_item_type(A, queued_p_type, queued_p_dir)
if(queued_p_flipped && istype(P, /obj/item/pipe/trinary/flippable))
var/obj/item/pipe/trinary/flippable/F = P
@@ -408,7 +413,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
if(DISPOSALS_CATEGORY) //Making disposals pipes
if(!can_make_pipe)
return ..()
A = get_turf(A)
A = T
if(isclosedturf(A))
to_chat(user, "<span class='warning'>[src]'s error light flickers; there's something in the way!</span>")
return
@@ -433,7 +438,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
if(TRANSIT_CATEGORY) //Making transit tubes
if(!can_make_pipe)
return ..()
A = get_turf(A)
A = T
if(isclosedturf(A))
to_chat(user, "<span class='warning'>[src]'s error light flickers; there's something in the way!</span>")
return
@@ -308,6 +308,7 @@
/obj/item/circuitboard/machine/thermomachine
name = "Thermomachine (Machine Board)"
desc = "You can use a screwdriver to switch between heater and freezer."
var/pipe_layer = PIPING_LAYER_DEFAULT
req_components = list(
/obj/item/stock_parts/matter_bin = 2,
/obj/item/stock_parts/micro_laser = 2,
@@ -342,8 +343,18 @@
build_path = initial(new_type.build_path)
I.play_tool_sound(src)
to_chat(user, "<span class='notice'>You change the circuitboard setting to \"[new_setting]\".</span>")
else
return ..()
return
if(I.tool_behaviour == TOOL_MULTITOOL)
pipe_layer = (pipe_layer >= PIPING_LAYER_MAX) ? PIPING_LAYER_MIN : (pipe_layer + 1)
to_chat(user, "<span class='notice'>You change the circuitboard to layer [pipe_layer].</span>")
return
. = ..()
/obj/item/circuitboard/machine/thermomachine/examine()
. = ..()
. += "<span class='notice'>It is set to layer [pipe_layer].</span>"
/obj/item/circuitboard/machine/thermomachine/heater
name = "Heater (Machine Board)"
+9 -8
View File
@@ -452,14 +452,15 @@
return TRUE
/obj/item/twohanded/shockpaddles/proc/shock_touching(dmg, mob/H)
if(req_defib)
if(defib.pullshocksafely && isliving(H.pulledby))
H.visible_message("<span class='danger'>The defibrillator safely discharges the excessive charge into the floor!</span>")
else
var/mob/living/M = H.pulledby
if(M.electrocute_act(30, src))
M.visible_message("<span class='danger'>[M] is electrocuted by [M.p_their()] contact with [H]!</span>")
M.emote("scream")
if(!H.pulledby || !isliving(H.pulledby))
return
if(req_defib && defib.pullshocksafely)
H.visible_message("<span class='danger'>The defibrillator safely discharges the excessive charge into the floor!</span>")
return
var/mob/living/M = H.pulledby
if(M.electrocute_act(30, src))
M.visible_message("<span class='danger'>[M] is electrocuted by [M.p_their()] contact with [H]!</span>")
M.emote("scream")
/obj/item/twohanded/shockpaddles/proc/do_disarm(mob/living/M, mob/living/user)
if(req_defib && defib.safety)
+46 -11
View File
@@ -93,6 +93,8 @@ GLOBAL_LIST_EMPTY(PDAs)
var/underline_flag = TRUE //flag for underline
var/list/blocked_pdas
/obj/item/pda/suicide_act(mob/living/carbon/user)
var/deathMessage = msg_input(user)
if (!deathMessage)
@@ -387,7 +389,10 @@ GLOBAL_LIST_EMPTY(PDAs)
for (var/obj/item/pda/P in sortNames(get_viewable_pdas()))
if (P == src)
continue
dat += "<li><a href='byond://?src=[REF(src)];choice=Message;target=[REF(P)]'>[P]</a>"
if(P.owner in blocked_pdas)
dat += "<li><a href='byond://?src=[REF(src)];choice=unblock_pda;target=[P.owner]'>(BLOCKED - CLICK TO UNBLOCK) [P]</a>"
else
dat += "<li><a href='byond://?src=[REF(src)];choice=Message;target=[REF(P)]'>[P]</a>"
if(cartridge)
dat += cartridge.message_special(P)
dat += "</li>"
@@ -646,6 +651,15 @@ GLOBAL_LIST_EMPTY(PDAs)
if("MessageAll")
send_to_all(U)
if("toggle_block")
toggle_blocking(usr, href_list["target"])
if("block_pda")
block_pda(usr, href_list["target"])
if("unblock_pda")
unblock_pda(usr, href_list["target"])
if("cart")
if(cartridge)
cartridge.special(U, href_list)
@@ -744,9 +758,16 @@ GLOBAL_LIST_EMPTY(PDAs)
message += "\nSent from my PDA"
// Send the signal
var/list/string_targets = list()
for (var/obj/item/pda/P in targets)
if (P.owner && P.ownjob) // != src is checked by the UI
var/list/string_blocked
for(var/obj/item/pda/P in targets)
if(owner in P.blocked_pdas)
LAZYADD(string_blocked, P.owner)
continue
if(P.owner && P.ownjob) // != src is checked by the UI
string_targets += "[P.owner] ([P.ownjob])"
if(string_blocked)
string_blocked = english_list(string_blocked)
to_chat(user, "<span class='warning'>[icon2html(src, user)] The following recipients have blocked your message: [string_blocked].</span>")
for (var/obj/machinery/computer/message_monitor/M in targets)
// In case of "Reply" to a message from a console, this will make the
// message be logged successfully. If the console is impersonating
@@ -779,12 +800,13 @@ GLOBAL_LIST_EMPTY(PDAs)
tnote += "<i><b>&rarr; To [target_text]:</b></i><br>[signal.format_message()]<br>"
// Show it to ghosts
var/ghost_message = "<span class='name'>[owner] </span><span class='game say'>PDA Message</span> --> <span class='name'>[target_text]</span>: <span class='message'>[signal.format_message(TRUE)]</span>"
for(var/mob/M in GLOB.player_list)
if(isobserver(M) && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTPDA))
for(var/i in GLOB.dead_mob_list)
var/mob/M = i
if(M?.client && M.client.prefs.chat_toggles & CHAT_GHOSTPDA)
to_chat(M, "[FOLLOW_LINK(M, user)] [ghost_message]")
// Log in the talk log
user.log_talk(message, LOG_PDA, tag="PDA: [initial(name)] to [target_text]")
to_chat(user, "<span class='info'>Message sent to [target_text]: \"[emoji_message]\"</span>")
// Log in the talk log
user.log_talk(message, LOG_PDA, tag="PDA: [initial(name)] to [target_text] (BLOCKED:[string_blocked])")
if (!silent)
playsound(src, 'sound/machines/terminal_success.ogg', 15, 1)
// Reset the photo
@@ -794,8 +816,7 @@ GLOBAL_LIST_EMPTY(PDAs)
last_everyone = world.time
/obj/item/pda/proc/receive_message(datum/signal/subspace/pda/signal)
tnote += "<i><b>&larr; From <a href='byond://?src=[REF(src)];choice=Message;target=[REF(signal.source)]'>[signal.data["name"]]</a> ([signal.data["job"]]):</b></i><br>[signal.format_message()]<br>"
tnote += "<i><b>&larr; From <a href='byond://?src=[REF(src)];choice=Message;target=[REF(signal.source)]'>[signal.data["name"]]</a> ([signal.data["job"]]):</b></i> <a href='byond://?src=[REF(src)];choice=toggle_block;target=[signal.data["name"]]'>(BLOCK/UNBLOCK)</a><br>[signal.format_message()]<br>"
if (!silent)
playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
audible_message("[icon2html(src, hearers(src))] *[ttone]*", null, 3)
@@ -814,7 +835,7 @@ GLOBAL_LIST_EMPTY(PDAs)
hrefstart = "<a href='?src=[REF(L)];track=[html_encode(signal.data["name"])]'>"
hrefend = "</a>"
to_chat(L, "[icon2html(src)] <b>Message from [hrefstart][signal.data["name"]] ([signal.data["job"]])[hrefend], </b>[signal.format_message(TRUE)] (<a href='byond://?src=[REF(src)];choice=Message;skiprefresh=1;target=[REF(signal.source)]'>Reply</a>)")
to_chat(L, "[icon2html(src)] <b>Message from [hrefstart][signal.data["name"]] ([signal.data["job"]])[hrefend], </b>[signal.format_message(TRUE)] (<a href='byond://?src=[REF(src)];choice=Message;skiprefresh=1;target=[REF(signal.source)]'>Reply</a>) <a href='byond://?src=[REF(src)];choice=toggle_block;target=[signal.data["name"]]'>(BLOCK/UNBLOCK)</a>")
update_icon(TRUE)
@@ -827,6 +848,20 @@ GLOBAL_LIST_EMPTY(PDAs)
/obj/item/pda/proc/create_message(mob/living/U, obj/item/pda/P)
send_message(U,list(P))
/obj/item/pda/proc/toggle_blocking(mob/user, target)
if(target in blocked_pdas)
unblock_pda(user, target)
else
block_pda(user, target)
/obj/item/pda/proc/block_pda(mob/user, target)
to_chat(user, "<span class='notice'>[icon2html(src, user)] [target] blocked from messages. Use the messenger PDA list to unblock.</span>")
LAZYOR(blocked_pdas, target)
/obj/item/pda/proc/unblock_pda(mob/user, target)
to_chat(user, "<span class='notice'>[icon2html(src, user)] [target] unblocked from messages.</span>")
LAZYREMOVE(blocked_pdas, target)
/obj/item/pda/AltClick(mob/user)
. = ..()
if(id)
@@ -1172,4 +1207,4 @@ GLOBAL_LIST_EMPTY(PDAs)
#undef PDA_OVERLAY_ID
#undef PDA_OVERLAY_ITEM
#undef PDA_OVERLAY_LIGHT
#undef PDA_OVERLAY_PAI
#undef PDA_OVERLAY_PAI
+2 -2
View File
@@ -326,7 +326,7 @@ Code:
if(active1 in GLOB.data_core.general)
menu += "Name: [active1.fields["name"]] ID: [active1.fields["id"]]<br>"
menu += "Sex: [active1.fields["sex"]]<br>"
menu += "Sex: [active1.fields["gender"]]<br>"
menu += "Age: [active1.fields["age"]]<br>"
menu += "Rank: [active1.fields["rank"]]<br>"
menu += "Fingerprint: [active1.fields["fingerprint"]]<br>"
@@ -370,7 +370,7 @@ Code:
if(active1 in GLOB.data_core.general)
menu += "Name: [active1.fields["name"]] ID: [active1.fields["id"]]<br>"
menu += "Sex: [active1.fields["sex"]]<br>"
menu += "Sex: [active1.fields["gender"]]<br>"
menu += "Age: [active1.fields["age"]]<br>"
menu += "Rank: [active1.fields["rank"]]<br>"
menu += "Fingerprint: [active1.fields["fingerprint"]]<br>"
@@ -1,6 +1,6 @@
/obj/item/forcefield_projector
name = "forcefield projector"
desc = "An experimental device that can create several forcefields at a distance."
desc = "An experimental device that can create several forcefields at a short distance."
icon = 'icons/obj/device.dmi'
icon_state = "signmaker_forcefield"
slot_flags = ITEM_SLOT_BELT
@@ -14,7 +14,7 @@
var/shield_integrity = 250
var/max_fields = 3
var/list/current_fields
var/field_distance_limit = 7
var/field_distance_limit = 2
/obj/item/forcefield_projector/afterattack(atom/target, mob/user, proximity_flag)
. = ..()
@@ -26,6 +26,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
slot_flags = ITEM_SLOT_EARS
var/obj/item/encryptionkey/keyslot2 = null
dog_fashion = null
var/bowman = FALSE
/obj/item/radio/headset/suicide_act(mob/living/carbon/user)
user.visible_message("<span class='suicide'>[user] begins putting \the [src]'s antenna up [user.p_their()] nose! It looks like [user.p_theyre()] trying to give [user.p_them()]self cancer!</span>")
@@ -52,6 +53,11 @@ GLOBAL_LIST_INIT(channel_tokens, list(
else
. += "<span class='notice'>A small screen on the headset flashes, it's too small to read without holding or wearing the headset.</span>"
/obj/item/radio/headset/ComponentInitialize()
. = ..()
if (bowman)
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS))
/obj/item/radio/headset/Initialize()
. = ..()
recalculateChannels()
@@ -81,10 +87,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
desc = "A syndicate headset that can be used to hear all radio frequencies. Protects ears from flashbangs."
icon_state = "syndie_headset"
item_state = "syndie_headset"
/obj/item/radio/headset/syndicate/alt/ComponentInitialize()
. = ..()
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS))
bowman = TRUE
/obj/item/radio/headset/syndicate/alt/leader
name = "team leader headset"
@@ -112,10 +115,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
desc = "This is used by your elite security force. Protects ears from flashbangs."
icon_state = "sec_headset_alt"
item_state = "sec_headset_alt"
/obj/item/radio/headset/headset_sec/alt/ComponentInitialize()
. = ..()
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS))
bowman = TRUE
/obj/item/radio/headset/headset_eng
name = "engineering radio headset"
@@ -161,10 +161,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
desc = "The headset of the boss. Protects ears from flashbangs."
icon_state = "com_headset_alt"
item_state = "com_headset_alt"
/obj/item/radio/headset/heads/captain/alt/ComponentInitialize()
. = ..()
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS))
bowman = TRUE
/obj/item/radio/headset/heads/rd
name = "\proper the research director's headset"
@@ -183,10 +180,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
desc = "The headset of the man in charge of keeping order and protecting the station. Protects ears from flashbangs."
icon_state = "com_headset_alt"
item_state = "com_headset_alt"
/obj/item/radio/headset/heads/hos/ComponentInitialize()
. = ..()
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS))
bowman = TRUE
/obj/item/radio/headset/heads/ce
name = "\proper the chief engineer's headset"
@@ -258,10 +252,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
icon_state = "cent_headset_alt"
item_state = "cent_headset_alt"
keyslot = null
/obj/item/radio/headset/headset_cent/alt/ComponentInitialize()
. = ..()
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS))
bowman = TRUE
/obj/item/radio/headset/ai
name = "\proper Integrated Subspace Transceiver "
@@ -273,7 +264,11 @@ GLOBAL_LIST_INIT(channel_tokens, list(
/obj/item/radio/headset/attackby(obj/item/W, mob/user, params)
user.set_machine(src)
if (istype(W,/obj/item/headsetupgrader))
if (!bowman)
to_chat(user,"<span class='notice'>You upgrade [src].</span>")
bowmanize()
qdel(W)
if(istype(W, /obj/item/screwdriver))
if(keyslot || keyslot2)
for(var/ch_name in channels)
@@ -341,3 +336,24 @@ GLOBAL_LIST_INIT(channel_tokens, list(
use_command = !use_command
to_chat(user, "<span class='notice'>You toggle high-volume mode [use_command ? "on" : "off"].</span>")
return TRUE
/obj/item/radio/headset/proc/bowmanize()
cut_overlays()
var/icon/yeas = icon(icon,icon_state)
icon_state = "antenna_alt"
var/mutable_appearance/center = mutable_appearance(icon,"center_alt")
center.color = yeas.GetPixel(15,18)
var/mutable_appearance/centeralt = mutable_appearance(icon,"centeralt_alt")
centeralt.color = yeas.GetPixel(14,22)
var/mutable_appearance/centercenter = mutable_appearance(icon,"centercenter_alt")
centercenter.color = yeas.GetPixel(13,19)
var/mutable_appearance/centerpixel = mutable_appearance(icon,"centerpixel_alt")
centerpixel.color = yeas.GetPixel(13,21)
add_overlay(center)
add_overlay(centeralt)
add_overlay(centercenter)
add_overlay(centerpixel)
name = replacetext(name,"headset", "bowman headset")
desc = "[desc] Protects ears from flashbangs."
bowman = TRUE
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS))
@@ -251,3 +251,9 @@ effective or pretty fucking useless.
else
GLOB.active_jammers -= src
update_icon()
/obj/item/headsetupgrader
name = "headset upgrader"
desc = "A tool that can be used to upgrade a normal headset to be able to protect from flashbangs."
icon = 'icons/obj/device.dmi'
icon_state = "headset_upgrade"
+1
View File
@@ -310,6 +310,7 @@
trap_damage = 0
item_flags = DROPDEL
flags_1 = NONE
breakouttime = 50
/obj/item/restraints/legcuffs/beartrap/energy/New()
..()
+33 -2
View File
@@ -10,7 +10,15 @@
*/
GLOBAL_LIST_INIT(glass_recipes, list ( \
new/datum/stack_recipe("directional window", /obj/structure/window/unanchored, time = 0, on_floor = TRUE, window_checks = TRUE), \
new/datum/stack_recipe("fulltile window", /obj/structure/window/fulltile/unanchored, 2, time = 0, on_floor = TRUE, window_checks = TRUE) \
new/datum/stack_recipe("fulltile window", /obj/structure/window/fulltile/unanchored, 2, time = 0, on_floor = TRUE, window_checks = TRUE), \
null, \
new/datum/stack_recipe_list("glass working bases", list( \
new/datum/stack_recipe("chem dish", /obj/item/glasswork/glass_base/dish, 10), \
new/datum/stack_recipe("lens", /obj/item/glasswork/glass_base/glass_lens, 15), \
new/datum/stack_recipe("spout flask", /obj/item/glasswork/glass_base/spouty, 20), \
new/datum/stack_recipe("small bulb flask", /obj/item/glasswork/glass_base/flask_small, 5), \
new/datum/stack_recipe("large bottle flask", /obj/item/glasswork/glass_base/flask_large, 15), \
)), \
))
/obj/item/stack/sheet/glass
@@ -26,6 +34,7 @@ GLOBAL_LIST_INIT(glass_recipes, list ( \
grind_results = list(/datum/reagent/silicon = 20)
point_value = 1
tableVariant = /obj/structure/table/glass
shard_type = /obj/item/shard
/obj/item/stack/sheet/glass/suicide_act(mob/living/carbon/user)
user.visible_message("<span class='suicide'>[user] begins to slice [user.p_their()] neck with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
@@ -93,6 +102,7 @@ GLOBAL_LIST_INIT(pglass_recipes, list ( \
merge_type = /obj/item/stack/sheet/plasmaglass
grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/toxin/plasma = 10)
tableVariant = /obj/structure/table/plasmaglass
shard_type = /obj/item/shard/plasma
/obj/item/stack/sheet/plasmaglass/fifty
amount = 50
@@ -120,7 +130,9 @@ GLOBAL_LIST_INIT(pglass_recipes, list ( \
else
return ..()
/obj/item/stack/sheet/plasmaglass/on_solar_construction(obj/machinery/power/solar/S)
S.obj_integrity *= 1.2
S.efficiency *= 1.2
/*
* Reinforced glass sheets
@@ -145,11 +157,15 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \
merge_type = /obj/item/stack/sheet/rglass
grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/iron = 10)
point_value = 4
shard_type = /obj/item/shard
/obj/item/stack/sheet/rglass/attackby(obj/item/W, mob/user, params)
add_fingerprint(user)
..()
/obj/item/stack/sheet/rglass/on_solar_construction(obj/machinery/power/solar/S)
S.obj_integrity *= 2
/obj/item/stack/sheet/rglass/cyborg
materials = list()
var/datum/robot_energy_storage/glasource
@@ -188,6 +204,11 @@ GLOBAL_LIST_INIT(prglass_recipes, list ( \
merge_type = /obj/item/stack/sheet/plasmarglass
grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/toxin/plasma = 10, /datum/reagent/iron = 10)
point_value = 23
shard_type = /obj/item/shard/plasma
/obj/item/stack/sheet/plasmarglass/on_solar_construction(obj/machinery/power/solar/S)
S.obj_integrity *= 2.2
S.efficiency *= 1.2
/obj/item/stack/sheet/plasmarglass/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.prglass_recipes
@@ -207,6 +228,11 @@ GLOBAL_LIST_INIT(titaniumglass_recipes, list(
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
resistance_flags = ACID_PROOF
merge_type = /obj/item/stack/sheet/titaniumglass
shard_type = /obj/item/shard
/obj/item/stack/sheet/titaniumglass/on_solar_construction(obj/machinery/power/solar/S)
S.obj_integrity *= 2.5
S.efficiency *= 1.5
/obj/item/stack/sheet/titaniumglass/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.titaniumglass_recipes
@@ -226,11 +252,16 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
resistance_flags = ACID_PROOF
merge_type = /obj/item/stack/sheet/plastitaniumglass
shard_type = /obj/item/shard
/obj/item/stack/sheet/plastitaniumglass/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.plastitaniumglass_recipes
return ..()
/obj/item/stack/sheet/titaniumglass/on_solar_construction(obj/machinery/power/solar/S)
S.obj_integrity *= 2
S.efficiency *= 2
/obj/item/shard
name = "shard"
desc = "A nasty looking shard of glass."
@@ -277,6 +277,9 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
recipes = GLOB.wood_recipes
return ..()
/obj/item/stack/sheet/mineral/wood/twenty
amount = 20
/obj/item/stack/sheet/mineral/wood/fifty
amount = 50
@@ -782,3 +785,4 @@ new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperfra
merge_type = /obj/item/stack/sheet/cotton/durathread
pull_effort = 70
loom_result = /obj/item/stack/sheet/durathread
@@ -15,4 +15,15 @@
var/point_value = 0 //turn-in value for the gulag stacker - loosely relative to its rarity
var/is_fabric = FALSE //is this a valid material for the loom?
var/loom_result //result from pulling on the loom
var/pull_effort = 0 //amount of delay when pulling on the loom
var/pull_effort = 0 //amount of delay when pulling on the loom
var/shard_type // the shard debris typepath left over by solar panels and windows etc.
/**
* Called on the glass sheet upon solar construction (duh):
* Different glass sheets can modify different stas/vars, such as obj_integrity or efficiency
* and possibly extra effects if you wish to code them.
* Keep in mind the solars' max_integrity is set equal to the obj_integrity later,
* so you won't have to do so here.
*/
/obj/item/stack/sheet/proc/on_solar_construction(/obj/machinery/power/solar/S)
return
@@ -233,39 +233,111 @@
turf_type = /turf/open/floor/carpet/royalblue
tableVariant = /obj/structure/table/wood/fancy/royalblue
/obj/item/stack/tile/carpet/ten
amount = 10
/obj/item/stack/tile/carpet/twenty
amount = 20
/obj/item/stack/tile/carpet/fifty
amount = 50
/obj/item/stack/tile/carpet/black/ten
amount = 10
/obj/item/stack/tile/carpet/black/twenty
amount = 20
/obj/item/stack/tile/carpet/black/fifty
amount = 50
/obj/item/stack/tile/carpet/blackred/ten
amount = 10
/obj/item/stack/tile/carpet/blackred/twenty
amount = 20
/obj/item/stack/tile/carpet/blackred/fifty
amount = 50
/obj/item/stack/tile/carpet/monochrome/ten
amount = 10
/obj/item/stack/tile/carpet/monochrome/twenty
amount = 20
/obj/item/stack/tile/carpet/monochrome/fifty
amount = 50
/obj/item/stack/tile/carpet/blue/ten
amount = 10
/obj/item/stack/tile/carpet/blue/twenty
amount = 20
/obj/item/stack/tile/carpet/blue/fifty
amount = 50
/obj/item/stack/tile/carpet/cyan/ten
amount = 10
/obj/item/stack/tile/carpet/cyan/twenty
amount = 20
/obj/item/stack/tile/carpet/cyan/fifty
amount = 50
/obj/item/stack/tile/carpet/green/ten
amount = 10
/obj/item/stack/tile/carpet/green/twenty
amount = 20
/obj/item/stack/tile/carpet/green/fifty
amount = 50
/obj/item/stack/tile/carpet/orange/ten
amount = 10
/obj/item/stack/tile/carpet/orange/twenty
amount = 20
/obj/item/stack/tile/carpet/orange/fifty
amount = 50
/obj/item/stack/tile/carpet/purple/ten
amount = 10
/obj/item/stack/tile/carpet/purple/twenty
amount = 20
/obj/item/stack/tile/carpet/purple/fifty
amount = 50
/obj/item/stack/tile/carpet/red/ten
amount = 10
/obj/item/stack/tile/carpet/red/twenty
amount = 20
/obj/item/stack/tile/carpet/red/fifty
amount = 50
/obj/item/stack/tile/carpet/royalblack/ten
amount = 10
/obj/item/stack/tile/carpet/royalblack/twenty
amount = 20
/obj/item/stack/tile/carpet/royalblack/fifty
amount = 50
/obj/item/stack/tile/carpet/royalblue/ten
amount = 10
/obj/item/stack/tile/carpet/royalblue/twenty
amount = 20
/obj/item/stack/tile/carpet/royalblue/fifty
amount = 50
+3 -3
View File
@@ -293,7 +293,7 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons)
desc = replacetext(desc, "robust", "safe")
desc = replacetext(desc, "heavier", "bouncier")
DISABLE_BITFIELD(flags_1, CONDUCT_1)
materials = null
materials = typelist("materials", null)
damtype = STAMINA
force += 3 //to compensate the higher stamina K.O. threshold compared to actual health.
throwforce += 3
@@ -317,8 +317,8 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons)
flags_1 = null
materials = null
damtype = STAMINA
force = 17
throwforce = 17
force = 15
throwforce = 15
attack_verb = list("robusted", "bounced")
can_rubberify = FALSE //we are already the future.
+4 -4
View File
@@ -25,8 +25,8 @@
*/
/obj/item/twohanded
var/wielded = 0
var/force_unwielded = 0
var/force_wielded = 0
var/force_unwielded // default to null, the number force will be set to on unwield()
var/force_wielded // same as above but for wield()
var/wieldsound = null
var/unwieldsound = null
var/slowdown_wielded = 0
@@ -73,7 +73,7 @@
to_chat(user, "<span class='warning'>You don't have enough intact hands.</span>")
return
wielded = 1
if(force_wielded)
if(!isnull(force_wielded))
force = force_wielded
name = "[name] (Wielded)"
update_icon()
@@ -738,7 +738,7 @@
on = !on
to_chat(user, "As you pull the starting cord dangling from [src], [on ? "it begins to whirr." : "the chain stops moving."]")
force = on ? force_on : initial(force)
throwforce = on ? force_on : initial(force)
throwforce = on ? force_on : force
icon_state = "chainsaw_[on ? "on" : "off"]"
var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering)
butchering.butchering_enabled = on
+1 -1
View File
@@ -178,7 +178,7 @@
machine = null
//called when the user unsets the machine.
/atom/movable/proc/on_unset_machine(mob/user)
/atom/proc/on_unset_machine(mob/user)
return
/mob/proc/set_machine(obj/O)
@@ -205,6 +205,9 @@
if(!mineral)
if(istype(G, /obj/item/stack/sheet/mineral) && G.sheettype)
var/M = G.sheettype
var/mineralassembly = text2path("/obj/structure/door_assembly/door_assembly_[M]")
if(!mineralassembly)
return
if(G.get_amount() >= 2)
playsound(src, 'sound/items/crowbar.ogg', 100, 1)
user.visible_message("[user] adds [G.name] to the airlock assembly.", \
@@ -214,7 +217,6 @@
return
to_chat(user, "<span class='notice'>You install [M] plating into the airlock assembly.</span>")
G.use(2)
var/mineralassembly = text2path("/obj/structure/door_assembly/door_assembly_[M]")
var/obj/structure/door_assembly/MA = new mineralassembly(loc)
transfer_assembly_vars(src, MA, TRUE)
else
+1 -1
View File
@@ -7,7 +7,7 @@
anchored = TRUE
icon = 'icons/turf/walls/wall.dmi'
icon_state = "wall"
layer = CLOSED_TURF_LAYER
layer = LOW_OBJ_LAYER
density = TRUE
opacity = 1
max_integrity = 100
@@ -619,7 +619,7 @@
assignedrole = "Ghost Cafe Visitor"
flavour_text = "Is this what life after death is like?"
skip_reentry_check = TRUE
banType = "ghostcafe"
banType = ROLE_GHOSTCAFE
/datum/action/toggle_dead_chat_mob
icon_icon = 'icons/mob/mob.dmi'
@@ -642,12 +642,14 @@
/obj/effect/mob_spawn/human/ghostcafe/special(mob/living/carbon/human/new_spawn)
if(new_spawn.client)
new_spawn.client.prefs.copy_to(new_spawn)
var/area/A = get_area(src)
var/datum/outfit/O = new /datum/outfit/ghostcafe()
O.equip(new_spawn, FALSE, new_spawn.client)
SSjob.equip_loadout(null, new_spawn, FALSE)
SSquirks.AssignQuirks(new_spawn, new_spawn.client, TRUE, TRUE, null, FALSE, new_spawn)
new_spawn.AddElement(/datum/element/ghost_role_eligibility)
new_spawn.AddElement(/datum/element/dusts_on_catatonia)
new_spawn.AddElement(/datum/element/dusts_on_leaving_area,list(A.type,/area/hilbertshotel))
ADD_TRAIT(new_spawn, TRAIT_SIXTHSENSE, GHOSTROLE_TRAIT)
ADD_TRAIT(new_spawn,TRAIT_EXEMPT_HEALTH_EVENTS,GHOSTROLE_TRAIT)
ADD_TRAIT(new_spawn,TRAIT_PACIFISM,GHOSTROLE_TRAIT)
+7 -2
View File
@@ -166,6 +166,9 @@
if(S.sheettype && S.sheettype != "runed")
var/M = S.sheettype
if(state == GIRDER_DISPLACED)
var/F = text2path("/obj/structure/falsewall/[M]")
if(!F)
return
if(S.get_amount() < 2)
to_chat(user, "<span class='warning'>You need at least two sheets to create a false wall!</span>")
return
@@ -174,11 +177,13 @@
return
S.use(2)
to_chat(user, "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>")
var/F = text2path("/obj/structure/falsewall/[M]")
var/obj/structure/FW = new F (loc)
transfer_fingerprints_to(FW)
qdel(src)
else
var/F = text2path("/turf/closed/wall/mineral/[M]")
if(!F)
return
if(S.get_amount() < 2)
to_chat(user, "<span class='warning'>You need at least two sheets to add plating!</span>")
return
@@ -189,7 +194,7 @@
S.use(2)
to_chat(user, "<span class='notice'>You add the plating.</span>")
var/turf/T = get_turf(src)
T.PlaceOnTop(text2path("/turf/closed/wall/mineral/[M]"))
T.PlaceOnTop(F)
transfer_fingerprints_to(T)
qdel(src)
return
+1 -1
View File
@@ -97,7 +97,7 @@
icon_state = "guillotine_raised"
/obj/structure/guillotine/proc/drop_blade(mob/user)
if (buckled_mobs.len && blade_sharpness)
if (has_buckled_mobs() && blade_sharpness)
var/mob/living/carbon/human/H = buckled_mobs[1]
if (!H)
+2 -2
View File
@@ -20,14 +20,14 @@
return
if(broken || !Adjacent(user))
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
//see code/modules/mob/dead/new_player/preferences.dm at approx line 545 for comments!
//this is largely copypasted from there.
//handle facial hair (if necessary)
if(H.gender == MALE)
if(H.gender != FEMALE)
var/new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in GLOB.facial_hair_styles_list
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return //no tele-grooming
+10 -19
View File
@@ -15,7 +15,8 @@
var/decon_speed = 30
var/wtype = "glass"
var/fulltile = FALSE
var/glass_type = /obj/item/stack/sheet/glass
var/obj/item/stack/sheet/glass_type = /obj/item/stack/sheet/glass
var/cleanable_type = /obj/effect/decal/cleanable/glass
var/glass_amount = 1
var/mutable_appearance/crack_overlay
can_be_unanchored = TRUE
@@ -277,12 +278,15 @@
/obj/structure/window/proc/spawnDebris(location)
. = list()
. += new /obj/item/shard(location)
. += new /obj/effect/decal/cleanable/glass(location)
var/shard = initial(glass_type.shard_type)
if(shard)
. += new shard(location)
if (fulltile)
. += new shard(location)
if(cleanable_type)
. += new cleanable_type(location)
if (reinf)
. += new /obj/item/stack/rods(location, (fulltile ? 2 : 1))
if (fulltile)
. += new /obj/item/shard(location)
/obj/structure/window/proc/can_be_rotated(mob/user,rotation_type)
if (get_dist(src,user) > 1)
@@ -416,17 +420,9 @@
max_integrity = 150
explosion_block = 1
glass_type = /obj/item/stack/sheet/plasmaglass
cleanable_type = /obj/effect/decal/cleanable/glass/plasma
rad_insulation = RAD_NO_INSULATION
/obj/structure/window/plasma/spawnDebris(location)
. = list()
. += new /obj/item/shard/plasma(location)
. += new /obj/effect/decal/cleanable/glass/plasma(location)
if (reinf)
. += new /obj/item/stack/rods(location, (fulltile ? 2 : 1))
if (fulltile)
. += new /obj/item/shard/plasma(location)
/obj/structure/window/plasma/spawner/east
dir = EAST
@@ -662,11 +658,6 @@
level = 3
glass_amount = 2
/obj/structure/window/reinforced/clockwork/spawnDebris(location)
. = list()
for(var/i in 1 to 4)
. += new /obj/item/clockwork/alloy_shards/medium/gear_bit(location)
/obj/structure/window/reinforced/clockwork/Initialize(mapload, direct)
made_glow = TRUE
new /obj/effect/temp_visual/ratvar/window(get_turf(src))
@@ -138,7 +138,8 @@
var/duration = (48/W.force) * 2 //In seconds, for now.
if(istype(W, /obj/item/hatchet) || istype(W, /obj/item/twohanded/fireaxe))
duration /= 4 //Much better with hatchets and axes.
if(do_after(user, duration*10, target=src)) //Into deciseconds.
var/src_type = type
if(do_after(user, duration*10, target=src) && type == src_type) //Into deciseconds.
dismantle_wall(FALSE,FALSE)
return
return ..()
+1 -1
View File
@@ -408,7 +408,7 @@
var/obj/item/organ/tail/cat/tail = new
ears.Insert(H, drop_if_replaced=FALSE)
tail.Insert(H, drop_if_replaced=FALSE)
var/list/honorifics = list("[MALE]" = list("kun"), "[FEMALE]" = list("chan","tan"), "[NEUTER]" = list("san")) //John Robust -> Robust-kun
var/list/honorifics = list("[MALE]" = list("kun"), "[FEMALE]" = list("chan","tan"), "[NEUTER]" = list("san"), "[PLURAL]" = list("san")) //John Robust -> Robust-kun
var/list/names = splittext(H.real_name," ")
var/forename = names.len > 1 ? names[2] : names[1]
var/newname = "[forename]-[pick(honorifics["[H.gender]"])]"
+7 -1
View File
@@ -845,7 +845,11 @@
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=[ROLE_LAVALAND];jobban4=[REF(M)]'><font color=red>Lavaland</font></a></td>"
else
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=[ROLE_LAVALAND];jobban4=[REF(M)]'>Lavaland</a></td>"
// Ghost cafe
if(jobban_isbanned(M,ROLE_GHOSTCAFE))
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=[ROLE_GHOSTCAFE];jobban4=[REF(M)]'><font color=red>Lavaland</font></a></td>"
else
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=[ROLE_GHOSTCAFE];jobban4=[REF(M)]'>Lavaland</a></td>"
dat += "</tr></table>"
//Antagonist (Orange)
@@ -2878,6 +2882,8 @@
return
if(SSdbcore.Connect())
var/datum/DBQuery/query_get_mentor = SSdbcore.NewQuery("SELECT id FROM [format_table_name("mentor")] WHERE ckey = '[ckey]'")
if(!query_get_mentor.warn_execute())
return
if(query_get_mentor.NextRow())
to_chat(usr, "<span class='danger'>[ckey] is already a mentor.</span>")
return
+1 -1
View File
@@ -419,7 +419,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(record_found)//If they have a record we can determine a few things.
new_character.real_name = record_found.fields["name"]
new_character.gender = record_found.fields["sex"]
new_character.gender = record_found.fields["gender"]
new_character.age = record_found.fields["age"]
new_character.hardset_dna(record_found.fields["identity"], record_found.fields["enzymes"], record_found.fields["name"], record_found.fields["blood_type"], new record_found.fields["species"], record_found.fields["features"])
else
@@ -629,15 +629,12 @@
icon_state = "abductor_headset"
item_state = "abductor_headset"
keyslot2 = new /obj/item/encryptionkey/heads/captain
bowman = TRUE
/obj/item/radio/headset/abductor/Initialize(mapload)
. = ..()
make_syndie()
/obj/item/radio/headset/abductor/ComponentInitialize()
. = ..()
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS))
/obj/item/radio/headset/abductor/attackby(obj/item/W, mob/user, params)
if(W.tool_behaviour == TOOL_SCREWDRIVER)
return // Stops humans from disassembling abductor headsets.
@@ -174,7 +174,7 @@
if(!GlandTest)
say("Experimental dissection not detected!")
return "<span class='bad'>No glands detected!</span>"
if(H.mind != null && H.ckey != null)
if(H.mind != null && (H.voluntary_ghosted || (H.ckey != null)))
LAZYINITLIST(abductee_minds)
LAZYADD(history, H)
LAZYADD(abductee_minds, H.mind)
@@ -70,6 +70,7 @@
resistance_flags = FIRE_PROOF | ACID_PROOF
armor = list("melee" = 60, "bullet" = 70, "laser" = -25, "energy" = 0, "bomb" = 60, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
allowed = list(/obj/item/clockwork, /obj/item/clothing/glasses/wraith_spectacles, /obj/item/clothing/glasses/judicial_visor, /obj/item/mmi/posibrain/soul_vessel, /obj/item/reagent_containers/food/drinks/bottle/holyoil)
mutantrace_variation = STYLE_DIGITIGRADE|STYLE_SNEK_TAURIC
/obj/item/clothing/suit/armor/clockwork/Initialize()
. = ..()
+1 -1
View File
@@ -22,7 +22,7 @@ Runes can either be invoked by one's self or with many different cultists. Each
icon = 'icons/obj/rune.dmi'
icon_state = "1"
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF
layer = LOW_OBJ_LAYER
layer = SIGIL_LAYER
color = RUNE_COLOR_RED
var/invocation = "Aiy ele-mayo." //This is said by cultists when the rune is invoked.
@@ -22,11 +22,19 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
desc = "You aren't entirely sure what this does, but it's very beepy and boopy."
background_icon_state = "bg_tech_blue"
icon_icon = 'icons/mob/actions/actions_AI.dmi'
check_flags = AB_CHECK_CONSCIOUS //can't doomsday if dead.
var/mob/living/silicon/ai/owner_AI //The owner AI, so we don't have to typecast every time
var/uses //If we have multiple uses of the same power
var/auto_use_uses = TRUE //If we automatically use up uses on each activation
var/cooldown_period //If applicable, the time in deciseconds we have to wait before using any more modules
/datum/action/innate/ai/New()
..()
if(uses > 1)
desc = "[desc] It has [uses] use\s remaining."
button.desc = desc
/datum/action/innate/ai/Grant(mob/living/L)
. = ..()
if(!isAI(owner))
@@ -38,7 +46,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
/datum/action/innate/ai/IsAvailable()
. = ..()
if(owner_AI && owner_AI.malf_cooldown > world.time)
return
return FALSE
/datum/action/innate/ai/Trigger()
. = ..()
@@ -49,12 +57,16 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
/datum/action/innate/ai/proc/adjust_uses(amt, silent)
uses += amt
if(!silent && uses)
to_chat(owner, "<span class='notice'>[name] now has <b>[uses]</b> use[uses > 1 ? "s" : ""] remaining.</span>")
if(!uses)
if(initial(uses) > 1) //no need to tell 'em if it was one-use anyway!
to_chat(owner, "<span class='warning'>[name] has run out of uses!</span>")
qdel(src)
if(uses)
if(!silent)
to_chat(owner, "<span class='notice'>[name] now has <b>[uses]</b> use[uses > 1 ? "s" : ""] remaining.</span>")
desc = "[initial(desc)] It has [uses] use\s remaining."
UpdateButtonIcon()
return
if(initial(uses) > 1) //no need to tell 'em if it was one-use anyway!
to_chat(owner, "<span class='warning'>[name] has run out of uses!</span>")
qdel(src)
//Framework for ranged abilities that can have different effects by left-clicking stuff.
/datum/action/innate/ai/ranged
@@ -74,13 +86,16 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
/datum/action/innate/ai/ranged/adjust_uses(amt, silent)
uses += amt
if(!silent && uses)
to_chat(owner, "<span class='notice'>[name] now has <b>[uses]</b> use[uses > 1 ? "s" : ""] remaining.</span>")
if(!uses)
if(initial(uses) > 1) //no need to tell 'em if it was one-use anyway!
to_chat(owner, "<span class='warning'>[name] has run out of uses!</span>")
Remove(owner)
QDEL_IN(src, 100) //let any active timers on us finish up
if(uses)
if(!silent)
to_chat(owner, "<span class='notice'>[name] now has <b>[uses]</b> use[uses > 1 ? "s" : ""] remaining.</span>")
desc = "[initial(desc)] It has [uses] use\s remaining."
UpdateButtonIcon()
return
if(initial(uses) > 1) //no need to tell 'em if it was one-use anyway!
to_chat(owner, "<span class='warning'>[name] has run out of uses!</span>")
Remove(owner)
QDEL_IN(src, 100) //let any active timers on us finish up
/datum/action/innate/ai/ranged/Destroy()
QDEL_NULL(linked_ability)
@@ -97,7 +112,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
var/datum/action/innate/ai/ranged/attached_action
/obj/effect/proc_holder/ranged_ai/Destroy()
QDEL_NULL(attached_action)
attached_action = null
return ..()
/obj/effect/proc_holder/ranged_ai/proc/toggle(mob/user)
@@ -185,6 +200,8 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
A.playsound_local(A, AM.unlock_sound, 50, 0)
else //Adding uses to an existing module
action.uses += initial(action.uses)
action.desc = "[initial(action.desc)] It has [action.uses] use\s remaining."
action.UpdateButtonIcon()
temp = "Additional use[action.uses > 1 ? "s" : ""] added to [action.name]!"
processing_time -= AM.cost
@@ -238,6 +255,8 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
return
if(alert(owner, "Send arming signal? (true = arm, false = cancel)", "purge_all_life()", "confirm = TRUE;", "confirm = FALSE;") != "confirm = TRUE;")
return
if (active)
return //prevent the AI from activating an already active doomsday
active = TRUE
set_us_up_the_bomb(owner)
@@ -245,64 +264,64 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
set waitfor = FALSE
to_chat(owner, "<span class='small boldannounce'>run -o -a 'selfdestruct'</span>")
sleep(5)
if(!owner || QDELETED(owner))
if(QDELETED(owner) || owner.stat == DEAD)
return
to_chat(owner, "<span class='small boldannounce'>Running executable 'selfdestruct'...</span>")
sleep(rand(10, 30))
if(!owner || QDELETED(owner))
if(QDELETED(owner) || owner.stat == DEAD)
return
owner.playsound_local(owner, 'sound/misc/bloblarm.ogg', 50, 0)
to_chat(owner, "<span class='userdanger'>!!! UNAUTHORIZED SELF-DESTRUCT ACCESS !!!</span>")
to_chat(owner, "<span class='boldannounce'>This is a class-3 security violation. This incident will be reported to Central Command.</span>")
for(var/i in 1 to 3)
sleep(20)
if(!owner || QDELETED(owner))
if(QDELETED(owner) || owner.stat == DEAD)
return
to_chat(owner, "<span class='boldannounce'>Sending security report to Central Command.....[rand(0, 9) + (rand(20, 30) * i)]%</span>")
sleep(3)
if(!owner || QDELETED(owner))
if(QDELETED(owner) || owner.stat == DEAD)
return
to_chat(owner, "<span class='small boldannounce'>auth 'akjv9c88asdf12nb' ******************</span>")
owner.playsound_local(owner, 'sound/items/timer.ogg', 50, 0)
sleep(30)
if(!owner || QDELETED(owner))
if(QDELETED(owner) || owner.stat == DEAD)
return
to_chat(owner, "<span class='boldnotice'>Credentials accepted. Welcome, akjv9c88asdf12nb.</span>")
owner.playsound_local(owner, 'sound/misc/server-ready.ogg', 50, 0)
sleep(5)
if(!owner || QDELETED(owner))
if(QDELETED(owner) || owner.stat == DEAD)
return
to_chat(owner, "<span class='boldnotice'>Arm self-destruct device? (Y/N)</span>")
owner.playsound_local(owner, 'sound/misc/compiler-stage1.ogg', 50, 0)
sleep(20)
if(!owner || QDELETED(owner))
if(QDELETED(owner) || owner.stat == DEAD)
return
to_chat(owner, "<span class='small boldannounce'>Y</span>")
sleep(15)
if(!owner || QDELETED(owner))
if(QDELETED(owner) || owner.stat == DEAD)
return
to_chat(owner, "<span class='boldnotice'>Confirm arming of self-destruct device? (Y/N)</span>")
owner.playsound_local(owner, 'sound/misc/compiler-stage2.ogg', 50, 0)
sleep(10)
if(!owner || QDELETED(owner))
if(QDELETED(owner) || owner.stat == DEAD)
return
to_chat(owner, "<span class='small boldannounce'>Y</span>")
sleep(rand(15, 25))
if(!owner || QDELETED(owner))
if(QDELETED(owner) || owner.stat == DEAD)
return
to_chat(owner, "<span class='boldnotice'>Please repeat password to confirm.</span>")
owner.playsound_local(owner, 'sound/misc/compiler-stage2.ogg', 50, 0)
sleep(14)
if(!owner || QDELETED(owner))
if(QDELETED(owner) || owner.stat == DEAD)
return
to_chat(owner, "<span class='small boldannounce'>******************</span>")
sleep(40)
if(!owner || QDELETED(owner))
if(QDELETED(owner) || owner.stat == DEAD)
return
to_chat(owner, "<span class='boldnotice'>Credentials accepted. Transmitting arming signal...</span>")
owner.playsound_local(owner, 'sound/misc/server-ready.ogg', 50, 0)
sleep(30)
if(!owner || QDELETED(owner))
if(QDELETED(owner) || owner.stat == DEAD)
return
priority_announce("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert", "aimalf")
set_security_level("delta")
@@ -724,9 +743,10 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
/datum/action/innate/ai/blackout
name = "Blackout"
desc = "Overloads lights across the station."
desc = "Overloads random lights across the station."
button_icon_state = "blackout"
uses = 3
auto_use_uses = FALSE
/datum/action/innate/ai/blackout/Activate()
for(var/obj/machinery/power/apc/apc in GLOB.apcs_list)
@@ -736,6 +756,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
apc.overload++
to_chat(owner, "<span class='notice'>Overcurrent applied to the powernet.</span>")
owner.playsound_local(owner, "sparks", 50, 0)
adjust_uses(-1)
//Disable Emergency Lights
@@ -784,11 +805,6 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
auto_use_uses = FALSE
cooldown_period = 30
/datum/action/innate/ai/reactivate_cameras/New()
..()
desc = "[desc] There are 30 reactivations remaining."
button.desc = desc
/datum/action/innate/ai/reactivate_cameras/Activate()
var/fixed_cameras = 0
for(var/V in GLOB.cameranet.cameras)
@@ -803,8 +819,6 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
to_chat(owner, "<span class='notice'>Diagnostic complete! Cameras reactivated: <b>[fixed_cameras]</b>. Reactivations remaining: <b>[uses]</b>.</span>")
owner.playsound_local(owner, 'sound/items/wirecutter.ogg', 50, 0)
adjust_uses(0, TRUE) //Checks the uses remaining
if(src && uses) //Not sure if not having src here would cause a runtime, so it's here to be safe
desc = "[initial(desc)] There are [uses] reactivations remaining."
//Upgrade Camera Network: EMP-proofs all cameras, in addition to giving them X-ray vision.
@@ -163,7 +163,7 @@
/datum/spellbook_entry/timestop
name = "Time Stop"
spell_type = /obj/effect/proc_holder/spell/aoe_turf/conjure/timestop
spell_type = /obj/effect/proc_holder/spell/aoe_turf/timestop
category = "Defensive"
/datum/spellbook_entry/smoke
+1 -1
View File
@@ -46,7 +46,7 @@
return FALSE
switch(type)
if("feet")
if(!H.shoes)
if(!H.shoes || !(H.shoes.body_parts_covered & FEET))
affecting = H.get_bodypart(pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG))
H.Knockdown(60)
if(BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND)
@@ -1,14 +1,12 @@
/*
Quick overview:
// Quick overview:
//
// Pipes combine to form pipelines
// Pipelines and other atmospheric objects combine to form pipe_networks
// Note: A single pipe_network represents a completely open space
//
// Pipes -> Pipelines
// Pipelines + Other Objects -> Pipe network
Pipes combine to form pipelines
Pipelines and other atmospheric objects combine to form pipe_networks
Note: A single pipe_network represents a completely open space
Pipes -> Pipelines
Pipelines + Other Objects -> Pipe network
*/
#define PIPE_VISIBLE_LEVEL 2
#define PIPE_HIDDEN_LEVEL 1
@@ -101,13 +99,14 @@ Pipelines + Other Objects -> Pipe network
return node_connects
/obj/machinery/atmospherics/proc/normalize_cardinal_directions()
if(dir==SOUTH)
setDir(NORTH)
else if(dir==WEST)
setDir(EAST)
switch(dir)
if(SOUTH)
setDir(NORTH)
if(WEST)
setDir(EAST)
//this is called just after the air controller sets up turfs
/obj/machinery/atmospherics/proc/atmosinit(var/list/node_connects)
/obj/machinery/atmospherics/proc/atmosinit(list/node_connects)
if(!node_connects) //for pipes where order of nodes doesn't matter
node_connects = getNodeConnects()
@@ -119,12 +118,8 @@ Pipelines + Other Objects -> Pipe network
update_icon()
/obj/machinery/atmospherics/proc/setPipingLayer(new_layer)
if(pipe_flags & PIPING_DEFAULT_LAYER_ONLY)
new_layer = PIPING_LAYER_DEFAULT
piping_layer = new_layer
pixel_x = (piping_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X
pixel_y = (piping_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_Y
layer = initial(layer) + ((piping_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_LCHANGE)
piping_layer = (pipe_flags & PIPING_DEFAULT_LAYER_ONLY) ? PIPING_LAYER_DEFAULT : new_layer
update_icon()
/obj/machinery/atmospherics/proc/can_be_node(obj/machinery/atmospherics/target, iteration)
return connection_check(target, piping_layer)
@@ -176,9 +171,6 @@ Pipelines + Other Objects -> Pipe network
nodes[nodes.Find(reference)] = null
update_icon()
/obj/machinery/atmospherics/update_icon()
return
/obj/machinery/atmospherics/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/pipe)) //lets you autodrop
var/obj/item/pipe/pipe = W
@@ -235,15 +227,13 @@ Pipelines + Other Objects -> Pipe network
var/datum/gas_mixture/env_air = loc.return_air()
pressures = int_air.return_pressure() - env_air.return_pressure()
var/fuck_you_dir = get_dir(src, user) // Because fuck you...
if(!fuck_you_dir)
fuck_you_dir = pick(GLOB.cardinals)
var/turf/target = get_edge_target_turf(user, fuck_you_dir)
var/range = pressures/250
var/speed = range/5
user.visible_message("<span class='danger'>[user] is sent flying by pressure!</span>","<span class='userdanger'>The pressure sends you flying!</span>")
user.throw_at(target, range, speed)
// if get_dir(src, user) is not 0, target is the edge_target_turf on that dir
// otherwise, edge_target_turf uses a random cardinal direction
// range is pressures / 250
// speed is pressures / 1250
user.throw_at(get_edge_target_turf(user, get_dir(src, user) || pick(GLOB.cardinals)), pressures / 250, pressures / 1250)
/obj/machinery/atmospherics/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
@@ -255,30 +245,20 @@ Pipelines + Other Objects -> Pipe network
transfer_fingerprints_to(stored)
..()
/obj/machinery/atmospherics/proc/getpipeimage(iconset, iconstate, direction, col=rgb(255,255,255))
/obj/machinery/atmospherics/proc/getpipeimage(iconset, iconstate, direction, col=rgb(255,255,255), piping_layer=2)
//Add identifiers for the iconset
if(iconsetids[iconset] == null)
iconsetids[iconset] = num2text(iconsetids.len + 1)
//Generate a unique identifier for this image combination
var/identifier = iconsetids[iconset] + "_[iconstate]_[direction]_[col]"
var/identifier = iconsetids[iconset] + "_[iconstate]_[direction]_[col]_[piping_layer]"
if((!(. = pipeimages[identifier])))
var/image/pipe_overlay
pipe_overlay = . = pipeimages[identifier] = image(iconset, iconstate, dir = direction)
pipe_overlay.color = col
/obj/machinery/atmospherics/proc/icon_addintact(var/obj/machinery/atmospherics/node)
var/image/img = getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', "pipe_intact", get_dir(src,node), node.pipe_color)
underlays += img
return img.dir
/obj/machinery/atmospherics/proc/icon_addbroken(var/connected = FALSE)
var/unconnected = (~connected) & initialize_directions
for(var/direction in GLOB.cardinals)
if(unconnected & direction)
underlays += getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', "pipe_exposed", direction)
PIPING_LAYER_SHIFT(pipe_overlay, piping_layer)
/obj/machinery/atmospherics/on_construction(obj_color, set_layer)
if(can_unwrench)
@@ -320,7 +300,7 @@ Pipelines + Other Objects -> Pipe network
if(target_move.can_crawl_through())
if(is_type_in_typecache(target_move, GLOB.ventcrawl_machinery))
user.forceMove(target_move.loc) //handle entering and so on.
user.visible_message("<span class='notice'>You hear something squeezing through the ducts...</span>","<span class='notice'>You climb out the ventilation system.")
user.visible_message("<span class='notice'>You hear something squeezing through the ducts...</span>", "<span class='notice'>You climb out the ventilation system.")
else
var/list/pipenetdiff = returnPipenets() ^ target_move.returnPipenets()
if(pipenetdiff.len)
@@ -332,7 +312,7 @@ Pipelines + Other Objects -> Pipe network
playsound(src, 'sound/machines/ventcrawl.ogg', 50, 1, -3)
else if(is_type_in_typecache(src, GLOB.ventcrawl_machinery) && can_crawl_through()) //if we move in a way the pipe can connect, but doesn't - or we're in a vent
user.forceMove(loc)
user.visible_message("<span class='notice'>You hear something squeezing through the ducts...</span>","<span class='notice'>You climb out the ventilation system.")
user.visible_message("<span class='notice'>You hear something squeezing through the ducts...</span>", "<span class='notice'>You climb out the ventilation system.")
user.canmove = FALSE
addtimer(VARSET_CALLBACK(user, canmove, TRUE), 1)
@@ -356,3 +336,6 @@ Pipelines + Other Objects -> Pipe network
//Used for certain children of obj/machinery/atmospherics to not show pipe vision when mob is inside it.
/obj/machinery/atmospherics/proc/can_see_pipes()
return TRUE
/obj/machinery/atmospherics/proc/update_layer()
layer = initial(layer) + (piping_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_LCHANGE
@@ -8,24 +8,14 @@
/obj/machinery/atmospherics/components/binary/SetInitDirections()
switch(dir)
if(NORTH)
if(NORTH, SOUTH)
initialize_directions = NORTH|SOUTH
if(SOUTH)
initialize_directions = NORTH|SOUTH
if(EAST)
if(EAST, WEST)
initialize_directions = EAST|WEST
if(WEST)
initialize_directions = EAST|WEST
/*
Iconnery
*/
/obj/machinery/atmospherics/components/binary/hide(intact)
update_icon()
..(intact)
/*
Housekeeping and pipe network stuff
*/
..()
/obj/machinery/atmospherics/components/binary/getNodeConnects()
return list(turn(dir, 180), dir)
@@ -1,13 +1,12 @@
/*
Acts like a normal vent, but has an input AND output.
*/
//Acts like a normal vent, but has an input AND output.
#define EXT_BOUND 1
#define INPUT_MIN 2
#define OUTPUT_MAX 4
/obj/machinery/atmospherics/components/binary/dp_vent_pump
icon = 'icons/obj/atmospherics/components/unary_devices.dmi' //We reuse the normal vent icons!
icon_state = "dpvent_map"
icon_state = "dpvent_map-2"
//node2 is output port
//node1 is input port
@@ -27,97 +26,25 @@ Acts like a normal vent, but has an input AND output.
var/output_pressure_max = 0
var/pressure_checks = EXT_BOUND
//EXT_BOUND: Do not pass external_pressure_bound
//INPUT_MIN: Do not pass input_pressure_min
//OUTPUT_MAX: Do not pass output_pressure_max
/obj/machinery/atmospherics/components/binary/dp_vent_pump/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/dp_vent_pump/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/dp_vent_pump/on
on = TRUE
icon_state = "dpvent_map_on"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/dp_vent_pump/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/dp_vent_pump/Destroy()
SSradio.remove_object(src, frequency)
return ..()
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume
name = "large dual-port air vent"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/incinerator_toxmix
id = INCINERATOR_TOXMIX_DP_VENTPUMP
frequency = FREQ_AIRLOCK_CONTROL
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/incinerator_atmos
id = INCINERATOR_ATMOS_DP_VENTPUMP
frequency = FREQ_AIRLOCK_CONTROL
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/incinerator_syndicatelava
id = INCINERATOR_SYNDICATELAVA_DP_VENTPUMP
frequency = FREQ_AIRLOCK_CONTROL
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/on
on = TRUE
icon_state = "dpvent_map_on"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/New()
..()
var/datum/gas_mixture/air1 = airs[1]
var/datum/gas_mixture/air2 = airs[2]
air1.volume = 1000
air2.volume = 1000
/obj/machinery/atmospherics/components/binary/dp_vent_pump/update_icon_nopipes()
cut_overlays()
if(showpipe)
add_overlay(getpipeimage('icons/obj/atmospherics/components/unary_devices.dmi', "dpvent_cap"))
var/image/cap = getpipeimage(icon, "dpvent_cap", dir, piping_layer = piping_layer)
add_overlay(cap)
if(!on || !is_operational())
icon_state = "vent_off"
return
if(pump_direction)
icon_state = "vent_out"
else
icon_state = "vent_in"
icon_state = pump_direction ? "vent_out" : "vent_in"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/process_atmos()
..()
@@ -248,6 +175,70 @@ Acts like a normal vent, but has an input AND output.
broadcast_status()
update_icon()
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume
name = "large dual-port air vent"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/New()
..()
var/datum/gas_mixture/air1 = airs[1]
var/datum/gas_mixture/air2 = airs[2]
air1.volume = 1000
air2.volume = 1000
// Mapping
/obj/machinery/atmospherics/components/binary/dp_vent_pump/layer1
piping_layer = 1
icon_state = "dpvent_map-1"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/layer3
piping_layer = 3
icon_state = "dpvent_map-3"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/on
on = TRUE
icon_state = "dpvent_map_on-2"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/on/layer1
piping_layer = 1
icon_state = "dpvent_map_on-1"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/on/layer3
piping_layer = 3
icon_state = "dpvent_map_on-3"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/incinerator_toxmix
id = INCINERATOR_TOXMIX_DP_VENTPUMP
frequency = FREQ_AIRLOCK_CONTROL
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/incinerator_atmos
id = INCINERATOR_ATMOS_DP_VENTPUMP
frequency = FREQ_AIRLOCK_CONTROL
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/incinerator_syndicatelava
id = INCINERATOR_SYNDICATELAVA_DP_VENTPUMP
frequency = FREQ_AIRLOCK_CONTROL
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/layer1
piping_layer = 1
icon_state = "dpvent_map-1"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/layer3
piping_layer = 3
icon_state = "dpvent_map-3"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/on
on = TRUE
icon_state = "dpvent_map_on-2"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/on/layer1
piping_layer = 1
icon_state = "dpvent_map_on-1"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/on/layer3
piping_layer = 3
icon_state = "dpvent_map_on-3"
#undef EXT_BOUND
#undef INPUT_MIN
#undef OUTPUT_MAX
@@ -7,12 +7,13 @@ Passive gate is similar to the regular pump except:
*/
/obj/machinery/atmospherics/components/binary/passive_gate
icon_state = "passgate_map"
icon_state = "passgate_map-2"
name = "passive gate"
desc = "A one-way air valve that does not require power."
can_unwrench = TRUE
shift_underlay_only = FALSE
interaction_flags_machine = INTERACT_MACHINE_OFFLINE | INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_SET_MACHINE
@@ -25,27 +26,15 @@ Passive gate is similar to the regular pump except:
construction_type = /obj/item/pipe/directional
pipe_state = "passivegate"
/obj/machinery/atmospherics/components/binary/passive_gate/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/passive_gate/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/passive_gate/Destroy()
SSradio.remove_object(src,frequency)
return ..()
/obj/machinery/atmospherics/components/binary/passive_gate/update_icon_nopipes()
if(!on)
icon_state = "passgate_off"
cut_overlays()
return
add_overlay(getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', "passgate_on"))
cut_overlays()
icon_state = "passgate_off"
if(on)
add_overlay(getpipeimage(icon, "passgate_on"))
/obj/machinery/atmospherics/components/binary/passive_gate/process_atmos()
..()
@@ -176,3 +165,11 @@ Passive gate is similar to the regular pump except:
if(. && on)
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
return FALSE
/obj/machinery/atmospherics/components/binary/passive_gate/layer1
piping_layer = 1
icon_state = "passgate_map-1"
/obj/machinery/atmospherics/components/binary/passive_gate/layer3
piping_layer = 3
icon_state = "passgate_map-3"
@@ -1,23 +1,22 @@
/*
Every cycle, the pump uses the air in air_in to try and make air_out the perfect pressure.
node1, air1, network1 correspond to input
node2, air2, network2 correspond to output
Thus, the two variables affect pump operation are set in New():
air1.volume
This is the volume of gas available to the pump that may be transfered to the output
air2.volume
Higher quantities of this cause more air to be perfected later
but overall network volume is also increased as this increases...
*/
// Every cycle, the pump uses the air in air_in to try and make air_out the perfect pressure.
//
// node1, air1, network1 correspond to input
// node2, air2, network2 correspond to output
//
// Thus, the two variables affect pump operation are set in New():
// air1.volume
// This is the volume of gas available to the pump that may be transfered to the output
// air2.volume
// Higher quantities of this cause more air to be perfected later
// but overall network volume is also increased as this increases...
/obj/machinery/atmospherics/components/binary/pump
icon_state = "pump_map"
icon_state = "pump_map-2"
name = "gas pump"
desc = "A pump that moves gas by pressure."
can_unwrench = TRUE
shift_underlay_only = FALSE
var/target_pressure = ONE_ATMOSPHERE
@@ -54,30 +53,6 @@ Thus, the two variables affect pump operation are set in New():
message_admins("Pump, [src.name], was maximized by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]")
return TRUE
/obj/machinery/atmospherics/components/binary/pump/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/pump/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/pump/on
on = TRUE
icon_state = "pump_on_map"
/obj/machinery/atmospherics/components/binary/pump/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/pump/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/pump/Destroy()
SSradio.remove_object(src,frequency)
if(radio_connection)
@@ -85,11 +60,7 @@ Thus, the two variables affect pump operation are set in New():
return ..()
/obj/machinery/atmospherics/components/binary/pump/update_icon_nopipes()
if(!is_operational())
icon_state = "pump_off"
return
icon_state = "pump_[on?"on":"off"]"
icon_state = (on && is_operational()) ? "pump_on" : "pump_off"
/obj/machinery/atmospherics/components/binary/pump/process_atmos()
// ..()
@@ -222,3 +193,23 @@ Thus, the two variables affect pump operation are set in New():
investigate_log("Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS)
message_admins("Pump, [src.name], was unwrenched by [ADMIN_LOOKUPFLW(user)] at [A]")
return TRUE
/obj/machinery/atmospherics/components/binary/pump/layer1
piping_layer = 1
icon_state= "pump_map-1"
/obj/machinery/atmospherics/components/binary/pump/layer3
piping_layer = 3
icon_state= "pump_map-3"
/obj/machinery/atmospherics/components/binary/pump/on
on = TRUE
icon_state = "pump_on_map-2"
/obj/machinery/atmospherics/components/binary/pump/on/layer1
piping_layer = 1
icon_state= "pump_on_map-1"
/obj/machinery/atmospherics/components/binary/pump/on/layer3
piping_layer = 3
icon_state= "pump_on_map-3"
@@ -3,12 +3,15 @@ It's like a regular ol' straight pipe, but you can turn it on and off.
*/
/obj/machinery/atmospherics/components/binary/valve
icon_state = "mvalve_map"
icon_state = "mvalve_map-2"
name = "manual valve"
desc = "A pipe with a valve that can be used to disable flow of gas through it."
can_unwrench = TRUE
interaction_flags_machine = INTERACT_MACHINE_OFFLINE | INTERACT_MACHINE_OPEN //Intentionally no allow_silicon flag
shift_underlay_only = FALSE
interaction_flags_machine = INTERACT_MACHINE_OFFLINE | INTERACT_MACHINE_OPEN //Intentionally no allow_silicon flag
pipe_flags = PIPING_CARDINAL_AUTONORMALIZE
var/frequency = 0
var/id = null
@@ -20,101 +23,87 @@ It's like a regular ol' straight pipe, but you can turn it on and off.
var/switching = FALSE
/obj/machinery/atmospherics/components/binary/valve/update_icon_nopipes(animation = FALSE)
normalize_cardinal_directions()
if(animation)
flick("[valve_type]valve_[on][!on]", src)
icon_state = "[valve_type]valve_[on ? "on" : "off"]"
/obj/machinery/atmospherics/components/binary/valve/proc/toggle()
if(on)
on = FALSE
update_icon_nopipes()
investigate_log("was closed by [usr ? key_name(usr) : "a remote signal"]", INVESTIGATE_ATMOS)
else
on = TRUE
update_icon_nopipes()
update_parents()
var/datum/pipeline/parent1 = parents[1]
parent1.reconcile_air()
investigate_log("was opened by [usr ? key_name(usr) : "a remote signal"]", INVESTIGATE_ATMOS)
/obj/machinery/atmospherics/components/binary/valve/interact(mob/user)
add_fingerprint(usr)
if(switching)
return
update_icon_nopipes(TRUE)
switching = TRUE
addtimer(CALLBACK(src, .proc/finish_interact), 10)
/obj/machinery/atmospherics/components/binary/valve/proc/finish_interact()
toggle()
switching = FALSE
/obj/machinery/atmospherics/components/binary/valve/digital // can be controlled by AI
icon_state = "dvalve_map-2"
name = "digital valve"
desc = "A digitally controlled valve."
valve_type = "d"
pipe_state = "dvalve"
interaction_flags_machine = INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OFFLINE | INTERACT_MACHINE_OPEN | INTERACT_MACHINE_OPEN_SILICON
/obj/machinery/atmospherics/components/binary/valve/digital/update_icon_nopipes(animation)
if(!is_operational())
normalize_cardinal_directions()
icon_state = "dvalve_nopower"
return
..()
/obj/machinery/atmospherics/components/binary/valve/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
piping_layer = 1
icon_state = "mvalve_map-1"
/obj/machinery/atmospherics/components/binary/valve/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
piping_layer = 3
icon_state = "mvalve_map-3"
/obj/machinery/atmospherics/components/binary/valve/on
on = TRUE
/obj/machinery/atmospherics/components/binary/valve/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
piping_layer = 1
icon_state = "mvalve_map-1"
/obj/machinery/atmospherics/components/binary/valve/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/valve/update_icon_nopipes(animation = 0)
normalize_dir()
if(animation)
flick("[valve_type]valve_[on][!on]",src)
icon_state = "[valve_type]valve_[on?"on":"off"]"
/obj/machinery/atmospherics/components/binary/valve/proc/open()
on = TRUE
update_icon_nopipes()
update_parents()
var/datum/pipeline/parent1 = parents[1]
parent1.reconcile_air()
investigate_log("was opened by [usr ? key_name(usr) : "a remote signal"]", INVESTIGATE_ATMOS)
/obj/machinery/atmospherics/components/binary/valve/proc/close()
on = FALSE
update_icon_nopipes()
investigate_log("was closed by [usr ? key_name(usr) : "a remote signal"]", INVESTIGATE_ATMOS)
/obj/machinery/atmospherics/components/binary/valve/proc/normalize_dir()
if(dir==SOUTH)
setDir(NORTH)
else if(dir==WEST)
setDir(EAST)
/obj/machinery/atmospherics/components/binary/valve/interact(mob/user)
add_fingerprint(usr)
update_icon_nopipes(1)
if(switching)
return
switching = TRUE
sleep(10)
if(on)
close()
else
open()
switching = FALSE
/obj/machinery/atmospherics/components/binary/valve/digital // can be controlled by AI
name = "digital valve"
desc = "A digitally controlled valve."
icon_state = "dvalve_map"
valve_type = "d"
pipe_state = "dvalve"
interaction_flags_machine = INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OFFLINE | INTERACT_MACHINE_OPEN | INTERACT_MACHINE_OPEN_SILICON
piping_layer = 3
icon_state = "mvalve_map-3"
/obj/machinery/atmospherics/components/binary/valve/digital/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
piping_layer = 1
icon_state = "dvalve_map-1"
/obj/machinery/atmospherics/components/binary/valve/digital/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
piping_layer = 3
icon_state = "dvalve_map-3"
/obj/machinery/atmospherics/components/binary/valve/digital/on
on = TRUE
/obj/machinery/atmospherics/components/binary/valve/digital/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
piping_layer = 1
icon_state = "dvalve_map-1"
/obj/machinery/atmospherics/components/binary/valve/digital/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/valve/digital/update_icon_nopipes(animation)
if(!is_operational())
normalize_dir()
icon_state = "dvalve_nopower"
return
..()
piping_layer = 3
icon_state = "dvalve_map-3"
@@ -1,23 +1,22 @@
/*
Every cycle, the pump uses the air in air_in to try and make air_out the perfect pressure.
node1, air1, network1 correspond to input
node2, air2, network2 correspond to output
Thus, the two variables affect pump operation are set in New():
air1.volume
This is the volume of gas available to the pump that may be transfered to the output
air2.volume
Higher quantities of this cause more air to be perfected later
but overall network volume is also increased as this increases...
*/
// Every cycle, the pump uses the air in air_in to try and make air_out the perfect pressure.
//
// node1, air1, network1 correspond to input
// node2, air2, network2 correspond to output
//
// Thus, the two variables affect pump operation are set in New():
// air1.volume
// This is the volume of gas available to the pump that may be transfered to the output
// air2.volume
// Higher quantities of this cause more air to be perfected later
// but overall network volume is also increased as this increases...
/obj/machinery/atmospherics/components/binary/volume_pump
icon_state = "volpump_map"
icon_state = "volpump_map-2"
name = "volumetric gas pump"
desc = "A pump that moves gas by volume."
can_unwrench = TRUE
shift_underlay_only = FALSE
var/transfer_rate = MAX_TRANSFER_RATE
@@ -43,40 +42,12 @@ Thus, the two variables affect pump operation are set in New():
message_admins("Volume Pump, [src.name], turned [on ? "on" : "off"] by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]")
return ..()
/obj/machinery/atmospherics/components/binary/volume_pump/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/volume_pump/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/volume_pump/Destroy()
SSradio.remove_object(src,frequency)
return ..()
/obj/machinery/atmospherics/components/binary/volume_pump/on
on = TRUE
icon_state = "volpump_on_map"
/obj/machinery/atmospherics/components/binary/volume_pump/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/volume_pump/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/volume_pump/update_icon_nopipes()
if(!is_operational())
icon_state = "volpump_off"
return
icon_state = "volpump_[on?"on":"off"]"
icon_state = on && is_operational() ? "volpump_on" : "volpump_off"
/obj/machinery/atmospherics/components/binary/volume_pump/process_atmos()
// ..()
@@ -208,3 +179,25 @@ Thus, the two variables affect pump operation are set in New():
investigate_log("Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS)
message_admins("Pump, [src.name], was unwrenched by [ADMIN_LOOKUPFLW(user)] at [A]")
return TRUE
// Mapping
/obj/machinery/atmospherics/components/binary/volume_pump/layer1
piping_layer = 1
icon_state = "volpump_map-1"
/obj/machinery/atmospherics/components/binary/volume_pump/layer3
piping_layer = 3
icon_state = "volpump_map-3"
/obj/machinery/atmospherics/components/binary/volume_pump/on
on = TRUE
icon_state = "volpump_on_map"
/obj/machinery/atmospherics/components/binary/volume_pump/on/layer1
piping_layer = 1
icon_state = "volpump_map-1"
/obj/machinery/atmospherics/components/binary/volume_pump/on/layer3
piping_layer = 3
icon_state = "volpump_map-3"
@@ -1,11 +1,10 @@
/*
So much of atmospherics.dm was used solely by components, so separating this makes things all a lot cleaner.
On top of that, now people can add component-speciic procs/vars if they want!
*/
// So much of atmospherics.dm was used solely by components, so separating this makes things all a lot cleaner.
// On top of that, now people can add component-speciic procs/vars if they want!
/obj/machinery/atmospherics/components
var/welded = FALSE //Used on pumps and scrubbers
var/showpipe = FALSE
var/shift_underlay_only = TRUE //Layering only shifts underlay?
var/list/datum/pipeline/parents
var/list/datum/gas_mixture/airs
@@ -19,9 +18,8 @@ On top of that, now people can add component-speciic procs/vars if they want!
var/datum/gas_mixture/A = new
A.volume = 200
airs[i] = A
/*
Iconnery
*/
// Iconnery
/obj/machinery/atmospherics/components/proc/update_icon_nopipes()
return
@@ -32,7 +30,7 @@ Iconnery
underlays.Cut()
var/turf/T = loc
if(level == 2 || !T.intact)
if(level == 2 || (istype(T) && !T.intact))
showpipe = TRUE
plane = GAME_PLANE
else
@@ -46,14 +44,25 @@ Iconnery
for(var/i in 1 to device_type) //adds intact pieces
if(nodes[i])
connected |= icon_addintact(nodes[i])
var/obj/machinery/atmospherics/node = nodes[i]
var/image/img = get_pipe_underlay("pipe_intact", get_dir(src, node), node.pipe_color)
underlays += img
connected |= img.dir
icon_addbroken(connected) //adds broken pieces
for(var/direction in GLOB.cardinals)
if((initialize_directions & direction) && !(connected & direction))
underlays += get_pipe_underlay("pipe_exposed", direction)
if(!shift_underlay_only)
PIPING_LAYER_SHIFT(src, piping_layer)
/*
Pipenet stuff; housekeeping
*/
/obj/machinery/atmospherics/components/proc/get_pipe_underlay(state, dir, color = null)
if(color)
. = getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', state, dir, color, piping_layer = shift_underlay_only ? piping_layer : 2)
else
. = getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', state, dir, piping_layer = shift_underlay_only ? piping_layer : 2)
// Pipenet stuff; housekeeping
/obj/machinery/atmospherics/components/nullifyNode(i)
if(nodes[i])
@@ -129,9 +138,7 @@ Pipenet stuff; housekeeping
return new_value
return default_set
/*
Helpers
*/
// Helpers
/obj/machinery/atmospherics/components/proc/update_parents()
for(var/i in 1 to device_type)
@@ -146,9 +153,9 @@ Helpers
for(var/i in 1 to device_type)
. += returnPipenet(nodes[i])
/*
UI Stuff
*/
// UI Stuff
/obj/machinery/atmospherics/components/ui_status(mob/user)
if(allowed(user))
@@ -156,9 +163,9 @@ UI Stuff
to_chat(user, "<span class='danger'>Access denied.</span>")
return UI_CLOSE
/*
Tool acts
*/
// Tool acts
/obj/machinery/atmospherics/components/analyzer_act(mob/living/user, obj/item/I)
atmosanalyzer_scan(airs, user, src)
@@ -1,9 +1,12 @@
/obj/machinery/atmospherics/components/trinary/filter
name = "gas filter"
icon_state = "filter_off"
desc = "Very useful for filtering gasses."
density = FALSE
name = "gas filter"
desc = "Very useful for filtering gasses."
can_unwrench = TRUE
var/transfer_rate = MAX_TRANSFER_RATE
var/filter_type = null
var/frequency = 0
@@ -38,38 +41,6 @@
message_admins("Filter, [src.name], was maximized by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]")
return TRUE
/obj/machinery/atmospherics/components/trinary/filter/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/trinary/filter/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/trinary/filter/flipped
icon_state = "filter_off_f"
flipped = TRUE
/obj/machinery/atmospherics/components/trinary/filter/flipped/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/trinary/filter/flipped/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
// These two filter types have critical_machine flagged to on and thus causes the area they are in to be exempt from the Grid Check event.
/obj/machinery/atmospherics/components/trinary/filter/critical
critical_machine = TRUE
/obj/machinery/atmospherics/components/trinary/filter/flipped/critical
critical_machine = TRUE
/obj/machinery/atmospherics/components/trinary/filter/proc/set_frequency(new_frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
@@ -80,62 +51,26 @@
SSradio.remove_object(src,frequency)
return ..()
/obj/machinery/atmospherics/components/trinary/filter/atmos //Used for atmos waste loops
on = TRUE
icon_state = "filter_on"
/obj/machinery/atmospherics/components/trinary/filter/atmos/n2
name = "nitrogen filter"
filter_type = "n2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/o2
name = "oxygen filter"
filter_type = "o2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/co2
name = "carbon dioxide filter"
filter_type = "co2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/n2o
name = "nitrous oxide filter"
filter_type = "n2o"
/obj/machinery/atmospherics/components/trinary/filter/atmos/plasma
name = "plasma filter"
filter_type = "plasma"
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped //This feels wrong, I know
icon_state = "filter_on_f"
flipped = TRUE
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped/n2
name = "nitrogen filter"
filter_type = "n2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped/o2
name = "oxygen filter"
filter_type = "o2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped/co2
name = "carbon dioxide filter"
filter_type = "co2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped/n2o
name = "nitrous oxide filter"
filter_type = "n2o"
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped/plasma
name = "plasma filter"
filter_type = "plasma"
/obj/machinery/atmospherics/components/trinary/filter/update_icon()
cut_overlays()
for(var/direction in GLOB.cardinals)
if(direction & initialize_directions)
var/obj/machinery/atmospherics/node = findConnecting(direction)
if(node)
add_overlay(getpipeimage('icons/obj/atmospherics/components/trinary_devices.dmi', "cap", direction, node.pipe_color))
continue
add_overlay(getpipeimage('icons/obj/atmospherics/components/trinary_devices.dmi', "cap", direction))
..()
if(!(direction & initialize_directions))
continue
var/obj/machinery/atmospherics/node = findConnecting(direction)
var/image/cap
if(node)
cap = getpipeimage(icon, "cap", direction, node.pipe_color, piping_layer = piping_layer)
else
cap = getpipeimage(icon, "cap", direction, piping_layer = piping_layer)
add_overlay(cap)
return ..()
/obj/machinery/atmospherics/components/trinary/filter/update_icon_nopipes()
if(on && nodes[1] && nodes[2] && nodes[3] && is_operational())
icon_state = "filter_on[flipped?"_f":""]"
return
icon_state = "filter_off[flipped?"_f":""]"
var/on_state = on && nodes[1] && nodes[2] && nodes[3] && is_operational()
icon_state = "filter_[on_state ? "on" : "off"][flipped ? "_f" : ""]"
/obj/machinery/atmospherics/components/trinary/filter/power_change()
var/old_stat = stat
@@ -258,3 +193,91 @@
if(. && on && is_operational())
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
return FALSE
// Mapping
/obj/machinery/atmospherics/components/trinary/filter/layer1
piping_layer = 1
icon_state = "filter_off_map-1"
/obj/machinery/atmospherics/components/trinary/filter/layer3
piping_layer = 3
icon_state = "filter_off_map-3"
/obj/machinery/atmospherics/components/trinary/filter/on
on = TRUE
icon_state = "filter_on"
/obj/machinery/atmospherics/components/trinary/filter/on/layer1
piping_layer = 1
icon_state = "filter_on_map-1"
/obj/machinery/atmospherics/components/trinary/filter/on/layer3
piping_layer = 3
icon_state = "filter_on_map-3"
/obj/machinery/atmospherics/components/trinary/filter/flipped
icon_state = "filter_off_f"
flipped = TRUE
/obj/machinery/atmospherics/components/trinary/filter/flipped/layer1
piping_layer = 1
icon_state = "filter_off_f_map-1"
/obj/machinery/atmospherics/components/trinary/filter/flipped/layer3
piping_layer = 3
icon_state = "filter_off_f_map-3"
/obj/machinery/atmospherics/components/trinary/filter/flipped/on
on = TRUE
icon_state = "filter_on_f"
/obj/machinery/atmospherics/components/trinary/filter/flipped/on/layer1
piping_layer = 1
icon_state = "filter_on_f_map-1"
/obj/machinery/atmospherics/components/trinary/filter/flipped/on/layer3
piping_layer = 3
icon_state = "filter_on_f_map-3"
/obj/machinery/atmospherics/components/trinary/filter/atmos //Used for atmos waste loops
on = TRUE
icon_state = "filter_on"
/obj/machinery/atmospherics/components/trinary/filter/atmos/n2
name = "nitrogen filter"
filter_type = "n2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/o2
name = "oxygen filter"
filter_type = "o2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/co2
name = "carbon dioxide filter"
filter_type = "co2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/n2o
name = "nitrous oxide filter"
filter_type = "n2o"
/obj/machinery/atmospherics/components/trinary/filter/atmos/plasma
name = "plasma filter"
filter_type = "plasma"
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped //This feels wrong, I know
icon_state = "filter_on_f"
flipped = TRUE
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped/n2
name = "nitrogen filter"
filter_type = "n2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped/o2
name = "oxygen filter"
filter_type = "o2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped/co2
name = "carbon dioxide filter"
filter_type = "co2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped/n2o
name = "nitrous oxide filter"
filter_type = "n2o"
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped/plasma
name = "plasma filter"
filter_type = "plasma"
// These two filter types have critical_machine flagged to on and thus causes the area they are in to be exempt from the Grid Check event.
/obj/machinery/atmospherics/components/trinary/filter/critical
critical_machine = TRUE
/obj/machinery/atmospherics/components/trinary/filter/flipped/critical
critical_machine = TRUE
@@ -3,9 +3,10 @@
density = FALSE
name = "gas mixer"
can_unwrench = TRUE
desc = "Very useful for mixing gasses."
can_unwrench = TRUE
var/target_pressure = ONE_ATMOSPHERE
var/node1_concentration = 0.5
var/node2_concentration = 0.5
@@ -41,66 +42,27 @@
return TRUE
//node 3 is the outlet, nodes 1 & 2 are intakes
/obj/machinery/atmospherics/components/trinary/mixer/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/trinary/mixer/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/trinary/mixer/flipped
icon_state = "mixer_off_f"
flipped = TRUE
/obj/machinery/atmospherics/components/trinary/mixer/flipped/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/trinary/mixer/flipped/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/trinary/mixer/airmix //For standard airmix to distro
name = "air mixer"
icon_state = "mixer_on"
node1_concentration = N2STANDARD
node2_concentration = O2STANDARD
on = TRUE
target_pressure = MAX_OUTPUT_PRESSURE
/obj/machinery/atmospherics/components/trinary/mixer/airmix/inverse
node1_concentration = O2STANDARD
node2_concentration = N2STANDARD
/obj/machinery/atmospherics/components/trinary/mixer/airmix/flipped
icon_state = "mixer_on_f"
flipped = TRUE
/obj/machinery/atmospherics/components/trinary/mixer/airmix/flipped/inverse
node1_concentration = O2STANDARD
node2_concentration = N2STANDARD
/obj/machinery/atmospherics/components/trinary/mixer/update_icon()
cut_overlays()
for(var/direction in GLOB.cardinals)
if(direction & initialize_directions)
var/obj/machinery/atmospherics/node = findConnecting(direction)
if(node)
add_overlay(getpipeimage('icons/obj/atmospherics/components/trinary_devices.dmi', "cap", direction, node.pipe_color))
continue
add_overlay(getpipeimage('icons/obj/atmospherics/components/trinary_devices.dmi', "cap", direction))
if(!(direction & initialize_directions))
continue
var/obj/machinery/atmospherics/node = findConnecting(direction)
var/image/cap
if(node)
cap = getpipeimage(icon, "cap", direction, node.pipe_color, piping_layer = piping_layer)
else
cap = getpipeimage(icon, "cap", direction, piping_layer = piping_layer)
add_overlay(cap)
return ..()
/obj/machinery/atmospherics/components/trinary/mixer/update_icon_nopipes()
if(on && nodes[1] && nodes[2] && nodes[3] && is_operational())
icon_state = "mixer_on[flipped?"_f":""]"
return
icon_state = "mixer_off[flipped?"_f":""]"
var/on_state = on && nodes[1] && nodes[2] && nodes[3] && is_operational()
icon_state = "mixer_[on_state ? "on" : "off"][flipped ? "_f" : ""]"
/obj/machinery/atmospherics/components/trinary/mixer/power_change()
var/old_stat = stat
@@ -233,8 +195,70 @@
update_icon()
/obj/machinery/atmospherics/components/trinary/filter/can_unwrench(mob/user)
/obj/machinery/atmospherics/components/trinary/mixer/can_unwrench(mob/user)
. = ..()
if(. && on && is_operational())
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
return FALSE
// mapping
/obj/machinery/atmospherics/components/trinary/mixer/layer1
piping_layer = 1
icon_state = "mixer_off_map-1"
/obj/machinery/atmospherics/components/trinary/mixer/layer3
piping_layer = 3
icon_state = "mixer_off_map-3"
/obj/machinery/atmospherics/components/trinary/mixer/on
on = TRUE
icon_state = "mixer_on"
/obj/machinery/atmospherics/components/trinary/mixer/on/layer1
piping_layer = 1
icon_state = "mixer_on_map-1"
/obj/machinery/atmospherics/components/trinary/mixer/on/layer3
piping_layer = 3
icon_state = "mixer_on_map-3"
/obj/machinery/atmospherics/components/trinary/mixer/flipped
icon_state = "mixer_off_f"
flipped = TRUE
/obj/machinery/atmospherics/components/trinary/mixer/flipped/layer1
piping_layer = 1
icon_state = "mixer_off_f_map-1"
/obj/machinery/atmospherics/components/trinary/mixer/flipped/layer3
piping_layer = 3
icon_state = "mixer_off_f_map-3"
/obj/machinery/atmospherics/components/trinary/mixer/flipped/on
on = TRUE
icon_state = "mixer_on_f"
/obj/machinery/atmospherics/components/trinary/mixer/flipped/on/layer1
piping_layer = 1
icon_state = "mixer_on_f_map-1"
/obj/machinery/atmospherics/components/trinary/mixer/flipped/on/layer3
piping_layer = 3
icon_state = "mixer_on_f_map-3"
/obj/machinery/atmospherics/components/trinary/mixer/airmix //For standard airmix to distro
name = "air mixer"
icon_state = "mixer_on"
node1_concentration = N2STANDARD
node2_concentration = O2STANDARD
target_pressure = MAX_OUTPUT_PRESSURE
on = TRUE
/obj/machinery/atmospherics/components/trinary/mixer/airmix/inverse
node1_concentration = O2STANDARD
node2_concentration = N2STANDARD
/obj/machinery/atmospherics/components/trinary/mixer/airmix/flipped
icon_state = "mixer_on_f"
flipped = TRUE
/obj/machinery/atmospherics/components/trinary/mixer/airmix/flipped/inverse
node1_concentration = O2STANDARD
node2_concentration = N2STANDARD
@@ -1,11 +1,12 @@
/obj/machinery/atmospherics/components/unary/heat_exchanger
icon_state = "he_intact"
icon_state = "he1"
name = "heat exchanger"
desc = "Exchanges heat between two input gases. Set up for fast heat transfer."
can_unwrench = TRUE
shift_underlay_only = FALSE // not really used
layer = LOW_OBJ_LAYER
@@ -13,24 +14,23 @@
var/update_cycle
pipe_state = "heunary"
/obj/machinery/atmospherics/components/unary/heat_exchanger/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
piping_layer = 1
icon_state = "he_map-1"
/obj/machinery/atmospherics/components/unary/heat_exchanger/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
piping_layer = 3
icon_state = "he_map-3"
/obj/machinery/atmospherics/components/unary/heat_exchanger/update_icon()
if(nodes[1])
icon_state = "he_intact"
icon_state = "he1"
var/obj/machinery/atmospherics/node = nodes[1]
add_atom_colour(node.color, FIXED_COLOUR_PRIORITY)
else
icon_state = "he_exposed"
icon_state = "he0"
PIPING_LAYER_SHIFT(src, piping_layer)
/obj/machinery/atmospherics/components/unary/heat_exchanger/atmosinit()
if(!partner)
@@ -1,9 +1,10 @@
/obj/machinery/atmospherics/components/unary/outlet_injector
icon_state = "inje_map-2"
name = "air injector"
desc = "Has a valve and pump attached to it."
icon_state = "inje_map"
use_power = IDLE_POWER_USE
can_unwrench = TRUE
shift_underlay_only = FALSE
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF //really helpful in building gas chambers for xenomorphs
var/injecting = 0
@@ -19,82 +20,20 @@
pipe_state = "injector"
/obj/machinery/atmospherics/components/unary/outlet_injector/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/outlet_injector/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/outlet_injector/Destroy()
SSradio.remove_object(src,frequency)
return ..()
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos
frequency = FREQ_ATMOS_STORAGE
on = TRUE
volume_rate = 200
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/atmos_waste
name = "atmos waste outlet injector"
id = ATMOS_GAS_MONITOR_WASTE_ATMOS
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/engine_waste
name = "engine outlet injector"
id = ATMOS_GAS_MONITOR_WASTE_ENGINE
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/toxin_input
name = "plasma tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_TOX
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/oxygen_input
name = "oxygen tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_O2
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/nitrogen_input
name = "nitrogen tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_N2
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/mix_input
name = "mix tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_MIX
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/nitrous_input
name = "nitrous oxide tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_N2O
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/air_input
name = "air mix tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_AIR
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/carbon_input
name = "carbon dioxide tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_CO2
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/incinerator_input
name = "incinerator chamber input injector"
id = ATMOS_GAS_MONITOR_INPUT_INCINERATOR
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/toxins_mixing_input
name = "toxins mixing input injector"
id = ATMOS_GAS_MONITOR_INPUT_TOXINS_LAB
/obj/machinery/atmospherics/components/unary/outlet_injector/on
on = TRUE
/obj/machinery/atmospherics/components/unary/outlet_injector/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/outlet_injector/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/outlet_injector/update_icon_nopipes()
cut_overlays()
if(showpipe)
// everything is already shifted so don't shift the cap
add_overlay(getpipeimage(icon, "inje_cap", initialize_directions))
if(!nodes[1] || !on || !is_operational())
icon_state = "inje_off"
return
icon_state = "inje_on"
else
icon_state = "inje_on"
/obj/machinery/atmospherics/components/unary/outlet_injector/power_change()
var/old_stat = stat
@@ -243,3 +182,63 @@
if(. && on && is_operational())
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
return FALSE
// mapping
/obj/machinery/atmospherics/components/unary/outlet_injector/layer1
piping_layer = 1
icon_state = "inje_map-1"
/obj/machinery/atmospherics/components/unary/outlet_injector/layer3
piping_layer = 2
icon_state = "inje_map-2"
/obj/machinery/atmospherics/components/unary/outlet_injector/on
on = TRUE
/obj/machinery/atmospherics/components/unary/outlet_injector/on/layer1
piping_layer = 1
icon_state = "inje_map-1"
/obj/machinery/atmospherics/components/unary/outlet_injector/on/layer3
piping_layer = 2
icon_state = "inje_map-2"
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos
frequency = FREQ_ATMOS_STORAGE
on = TRUE
volume_rate = 200
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/atmos_waste
name = "atmos waste outlet injector"
id = ATMOS_GAS_MONITOR_WASTE_ATMOS
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/engine_waste
name = "engine outlet injector"
id = ATMOS_GAS_MONITOR_WASTE_ENGINE
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/toxin_input
name = "plasma tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_TOX
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/oxygen_input
name = "oxygen tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_O2
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/nitrogen_input
name = "nitrogen tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_N2
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/mix_input
name = "mix tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_MIX
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/nitrous_input
name = "nitrous oxide tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_N2O
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/air_input
name = "air mix tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_AIR
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/carbon_input
name = "carbon dioxide tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_CO2
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/incinerator_input
name = "incinerator chamber input injector"
id = ATMOS_GAS_MONITOR_INPUT_INCINERATOR
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/toxins_mixing_input
name = "toxins mixing input injector"
id = ATMOS_GAS_MONITOR_INPUT_TOXINS_LAB
@@ -13,43 +13,51 @@
/obj/machinery/atmospherics/components/unary/passive_vent/update_icon_nopipes()
cut_overlays()
if(showpipe)
var/image/cap = getpipeimage(icon, "vent_cap", initialize_directions)
var/image/cap = getpipeimage(icon, "vent_cap", initialize_directions, piping_layer = piping_layer)
add_overlay(cap)
icon_state = "passive_vent"
/obj/machinery/atmospherics/components/unary/passive_vent/process_atmos()
..()
var/datum/gas_mixture/environment = loc.return_air()
var/environment_pressure = environment.return_pressure()
var/pressure_delta = abs(environment_pressure - airs[1].return_pressure())
var/active = FALSE
if((environment.temperature || airs[1].temperature) && pressure_delta > 0.5)
if(environment_pressure < airs[1].return_pressure())
var/air_temperature = (environment.temperature > 0) ? environment.temperature : airs[1].temperature
var/transfer_moles = (pressure_delta * environment.volume) / (air_temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = airs[1].remove(transfer_moles)
loc.assume_air(removed)
air_update_turf()
var/datum/gas_mixture/external = loc.return_air()
var/datum/gas_mixture/internal = airs[1]
var/external_pressure = external.return_pressure()
var/internal_pressure = internal.return_pressure()
var/pressure_delta = abs(external_pressure - internal_pressure)
if(pressure_delta > 0.5)
if(external_pressure < internal_pressure)
var/air_temperature = (external.temperature > 0) ? external.temperature : internal.temperature
var/transfer_moles = (pressure_delta * external.volume) / (air_temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = internal.remove(transfer_moles)
external.merge(removed)
else
var/air_temperature = (airs[1].temperature > 0) ? airs[1].temperature : environment.temperature
var/output_volume = airs[1].volume
var/transfer_moles = (pressure_delta * output_volume) / (air_temperature * R_IDEAL_GAS_EQUATION)
transfer_moles = min(transfer_moles, environment.total_moles()*airs[1].volume/environment.volume)
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
var/air_temperature = (internal.temperature > 0) ? internal.temperature : external.temperature
var/transfer_moles = (pressure_delta * internal.volume) / (air_temperature * R_IDEAL_GAS_EQUATION)
transfer_moles = min(transfer_moles, external.total_moles() * internal.volume / external.volume)
var/datum/gas_mixture/removed = external.remove(transfer_moles)
if(isnull(removed))
return
airs[1].merge(removed)
air_update_turf()
update_parents()
internal.merge(removed)
active = TRUE
active = internal.temperature_share(external, OPEN_HEAT_TRANSFER_COEFFICIENT) ? TRUE : active
if(active)
air_update_turf()
update_parents()
/obj/machinery/atmospherics/components/unary/passive_vent/can_crawl_through()
return TRUE
/obj/machinery/atmospherics/components/unary/passive_vent/layer1
piping_layer = PIPING_LAYER_MIN
piping_layer = 1
icon_state = "passive_vent_map-1"
/obj/machinery/atmospherics/components/unary/passive_vent/layer3
piping_layer = PIPING_LAYER_MAX
piping_layer = 3
icon_state = "passive_vent_map-3"
@@ -1,25 +1,16 @@
/obj/machinery/atmospherics/components/unary/portables_connector
icon_state = "connector_map-2"
name = "connector port"
desc = "For connecting portables devices related to atmospherics control."
icon = 'icons/obj/atmospherics/components/unary_devices.dmi'
icon_state = "connector_map" //Only for mapping purposes, so mappers can see direction
can_unwrench = TRUE
var/obj/machinery/portable_atmospherics/connected_device
use_power = NO_POWER_USE
level = 0
layer = GAS_FILTER_LAYER
pipe_flags = PIPING_ONE_PER_TURF
pipe_state = "connector"
/obj/machinery/atmospherics/components/unary/portables_connector/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/portables_connector/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
var/obj/machinery/portable_atmospherics/connected_device
/obj/machinery/atmospherics/components/unary/portables_connector/New()
..()
@@ -27,29 +18,22 @@
air_contents.volume = 0
/obj/machinery/atmospherics/components/unary/portables_connector/visible
level = 2
/obj/machinery/atmospherics/components/unary/portables_connector/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/portables_connector/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/portables_connector/process_atmos()
if(!connected_device)
return
update_parents()
/obj/machinery/atmospherics/components/unary/portables_connector/Destroy()
if(connected_device)
connected_device.disconnect()
return ..()
/obj/machinery/atmospherics/components/unary/portables_connector/update_icon_nopipes()
icon_state = "connector"
if(showpipe)
var/image/cap = getpipeimage(icon, "connector_cap", initialize_directions, piping_layer = piping_layer)
add_overlay(cap)
/obj/machinery/atmospherics/components/unary/portables_connector/process_atmos()
if(!connected_device)
return
update_parents()
/obj/machinery/atmospherics/components/unary/portables_connector/can_unwrench(mob/user)
. = ..()
if(. && connected_device)
@@ -60,3 +44,24 @@
return connected_device.portableConnectorReturnAir()
/obj/proc/portableConnectorReturnAir()
return
/obj/machinery/atmospherics/components/unary/portables_connector/layer1
piping_layer = 1
icon_state = "connector_map-1"
/obj/machinery/atmospherics/components/unary/portables_connector/layer3
piping_layer = 3
icon_state = "connector_map-3"
/obj/machinery/atmospherics/components/unary/portables_connector/visible
level = 2
/obj/machinery/atmospherics/components/unary/portables_connector/visible/layer1
piping_layer = 1
icon_state = "connector_map-1"
/obj/machinery/atmospherics/components/unary/portables_connector/visible/layer3
piping_layer = 3
icon_state = "connector_map-3"
@@ -5,11 +5,11 @@
name = "pressure tank"
desc = "A large vessel containing pressurized gas."
max_integrity = 800
var/volume = 10000 //in liters, 1 meters by 1 meters by 2 meters
density = TRUE
var/gas_type = 0
layer = ABOVE_WINDOW_LAYER
pipe_flags = PIPING_ONE_PER_TURF
var/volume = 10000 //in liters
var/gas_type = 0
/obj/machinery/atmospherics/components/unary/tank/New()
..()
@@ -20,6 +20,16 @@
air_contents.gases[gas_type] = AIR_CONTENTS
name = "[name] ([GLOB.meta_gas_names[gas_type]])"
/obj/machinery/atmospherics/components/unary/tank/air
icon_state = "grey"
name = "pressure tank (Air)"
/obj/machinery/atmospherics/components/unary/tank/air/New()
..()
var/datum/gas_mixture/air_contents = airs[1]
air_contents.gases[/datum/gas/oxygen] = AIR_CONTENTS * 0.2
air_contents.gases[/datum/gas/nitrogen] = AIR_CONTENTS * 0.8
/obj/machinery/atmospherics/components/unary/tank/carbon_dioxide
gas_type = /datum/gas/carbon_dioxide
@@ -27,7 +37,6 @@
icon_state = "orange"
gas_type = /datum/gas/plasma
/obj/machinery/atmospherics/components/unary/tank/oxygen
icon_state = "blue"
gas_type = /datum/gas/oxygen
@@ -40,12 +49,3 @@
icon_state = "red_white"
gas_type = /datum/gas/nitrous_oxide
/obj/machinery/atmospherics/components/unary/tank/air
icon_state = "grey"
name = "pressure tank (Air)"
/obj/machinery/atmospherics/components/unary/tank/air/New()
..()
var/datum/gas_mixture/air_contents = airs[1]
air_contents.gases[/datum/gas/oxygen] = AIR_CONTENTS * 0.2
air_contents.gases[/datum/gas/nitrogen] = AIR_CONTENTS * 0.8
@@ -11,7 +11,7 @@
layer = OBJ_LAYER
circuit = /obj/item/circuitboard/machine/thermomachine
pipe_flags = PIPING_ONE_PER_TURF | PIPING_DEFAULT_LAYER_ONLY
pipe_flags = PIPING_ONE_PER_TURF
var/icon_state_off = "freezer"
var/icon_state_on = "freezer_1"
@@ -28,7 +28,10 @@
initialize_directions = dir
/obj/machinery/atmospherics/components/unary/thermomachine/on_construction()
..(dir,dir)
var/obj/item/circuitboard/machine/thermomachine/board = circuit
if(board)
piping_layer = board.pipe_layer
..(dir, piping_layer)
/obj/machinery/atmospherics/components/unary/thermomachine/RefreshParts()
var/B
@@ -37,6 +40,8 @@
heat_capacity = 5000 * ((B - 1) ** 2)
/obj/machinery/atmospherics/components/unary/thermomachine/update_icon()
cut_overlays()
if(panel_open)
icon_state = icon_state_open
else if(on && is_operational())
@@ -44,6 +49,8 @@
else
icon_state = icon_state_off
add_overlay(getpipeimage(icon, "pipe", dir, , piping_layer))
/obj/machinery/atmospherics/components/unary/thermomachine/update_icon_nopipes()
cut_overlays()
if(showpipe)
@@ -6,9 +6,9 @@
#define RELEASING 1
/obj/machinery/atmospherics/components/unary/vent_pump
icon_state = "vent_map-2"
name = "air vent"
desc = "Has a valve and pump attached to it."
icon_state = "vent_map"
use_power = IDLE_POWER_USE
can_unwrench = TRUE
welded = FALSE
@@ -32,92 +32,6 @@
pipe_state = "uvent"
/obj/machinery/atmospherics/components/unary/vent_pump/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/on
on = TRUE
icon_state = "vent_map_on"
/obj/machinery/atmospherics/components/unary/vent_pump/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/siphon
pump_direction = SIPHONING
pressure_checks = INT_BOUND
internal_pressure_bound = 4000
external_pressure_bound = 0
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/on
on = TRUE
icon_state = "vent_map_siphon_on"
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos
frequency = FREQ_ATMOS_STORAGE
on = TRUE
icon_state = "vent_map_siphon_on"
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/toxin_output
name = "plasma tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_TOX
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/oxygen_output
name = "oxygen tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_O2
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/nitrogen_output
name = "nitrogen tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_N2
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/mix_output
name = "mix tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_MIX
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/nitrous_output
name = "nitrous oxide tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_N2O
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/carbon_output
name = "carbon dioxide tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_CO2
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/incinerator_output
name = "incinerator chamber output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_INCINERATOR
frequency = FREQ_ATMOS_CONTROL
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/toxins_mixing_output
name = "toxins mixing output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_TOXINS_LAB
frequency = FREQ_ATMOS_CONTROL
/obj/machinery/atmospherics/components/unary/vent_pump/New()
..()
if(!id_tag)
@@ -133,82 +47,11 @@
radio_connection = null
return ..()
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume
name = "large air vent"
power_channel = EQUIP
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/on
on = TRUE
icon_state = "vent_map_on"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon
pump_direction = SIPHONING
pressure_checks = INT_BOUND
internal_pressure_bound = 2000
external_pressure_bound = 0
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/on
on = TRUE
icon_state = "vent_map_siphon_on"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/atmos
frequency = FREQ_ATMOS_STORAGE
on = TRUE
icon_state = "vent_map_siphon_on"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/atmos/air_output
name = "air mix tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_AIR
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/New()
..()
var/datum/gas_mixture/air_contents = airs[1]
air_contents.volume = 1000
/obj/machinery/atmospherics/components/unary/vent_pump/update_icon_nopipes()
cut_overlays()
if(showpipe)
add_overlay(getpipeimage(icon, "vent_cap", initialize_directions))
var/image/cap = getpipeimage(icon, "vent_cap", initialize_directions, piping_layer = piping_layer)
add_overlay(cap)
if(welded)
icon_state = "vent_welded"
@@ -445,6 +288,149 @@
pipe_vision_img.plane = ABOVE_HUD_PLANE
playsound(loc, 'sound/weapons/bladeslice.ogg', 100, 1)
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume
name = "large air vent"
power_channel = EQUIP
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/New()
..()
var/datum/gas_mixture/air_contents = airs[1]
air_contents.volume = 1000
// mapping
/obj/machinery/atmospherics/components/unary/vent_pump/layer1
piping_layer = 1
icon_state = "vent_map-1"
/obj/machinery/atmospherics/components/unary/vent_pump/layer3
piping_layer = 3
icon_state = "vent_map-3"
/obj/machinery/atmospherics/components/unary/vent_pump/on
on = TRUE
icon_state = "vent_map_on-2"
/obj/machinery/atmospherics/components/unary/vent_pump/on/layer1
piping_layer = 1
icon_state = "vent_map_on-1"
/obj/machinery/atmospherics/components/unary/vent_pump/on/layer3
piping_layer = 3
icon_state = "vent_map_on-3"
/obj/machinery/atmospherics/components/unary/vent_pump/siphon
pump_direction = SIPHONING
pressure_checks = INT_BOUND
internal_pressure_bound = 4000
external_pressure_bound = 0
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/layer1
piping_layer = 1
icon_state = "vent_map-1"
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/layer3
piping_layer = 3
icon_state = "vent_map-3"
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/on
on = TRUE
icon_state = "vent_map_siphon_on-2"
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/on/layer1
piping_layer = 1
icon_state = "vent_map_siphon_on-1"
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/on/layer3
piping_layer = 3
icon_state = "vent_map_siphon_on-3"
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos
frequency = FREQ_ATMOS_STORAGE
on = TRUE
icon_state = "vent_map_siphon_on-2"
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/toxin_output
name = "plasma tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_TOX
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/oxygen_output
name = "oxygen tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_O2
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/nitrogen_output
name = "nitrogen tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_N2
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/mix_output
name = "mix tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_MIX
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/nitrous_output
name = "nitrous oxide tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_N2O
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/carbon_output
name = "carbon dioxide tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_CO2
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/incinerator_output
name = "incinerator chamber output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_INCINERATOR
frequency = FREQ_ATMOS_CONTROL
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/toxins_mixing_output
name = "toxins mixing output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_TOXINS_LAB
frequency = FREQ_ATMOS_CONTROL
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/layer1
piping_layer = 1
icon_state = "vent_map-1"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/layer3
piping_layer = 3
icon_state = "map_vent-3"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/on
on = TRUE
icon_state = "vent_map_on-2"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/on/layer1
piping_layer = 1
icon_state = "vent_map_on-1"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/on/layer3
piping_layer = 3
icon_state = "map_vent_on-3"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon
pump_direction = SIPHONING
pressure_checks = INT_BOUND
internal_pressure_bound = 2000
external_pressure_bound = 0
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/layer1
piping_layer = 1
icon_state = "vent_map-1"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/layer3
piping_layer = 3
icon_state = "map_vent-3"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/on
on = TRUE
icon_state = "vent_map_siphon_on-2"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/on/layer1
piping_layer = 1
icon_state = "vent_map_siphon_on-1"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/on/layer3
piping_layer = 3
icon_state = "vent_map_siphon_on-3"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/atmos
frequency = FREQ_ATMOS_STORAGE
on = TRUE
icon_state = "vent_map_siphon_on-2"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/atmos/air_output
name = "air mix tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_AIR
#undef INT_BOUND
#undef EXT_BOUND
@@ -2,9 +2,9 @@
#define SCRUBBING 1
/obj/machinery/atmospherics/components/unary/vent_scrubber
icon_state = "scrub_map-2"
name = "air scrubber"
desc = "Has a valve and pump attached to it."
icon_state = "scrub_map"
use_power = IDLE_POWER_USE
idle_power_usage = 10
active_power_usage = 60
@@ -28,16 +28,6 @@
pipe_state = "scrubber"
/obj/machinery/atmospherics/components/unary/vent_scrubber/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_scrubber/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_scrubber/New()
..()
if(!id_tag)
@@ -48,20 +38,6 @@
filter_types -= f
filter_types += gas_id2path(f)
/obj/machinery/atmospherics/components/unary/vent_scrubber/on
on = TRUE
icon_state = "scrub_map_on"
/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_scrubber/Destroy()
var/area/A = get_area(src)
if (A)
@@ -92,7 +68,8 @@
/obj/machinery/atmospherics/components/unary/vent_scrubber/update_icon_nopipes()
cut_overlays()
if(showpipe)
add_overlay(getpipeimage(icon, "scrub_cap", initialize_directions))
var/image/cap = getpipeimage(icon, "scrub_cap", initialize_directions, piping_layer = piping_layer)
add_overlay(cap)
if(welded)
icon_state = "scrub_welded"
@@ -322,7 +299,25 @@
pipe_vision_img.plane = ABOVE_HUD_PLANE
playsound(loc, 'sound/weapons/bladeslice.ogg', 100, 1)
/obj/machinery/atmospherics/components/unary/vent_scrubber/layer1
piping_layer = 1
icon_state = "scrub_map-1"
/obj/machinery/atmospherics/components/unary/vent_scrubber/layer3
piping_layer = 3
icon_state = "scrub_map-3"
/obj/machinery/atmospherics/components/unary/vent_scrubber/on
on = TRUE
icon_state = "scrub_map_on-2"
/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer1
piping_layer = 1
icon_state = "scrub_map_on-1"
/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer3
piping_layer = 3
icon_state = "scrub_map_on-3"
#undef SIPHONING
#undef SCRUBBING
@@ -50,10 +50,9 @@
target = candidate
setAttachLayer(candidate.piping_layer)
/obj/machinery/meter/proc/setAttachLayer(var/new_layer)
/obj/machinery/meter/proc/setAttachLayer(new_layer)
target_layer = new_layer
pixel_x = (new_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X
pixel_y = (new_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_Y
PIPING_LAYER_DOUBLE_SHIFT(src, target_layer)
/obj/machinery/meter/process_atmos()
if(!(target?.flags_1 & INITIALIZED_1))
@@ -1,5 +1,4 @@
/obj/machinery/atmospherics/pipe/heat_exchanging
icon = 'icons/obj/atmospherics/pipes/heat.dmi'
level = 2
var/minimum_temperature_difference = 20
var/thermal_conductivity = WINDOW_HEAT_TRANSFER_COEFFICIENT
@@ -1,6 +1,6 @@
/obj/machinery/atmospherics/pipe/heat_exchanging/junction
icon = 'icons/obj/atmospherics/pipes/junction.dmi'
icon_state = "intact"
icon = 'icons/obj/atmospherics/pipes/he-junction.dmi'
icon_state = "pipe11-2"
name = "junction"
desc = "A one meter junction that connects regular and heat-exchanging pipe."
@@ -15,21 +15,11 @@
construction_type = /obj/item/pipe/directional
pipe_state = "junction"
/obj/machinery/atmospherics/pipe/heat_exchanging/junction/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/heat_exchanging/junction/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/heat_exchanging/junction/SetInitDirections()
switch(dir)
if(NORTH,SOUTH)
if(NORTH, SOUTH)
initialize_directions = SOUTH|NORTH
if(EAST,WEST)
if(EAST, WEST)
initialize_directions = WEST|EAST
/obj/machinery/atmospherics/pipe/heat_exchanging/junction/getNodeConnects()
@@ -37,5 +27,19 @@
/obj/machinery/atmospherics/pipe/heat_exchanging/junction/isConnectable(obj/machinery/atmospherics/target, given_layer, he_type_check)
if(dir == get_dir(target, src))
return ..(target, given_layer, FALSE) //we want a normal pipe instead
return ..(target, given_layer, FALSE) //we want a normal pipe instead
return ..(target, given_layer, TRUE)
/obj/machinery/atmospherics/pipe/heat_exchanging/junction/update_icon()
icon_state = "pipe[nodes[1] ? "1" : "0"][nodes[2] ? "1" : "0"]-[piping_layer]"
update_layer()
update_alpha()
/obj/machinery/atmospherics/pipe/heat_exchanging/junction/layer1
piping_layer = 1
icon_state = "pipe11-1"
/obj/machinery/atmospherics/pipe/heat_exchanging/junction/layer3
piping_layer = 3
icon_state = "pipe11-3"
@@ -1,6 +1,6 @@
//3-way manifold
//3-Way Manifold
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold
icon_state = "manifold"
icon_state = "manifold-2"
name = "pipe manifold"
desc = "A manifold composed of regular pipes."
@@ -13,74 +13,34 @@
construction_type = /obj/item/pipe/trinary
pipe_state = "he_manifold"
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
var/mutable_appearance/center
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/Initialize()
icon_state = ""
center = mutable_appearance(icon, "manifold_center")
return ..()
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold/SetInitDirections()
switch(dir)
if(NORTH)
initialize_directions = EAST|SOUTH|WEST
if(SOUTH)
initialize_directions = WEST|NORTH|EAST
if(EAST)
initialize_directions = SOUTH|WEST|NORTH
if(WEST)
initialize_directions = NORTH|EAST|SOUTH
initialize_directions = NORTH|SOUTH|EAST|WEST
initialize_directions &= ~dir
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold/update_icon()
var/invis = invisibility ? "-f" : ""
icon_state = "manifold_center[invis]"
cut_overlays()
PIPING_LAYER_DOUBLE_SHIFT(center, piping_layer)
add_overlay(center)
//Add non-broken pieces
for(var/i in 1 to device_type)
if(nodes[i])
add_overlay(getpipeimage('icons/obj/atmospherics/pipes/heat.dmi', "manifold_intact[invis]", get_dir(src, nodes[i])))
add_overlay( getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i])) )
//4-way manifold
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w
icon_state = "manifold4w"
update_layer()
update_alpha()
name = "4-way pipe manifold"
desc = "A manifold composed of heat-exchanging pipes."
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold/layer1
piping_layer = 1
icon_state = "manifold-1"
initialize_directions = NORTH|SOUTH|EAST|WEST
device_type = QUATERNARY
construction_type = /obj/item/pipe/quaternary
pipe_state = "he_manifold4w"
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/SetInitDirections()
initialize_directions = initial(initialize_directions)
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/update_icon()
var/invis = invisibility ? "-f" : ""
icon_state = "manifold4w_center[invis]"
cut_overlays()
//Add non-broken pieces
for(var/i in 1 to device_type)
if(nodes[i])
add_overlay(getpipeimage('icons/obj/atmospherics/pipes/heat.dmi', "manifold_intact[invis]", get_dir(src, nodes[i])))
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold/layer3
piping_layer = 3
icon_state = "manifold-3"
@@ -0,0 +1,48 @@
//4-Way Manifold
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w
icon = 'icons/obj/atmospherics/pipes/he-manifold.dmi'
icon_state = "manifold4w-2"
name = "4-way pipe manifold"
desc = "A manifold composed of heat-exchanging pipes."
initialize_directions = NORTH|SOUTH|EAST|WEST
device_type = QUATERNARY
construction_type = /obj/item/pipe/quaternary
pipe_state = "he_manifold4w"
var/mutable_appearance/center
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/New()
icon_state = ""
center = mutable_appearance(icon, "manifold4w_center")
return ..()
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/SetInitDirections()
initialize_directions = initial(initialize_directions)
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/update_icon()
cut_overlays()
PIPING_LAYER_DOUBLE_SHIFT(center, piping_layer)
add_overlay(center)
//Add non-broken pieces
for(var/i in 1 to device_type)
if(nodes[i])
add_overlay( getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i])) )
update_layer()
update_alpha()
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/layer1
piping_layer = 1
icon_state = "manifold4w-1"
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/layer3
piping_layer = 3
icon_state = "manifold4w-3"
@@ -1,46 +1,38 @@
/obj/machinery/atmospherics/pipe/heat_exchanging/simple
icon_state = "intact"
icon = 'icons/obj/atmospherics/pipes/he-simple.dmi'
icon_state = "pipe11-2"
name = "pipe"
desc = "A one meter section of heat-exchanging pipe."
dir = SOUTH
initialize_directions = SOUTH|NORTH
pipe_flags = PIPING_CARDINAL_AUTONORMALIZE
device_type = BINARY
construction_type = /obj/item/pipe/binary/bendable
pipe_state = "he"
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/SetInitDirections()
if(dir in GLOB.diagonals)
initialize_directions = dir
return
switch(dir)
if(NORTH,SOUTH)
if(NORTH, SOUTH)
initialize_directions = SOUTH|NORTH
if(EAST,WEST)
initialize_directions = WEST|EAST
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/proc/normalize_dir()
if(dir==SOUTH)
setDir(NORTH)
else if(dir==WEST)
setDir(EAST)
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/atmosinit()
normalize_dir()
..()
if(EAST, WEST)
initialize_directions = EAST|WEST
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/update_icon()
normalize_dir()
..()
icon_state = "pipe[nodes[1] ? "1" : "0"][nodes[2] ? "1" : "0"]-[piping_layer]"
update_layer()
update_alpha()
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/layer1
piping_layer = 1
icon_state = "pipe11-1"
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/layer3
piping_layer = 3
icon_state = "pipe11-3"
@@ -1,5 +1,5 @@
/obj/machinery/atmospherics/pipe/layer_manifold
name = "pipe-layer manifold"
name = "layer adaptor"
icon = 'icons/obj/atmospherics/pipes/manifold.dmi'
icon_state = "manifoldlayer"
desc = "A special pipe to bridge pipe layers with."
@@ -9,14 +9,15 @@
piping_layer = PIPING_LAYER_DEFAULT
device_type = 0
volume = 260
construction_type = /obj/item/pipe/binary
pipe_state = "manifoldlayer"
var/list/front_nodes
var/list/back_nodes
construction_type = /obj/item/pipe/binary
pipe_state = "layer_manifold"
/obj/machinery/atmospherics/pipe/layer_manifold/Initialize()
front_nodes = list()
back_nodes = list()
icon_state = "manifoldlayer_center"
return ..()
/obj/machinery/atmospherics/pipe/layer_manifold/Destroy()
@@ -36,30 +37,36 @@
return front_nodes + back_nodes + nodes
/obj/machinery/atmospherics/pipe/layer_manifold/update_icon() //HEAVILY WIP FOR UPDATE ICONS!!
layer = (initial(layer) + (PIPING_LAYER_MAX * PIPING_LAYER_LCHANGE)) //This is above everything else.
var/invis = invisibility ? "-f" : ""
icon_state = "[initial(icon_state)][invis]"
cut_overlays()
for(var/obj/machinery/atmospherics/A in front_nodes)
add_attached_image(A)
for(var/obj/machinery/atmospherics/A in back_nodes)
add_attached_image(A)
layer = initial(layer) + (PIPING_LAYER_MAX * PIPING_LAYER_LCHANGE) //This is above everything else.
/obj/machinery/atmospherics/pipe/layer_manifold/proc/add_attached_image(obj/machinery/atmospherics/A)
var/invis = A.invisibility ? "-f" : ""
for(var/node in front_nodes)
add_attached_images(node)
for(var/node in back_nodes)
add_attached_images(node)
update_alpha()
/obj/machinery/atmospherics/pipe/layer_manifold/proc/add_attached_images(obj/machinery/atmospherics/A)
if(!A)
return
if(istype(A, /obj/machinery/atmospherics/pipe/layer_manifold))
for(var/i = PIPING_LAYER_MIN, i <= PIPING_LAYER_MAX, i++)
var/image/I = getpipeimage('icons/obj/atmospherics/pipes/manifold.dmi', "manifold_full_layer_long[invis]", get_dir(src, A), A.pipe_color)
I.pixel_x = (i - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X
I.pixel_y = (i - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_Y
I.layer = layer - 0.01
add_overlay(I)
for(var/i in PIPING_LAYER_MIN to PIPING_LAYER_MAX)
add_attached_image(get_dir(src, A), i)
return
add_attached_image(get_dir(src, A), A.piping_layer, A.pipe_color)
/obj/machinery/atmospherics/pipe/layer_manifold/proc/add_attached_image(p_dir, p_layer, p_color = null)
var/image/I
if(p_color)
I = getpipeimage(icon, "pipe", p_dir, p_color, piping_layer = piping_layer)
else
var/image/I = getpipeimage('icons/obj/atmospherics/pipes/manifold.dmi', "manifold_full_layer_long[invis]", get_dir(src, A), A.pipe_color)
I.pixel_x = A.pixel_x
I.pixel_y = A.pixel_y
I.layer = layer - 0.01
add_overlay(I)
I = getpipeimage(icon, "pipe", p_dir, piping_layer = piping_layer)
I.layer = layer - 0.01
PIPING_LAYER_SHIFT(I, p_layer)
add_overlay(I)
/obj/machinery/atmospherics/pipe/layer_manifold/SetInitDirections()
switch(dir)
@@ -1,9 +1,8 @@
/*
3-Way Manifold
*/
//3-Way Manifold
/obj/machinery/atmospherics/pipe/manifold
icon = 'icons/obj/atmospherics/pipes/manifold.dmi'
icon_state = "manifold"
icon_state = "manifold-2"
name = "pipe manifold"
desc = "A manifold composed of regular pipes."
@@ -16,399 +15,25 @@
construction_type = /obj/item/pipe/trinary
pipe_state = "manifold"
var/mutable_appearance/center
/obj/machinery/atmospherics/pipe/manifold/Initialize()
icon_state = ""
center = mutable_appearance(icon, "manifold_center")
return ..()
/obj/machinery/atmospherics/pipe/manifold/SetInitDirections()
switch(dir)
if(NORTH)
initialize_directions = EAST|SOUTH|WEST
if(SOUTH)
initialize_directions = WEST|NORTH|EAST
if(EAST)
initialize_directions = SOUTH|WEST|NORTH
if(WEST)
initialize_directions = NORTH|EAST|SOUTH
initialize_directions = NORTH|SOUTH|EAST|WEST
initialize_directions &= ~dir
/obj/machinery/atmospherics/pipe/manifold/update_icon()
var/invis = invisibility ? "-f" : ""
icon_state = "manifold_center[invis]"
cut_overlays()
PIPING_LAYER_DOUBLE_SHIFT(center, piping_layer)
add_overlay(center)
//Add non-broken pieces
for(var/i in 1 to device_type)
if(nodes[i])
add_overlay(getpipeimage('icons/obj/atmospherics/pipes/manifold.dmi', "manifold_full[invis]", get_dir(src, nodes[i])))
//Colored pipes, use these for mapping
/obj/machinery/atmospherics/pipe/manifold/general
/obj/machinery/atmospherics/pipe/manifold/general/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/general/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/general/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/general/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/general/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/general/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/scrubbers
name="scrubbers pipe"
pipe_color=rgb(255,0,0)
color=rgb(255,0,0)
/obj/machinery/atmospherics/pipe/manifold/scrubbers/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/scrubbers/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/scrubbers/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/supply
name="air supply pipe"
pipe_color=rgb(0,0,255)
color=rgb(0,0,255)
/obj/machinery/atmospherics/pipe/manifold/supply/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/supply/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/supply/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/supply/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/supply/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/supply/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/supplymain
name="main air supply pipe"
pipe_color=rgb(130,43,255)
color=rgb(130,43,255)
/obj/machinery/atmospherics/pipe/manifold/supplymain/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/supplymain/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/supplymain/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/supplymain/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/supplymain/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/supplymain/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/yellow
pipe_color=rgb(255,198,0)
color=rgb(255,198,0)
/obj/machinery/atmospherics/pipe/manifold/yellow/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/yellow/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/yellow/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/yellow/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/yellow/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/yellow/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/cyan
pipe_color=rgb(0,255,249)
color=rgb(0,255,249)
/obj/machinery/atmospherics/pipe/manifold/cyan/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/cyan/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/cyan/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/cyan/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/cyan/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/cyan/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/green
pipe_color=rgb(30,255,0)
color=rgb(30,255,0)
/obj/machinery/atmospherics/pipe/manifold/green/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/green/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/green/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/green/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/green/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/green/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/orange
pipe_color=rgb(255,129,25)
color=rgb(255,129,25)
/obj/machinery/atmospherics/pipe/manifold/orange/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/orange/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/orange/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/orange/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/orange/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/orange/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/purple
pipe_color=rgb(128,0,182)
color=rgb(128,0,182)
/obj/machinery/atmospherics/pipe/manifold/purple/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/purple/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/purple/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/purple/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/purple/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/purple/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/dark
pipe_color=rgb(69,69,69)
color=rgb(69,69,69)
/obj/machinery/atmospherics/pipe/manifold/dark/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/dark/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/dark/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/dark/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/dark/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/dark/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/violet
pipe_color=rgb(64,0,128)
color=rgb(64,0,128)
/obj/machinery/atmospherics/pipe/manifold/violet/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/violet/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/violet/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/violet/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/violet/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/violet/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/brown
pipe_color=rgb(178,100,56)
color=rgb(178,100,56)
/obj/machinery/atmospherics/pipe/manifold/brown/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/brown/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/brown/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/brown/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/brown/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/brown/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
add_overlay( getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i])) )
update_layer()
update_alpha()
@@ -1,9 +1,8 @@
/*
4-way manifold
*/
//4-Way Manifold
/obj/machinery/atmospherics/pipe/manifold4w
icon = 'icons/obj/atmospherics/pipes/manifold.dmi'
icon_state = "manifold4w"
icon_state = "manifold4w-2"
name = "4-way pipe manifold"
desc = "A manifold composed of regular pipes."
@@ -15,391 +14,24 @@
construction_type = /obj/item/pipe/quaternary
pipe_state = "manifold4w"
var/mutable_appearance/center
/obj/machinery/atmospherics/pipe/manifold4w/Initialize()
icon_state = ""
center = mutable_appearance(icon, "manifold4w_center")
return ..()
/obj/machinery/atmospherics/pipe/manifold4w/SetInitDirections()
initialize_directions = initial(initialize_directions)
/obj/machinery/atmospherics/pipe/manifold4w/update_icon()
var/invis = invisibility ? "-f" : ""
icon_state = "manifold4w_center[invis]"
cut_overlays()
PIPING_LAYER_DOUBLE_SHIFT(center, piping_layer)
add_overlay(center)
//Add non-broken pieces
for(var/i in 1 to device_type)
if(nodes[i])
add_overlay(getpipeimage('icons/obj/atmospherics/pipes/manifold.dmi', "manifold_full[invis]", get_dir(src, nodes[i])))
//Colored pipes, use these for mapping
/obj/machinery/atmospherics/pipe/manifold4w/general
/obj/machinery/atmospherics/pipe/manifold4w/general/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/general/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/general/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/general/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/general/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/general/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/scrubbers
name="scrubbers pipe"
pipe_color=rgb(255,0,0)
color=rgb(255,0,0)
/obj/machinery/atmospherics/pipe/manifold4w/scrubbers/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/scrubbers/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/scrubbers/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/scrubbers/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/scrubbers/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/scrubbers/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/supply
name="air supply pipe"
pipe_color=rgb(0,0,255)
color=rgb(0,0,255)
/obj/machinery/atmospherics/pipe/manifold4w/supply/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/supply/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/supply/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/supply/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/supply/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/supply/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/supplymain
name="main air supply pipe"
pipe_color=rgb(130,43,255)
color=rgb(130,43,255)
/obj/machinery/atmospherics/pipe/manifold4w/supplymain/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/supplymain/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/supplymain/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/supplymain/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/supplymain/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/supplymain/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/yellow
pipe_color=rgb(255,198,0)
color=rgb(255,198,0)
/obj/machinery/atmospherics/pipe/manifold4w/yellow/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/yellow/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/yellow/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/yellow/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/yellow/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/yellow/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/cyan
pipe_color=rgb(0,255,249)
color=rgb(0,255,249)
/obj/machinery/atmospherics/pipe/manifold4w/cyan/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/cyan/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/cyan/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/cyan/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/cyan/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/cyan/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/green
pipe_color=rgb(30,255,0)
color=rgb(30,255,0)
/obj/machinery/atmospherics/pipe/manifold4w/green/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/green/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/green/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/green/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/green/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/green/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/orange
pipe_color=rgb(255,129,25)
color=rgb(255,129,25)
/obj/machinery/atmospherics/pipe/manifold4w/orange/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/orange/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/orange/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/orange/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/orange/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/orange/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/purple
pipe_color=rgb(128,0,182)
color=rgb(128,0,182)
/obj/machinery/atmospherics/pipe/manifold4w/purple/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/purple/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/purple/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/purple/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/purple/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/purple/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/dark
pipe_color=rgb(69,69,69)
color=rgb(69,69,69)
/obj/machinery/atmospherics/pipe/manifold4w/dark/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/dark/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/dark/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/dark/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/dark/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/dark/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/violet
pipe_color=rgb(64,0,128)
color=rgb(64,0,128)
/obj/machinery/atmospherics/pipe/manifold4w/violet/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/violet/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/violet/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/violet/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/violet/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/violet/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/brown
pipe_color=rgb(178,100,56)
color=rgb(178,100,56)
/obj/machinery/atmospherics/pipe/manifold4w/brown/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/brown/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/brown/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/brown/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/brown/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/brown/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
add_overlay( getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i])) )
update_layer()
update_alpha()
@@ -0,0 +1,65 @@
//Colored pipes, use these for mapping
#define HELPER_PARTIAL(Fulltype, Iconbase, Color) \
##Fulltype { \
pipe_color = Color; \
color = Color; \
} \
##Fulltype/visible { \
level = PIPE_VISIBLE_LEVEL; \
layer = GAS_PIPE_VISIBLE_LAYER; \
} \
##Fulltype/visible/layer1 { \
piping_layer = 1; \
icon_state = Iconbase + "-1"; \
} \
##Fulltype/visible/layer3 { \
piping_layer = 3; \
icon_state = Iconbase + "-3"; \
} \
##Fulltype/hidden { \
level = PIPE_HIDDEN_LEVEL; \
} \
##Fulltype/hidden/layer1 { \
piping_layer = 1; \
icon_state = Iconbase + "-1"; \
} \
##Fulltype/hidden/layer3 { \
piping_layer = 3; \
icon_state = Iconbase + "-3"; \
}
#define HELPER_PARTIAL_NAMED(Fulltype, Iconbase, Name, Color) \
HELPER_PARTIAL(Fulltype, Iconbase, Color) \
##Fulltype { \
name = Name; \
}
#define HELPER(Type, Color) \
HELPER_PARTIAL(/obj/machinery/atmospherics/pipe/simple/##Type, "pipe11", Color) \
HELPER_PARTIAL(/obj/machinery/atmospherics/pipe/manifold/##Type, "manifold", Color) \
HELPER_PARTIAL(/obj/machinery/atmospherics/pipe/manifold4w/##Type, "manifold4w", Color)
#define HELPER_NAMED(Type, Name, Color) \
HELPER_PARTIAL_NAMED(/obj/machinery/atmospherics/pipe/simple/##Type, "pipe11", Name, Color) \
HELPER_PARTIAL_NAMED(/obj/machinery/atmospherics/pipe/manifold/##Type, "manifold", Name, Color) \
HELPER_PARTIAL_NAMED(/obj/machinery/atmospherics/pipe/manifold4w/##Type, "manifold4w", Name, Color)
HELPER(general, null)
HELPER(yellow, rgb(255, 198, 0))
HELPER(cyan, rgb(0, 255, 249))
HELPER(green, rgb(30, 255, 0))
HELPER(orange, rgb(255, 129, 25))
HELPER(purple, rgb(128, 0, 182))
HELPER(dark, rgb(69, 69, 69))
HELPER(brown, rgb(178, 100, 56))
HELPER(violet, rgb(64, 0, 128))
HELPER_NAMED(scrubbers, "scrubbers pipe", rgb(255, 0, 0))
HELPER_NAMED(supply, "air supply pipe", rgb(0, 0, 255))
HELPER_NAMED(supplymain, "main air supply pipe", rgb(130, 43, 255))
#undef HELPER_NAMED
#undef HELPER
#undef HELPER_PARTIAL_NAMED
#undef HELPER_PARTIAL
@@ -32,14 +32,6 @@
parent = new
parent.build_pipeline(src)
/obj/machinery/atmospherics/pipe/update_icon() //overridden by manifolds
if(nodes[1] && nodes[2])
icon_state = "intact[invisibility ? "-f" : "" ]"
else
var/have_node1 = nodes[1] ? TRUE : FALSE
var/have_node2 = nodes[2] ? TRUE : FALSE
icon_state = "exposed[have_node1][have_node2][invisibility ? "-f" : "" ]"
/obj/machinery/atmospherics/pipe/atmosinit()
var/turf/T = loc // hide if turf is not intact
hide(T.intact)
@@ -93,6 +85,13 @@
qdel(meter)
. = ..()
/obj/machinery/atmospherics/pipe/update_icon()
. = ..()
update_alpha()
/obj/machinery/atmospherics/pipe/proc/update_alpha()
alpha = invisibility ? 64 : 255
/obj/machinery/atmospherics/pipe/proc/update_node_icon()
for(var/i in 1 to device_type)
if(nodes[i])
@@ -1,11 +1,9 @@
/*
Simple Pipe
The regular pipe you see everywhere, including bent ones.
*/
// Simple Pipe
// The regular pipe you see everywhere, including bent ones.
/obj/machinery/atmospherics/pipe/simple
icon = 'icons/obj/atmospherics/pipes/simple.dmi'
icon_state = "intact"
icon_state = "pipe11-2"
name = "pipe"
desc = "A one meter section of regular pipe."
@@ -20,385 +18,16 @@ The regular pipe you see everywhere, including bent ones.
pipe_state = "simple"
/obj/machinery/atmospherics/pipe/simple/SetInitDirections()
normalize_cardinal_directions()
if(dir in GLOB.diagonals)
initialize_directions = dir
return
switch(dir)
if(NORTH,SOUTH)
if(NORTH, SOUTH)
initialize_directions = SOUTH|NORTH
if(EAST,WEST)
if(EAST, WEST)
initialize_directions = EAST|WEST
//Colored pipes, use these for mapping
/obj/machinery/atmospherics/pipe/simple/general
/obj/machinery/atmospherics/pipe/simple/general/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/general/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/general/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/general/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/general/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/general/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/scrubbers
name="scrubbers pipe"
pipe_color=rgb(255,0,0)
color=rgb(255,0,0)
/obj/machinery/atmospherics/pipe/simple/scrubbers/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/scrubbers/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/scrubbers/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/supply
name="air supply pipe"
pipe_color=rgb(0,0,255)
color=rgb(0,0,255)
/obj/machinery/atmospherics/pipe/simple/supply/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/supply/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/supply/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/supply/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/supplymain
name="main air supply pipe"
pipe_color=rgb(130,43,255)
color=rgb(130,43,255)
/obj/machinery/atmospherics/pipe/simple/supplymain/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/supplymain/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/supplymain/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/supplymain/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/supplymain/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/supplymain/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/yellow
pipe_color=rgb(255,198,0)
color=rgb(255,198,0)
/obj/machinery/atmospherics/pipe/simple/yellow/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/yellow/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/yellow/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/yellow/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/yellow/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/yellow/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/cyan
pipe_color=rgb(0,255,249)
color=rgb(0,255,249)
/obj/machinery/atmospherics/pipe/simple/cyan/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/cyan/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/cyan/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/cyan/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/cyan/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/cyan/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/green
pipe_color=rgb(30,255,0)
color=rgb(30,255,0)
/obj/machinery/atmospherics/pipe/simple/green/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/green/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/green/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/green/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/green/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/green/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/orange
pipe_color=rgb(255,129,25)
color=rgb(255,129,25)
/obj/machinery/atmospherics/pipe/simple/orange/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/orange/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/orange/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/orange/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/orange/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/orange/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/purple
pipe_color=rgb(128,0,182)
color=rgb(128,0,182)
/obj/machinery/atmospherics/pipe/simple/purple/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/purple/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/purple/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/purple/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/purple/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/purple/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/dark
pipe_color=rgb(69,69,69)
color=rgb(69,69,69)
/obj/machinery/atmospherics/pipe/simple/dark/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/dark/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/dark/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/dark/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/dark/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/dark/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/violet
pipe_color=rgb(64,0,128)
color=rgb(64,0,128)
/obj/machinery/atmospherics/pipe/simple/violet/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/violet/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/violet/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/violet/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/violet/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/violet/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/brown
pipe_color=rgb(178,100,56)
color=rgb(178,100,56)
/obj/machinery/atmospherics/pipe/simple/brown/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/brown/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/brown/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/brown/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/brown/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/brown/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/update_icon()
icon_state = "pipe[nodes[1] ? "1" : "0"][nodes[2] ? "1" : "0"]-[piping_layer]"
update_layer()
update_alpha()

Some files were not shown because too many files have changed in this diff Show More