This commit is contained in:
Ghommie
2020-01-24 18:56:27 +01:00
695 changed files with 24034 additions and 16452 deletions
+24
View File
@@ -7,22 +7,33 @@
#define STICKYBAN_MAX_ADMIN_MATCHES 2
/world/IsBanned(key,address,computer_id,type,real_bans_only=FALSE)
var/static/key_cache = list()
if(!real_bans_only)
if(key_cache[key])
return list("reason"="concurrent connection attempts", "desc"="You are attempting to connect too fast. Try again.")
key_cache[key] = 1
if (!key || !address || !computer_id)
if(real_bans_only)
key_cache[key] = 0
return FALSE
log_access("Failed Login (invalid data): [key] [address]-[computer_id]")
key_cache[key] = 0
return list("reason"="invalid login data", "desc"="Error: Could not check ban status, Please try again. Error message: Your computer provided invalid or blank information to the server on connection (byond username, IP, and Computer ID.) Provided information for reference: Username:'[key]' IP:'[address]' Computer ID:'[computer_id]'. (If you continue to get this error, please restart byond or contact byond support.)")
if (text2num(computer_id) == 2147483647) //this cid causes stickybans to go haywire
log_access("Failed Login (invalid cid): [key] [address]-[computer_id]")
key_cache[key] = 0
return list("reason"="invalid login data", "desc"="Error: Could not check ban status, Please try again. Error message: Your computer provided an invalid Computer ID.)")
if (type == "world")
key_cache[key] = 0
return ..() //shunt world topic banchecks to purely to byond's internal ban system
var/ckey = ckey(key)
var/client/C = GLOB.directory[ckey]
if (C && ckey == C.ckey && computer_id == C.computer_id && address == C.address)
key_cache[key] = 0
return //don't recheck connected clients.
var/admin = FALSE
@@ -38,21 +49,25 @@
addclientmessage(ckey,"<span class='adminnotice'>You have been allowed to bypass the whitelist</span>")
else
log_access("Failed Login: [key] - Not on whitelist")
key_cache[key] = 0
return list("reason"="whitelist", "desc" = "\nReason: You are not on the white list for this server")
//Guest Checking
if(!real_bans_only && IsGuestKey(key))
if (CONFIG_GET(flag/guest_ban))
log_access("Failed Login: [key] - Guests not allowed")
key_cache[key] = 0
return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.")
if (CONFIG_GET(flag/panic_bunker) && SSdbcore.Connect())
log_access("Failed Login: [key] - Guests not allowed during panic bunker")
key_cache[key] = 0
return list("reason"="guest", "desc"="\nReason: Sorry but the server is currently not accepting connections from never before seen players or guests. If you have played on this server with a byond account before, please log in to the byond account you have played from.")
//Population Cap Checking
var/extreme_popcap = CONFIG_GET(number/extreme_popcap)
if(!real_bans_only && extreme_popcap && living_player_count() >= extreme_popcap && !admin)
log_access("Failed Login: [key] - Population cap reached")
key_cache[key] = 0
return list("reason"="popcap", "desc"= "\nReason: [CONFIG_GET(string/extreme_popcap_message)]")
if(CONFIG_GET(flag/ban_legacy_system))
@@ -66,6 +81,7 @@
addclientmessage(ckey,"<span class='adminnotice'>You have been allowed to bypass a matching ban on [.["key"]]</span>")
else
log_access("Failed Login: [key] [computer_id] [address] - Banned [.["reason"]]")
key_cache[key] = 0
return .
else
@@ -73,6 +89,7 @@
var/msg = "Ban database connection failure. Key [ckey] not checked"
log_world(msg)
message_admins(msg)
key_cache[key] = 0
return
var/ipquery = ""
@@ -86,6 +103,7 @@
var/datum/DBQuery/query_ban_check = SSdbcore.NewQuery("SELECT IFNULL((SELECT byond_key FROM [format_table_name("player")] WHERE [format_table_name("player")].ckey = [format_table_name("ban")].ckey), ckey), IFNULL((SELECT byond_key FROM [format_table_name("player")] WHERE [format_table_name("player")].ckey = [format_table_name("ban")].a_ckey), a_ckey), reason, expiration_time, duration, bantime, bantype, id, round_id FROM [format_table_name("ban")] WHERE (ckey = '[ckey]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR bantype = 'ADMIN_PERMABAN' OR ((bantype = 'TEMPBAN' OR bantype = 'ADMIN_TEMPBAN') AND expiration_time > Now())) AND isnull(unbanned)")
if(!query_ban_check.Execute(async = TRUE))
qdel(query_ban_check)
key_cache[key] = 0
return
while(query_ban_check.NextRow())
var/pkey = query_ban_check.item[1]
@@ -124,6 +142,7 @@
log_access("Failed Login: [key] [computer_id] [address] - Banned (#[banid]) [.["reason"]]")
qdel(query_ban_check)
key_cache[key] = 0
return .
qdel(query_ban_check)
@@ -138,6 +157,7 @@
//rogue ban in the process of being reverted.
if (cachedban && cachedban["reverting"])
key_cache[key] = 0
return null
if (cachedban && ckey != bannedckey)
@@ -165,6 +185,7 @@
newmatches_admin.len > STICKYBAN_MAX_ADMIN_MATCHES \
)
if (cachedban["reverting"])
key_cache[key] = 0
return null
cachedban["reverting"] = TRUE
@@ -182,6 +203,7 @@
cachedban["admin_matches_this_round"] = list()
cachedban -= "reverting"
world.SetConfig("ban", bannedckey, list2stickyban(cachedban))
key_cache[key] = 0
return null
//byond will not trigger isbanned() for "global" host bans,
@@ -191,6 +213,7 @@
log_admin("The admin [key] has been allowed to bypass a matching host/sticky ban on [bannedckey]")
message_admins("<span class='adminnotice'>The admin [key] has been allowed to bypass a matching host/sticky ban on [bannedckey]</span>")
addclientmessage(ckey,"<span class='adminnotice'>You have been allowed to bypass a matching host/sticky ban on [bannedckey]</span>")
key_cache[key] = 0
return null
if (C) //user is already connected!.
@@ -200,6 +223,7 @@
. = list("reason" = "Stickyban", "desc" = desc)
log_access("Failed Login: [key] [computer_id] [address] - StickyBanned [ban["message"]] Target Username: [bannedckey] Placed by [ban["admin"]]")
key_cache[key] = 0
return .
+36 -4
View File
@@ -185,7 +185,6 @@
body += "<A href='?_src_=holder;[HrefToken()];simplemake=shade;mob=[REF(M)]'>Shade</A>"
body += "<br>"
if (M.client)
body += "<br><br>"
body += "<b>Other actions:</b>"
body += "<br>"
@@ -194,9 +193,9 @@
body += "<A href='?_src_=holder;[HrefToken()];tdome2=[REF(M)]'>Thunderdome 2</A> | "
body += "<A href='?_src_=holder;[HrefToken()];tdomeadmin=[REF(M)]'>Thunderdome Admin</A> | "
body += "<A href='?_src_=holder;[HrefToken()];tdomeobserve=[REF(M)]'>Thunderdome Observer</A> | "
body += usr.client.citaPPoptions(M) // CITADEL
body += "<A href='?_src_=holder;[HrefToken()];makementor=[M.ckey]'>Make mentor</A> | "
body += "<A href='?_src_=holder;[HrefToken()];removementor=[M.ckey]'>Remove mentor</A>"
body += "<A href='?_src_=holder;[HrefToken()];makeeligible=[REF(M)]'>Allow reentering round</A>"
body += "<br>"
body += "</body></html>"
@@ -1009,3 +1008,36 @@
"Admin login: [key_name(src)]")
if(string)
message_admins("[string]")
/client/proc/cmd_admin_man_up(mob/M in GLOB.mob_list)
set category = "Special Verbs"
set name = "Man Up"
if(!M)
return
if(!check_rights(R_ADMIN))
return
to_chat(M, "<span class='warning bold reallybig'>Man up, and deal with it.</span><br><span class='warning big'>Move on.</span>")
M.playsound_local(M, 'sound/voice/manup.ogg', 50, FALSE, pressure_affected = FALSE)
log_admin("Man up: [key_name(usr)] told [key_name(M)] to man up")
var/message = "<span class='adminnotice'>[key_name_admin(usr)] told [key_name_admin(M)] to man up.</span>"
message_admins(message)
admin_ticket_log(M, message)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Man Up")
/client/proc/cmd_admin_man_up_global()
set category = "Special Verbs"
set name = "Man Up Global"
if(!check_rights(R_ADMIN))
return
to_chat(world, "<span class='warning bold reallybig'>Man up, and deal with it.</span><br><span class='warning big'>Move on.</span>")
for(var/mob/M in GLOB.player_list)
M.playsound_local(M, 'sound/voice/manup.ogg', 50, FALSE, pressure_affected = FALSE)
log_admin("Man up global: [key_name(usr)] told everybody to man up")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] told everybody to man up.</span>")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Man Up Global")
+73 -2
View File
@@ -22,7 +22,10 @@
if(!CheckAdminHref(href, href_list))
return
citaTopic(href, href_list) //CITADEL EDIT, MENTORS
if(href_list["makementor"])
makeMentor(href_list["makementor"])
else if(href_list["removementor"])
removeMentor(href_list["removementor"])
if(href_list["ahelp"])
if(!check_rights(R_ADMIN, TRUE))
@@ -907,12 +910,16 @@
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=alien;jobban4=[REF(M)]'><font color=red>Alien</font></a></td>"
else
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=alien;jobban4=[REF(M)]'>Alien</a></td>"
//Gang
if(jobban_isbanned(M, ROLE_GANG) || isbanned_dept)
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=gang;jobban4=[REF(M)]'><font color=red>Gang</font></a></td>"
else
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=gang;jobban4=[REF(M)]'>Gang</a></td>"
//Bloodsucker
if(jobban_isbanned(M, ROLE_BLOODSUCKER) || isbanned_dept)
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=bloodsucker;jobban4=[REF(M)]'><font color=red>Bloodsucker</font></a></td>"
else
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=bloodsucker;jobban4=[REF(M)]'>Bloodsucker</a></td>"
//Other Roles (black)
@@ -1715,6 +1722,16 @@
log_admin("[key_name(usr)] forced [key_name(M)] to say: [speech]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] forced [key_name_admin(M)] to say: [speech]</span>")
else if(href_list["makeeligible"])
if(!check_rights(R_ADMIN))
return
var/mob/M = locate(href_list["makeeligible"])
if(!ismob(M))
to_chat(usr, "this can only be used on instances of type /mob.")
var/datum/element/ghost_role_eligibility/eli = SSdcs.GetElement(/datum/element/ghost_role_eligibility)
if(M.ckey in eli.timeouts)
eli.timeouts -= M.ckey
else if(href_list["sendtoprison"])
if(!check_rights(R_ADMIN))
return
@@ -2846,3 +2863,57 @@
dat += {"<A href='?src=[REF(src)];[HrefToken()];f_secret2=secret'>Random (default)</A><br>"}
dat += {"Now: [GLOB.secret_force_mode]"}
usr << browse(dat, "window=f_secret")
/datum/admins/proc/makeMentor(ckey)
if(!usr.client)
return
if (!check_rights(0))
return
if(!ckey)
return
var/client/C = GLOB.directory[ckey]
if(C)
if(check_rights_for(C, R_ADMIN,0))
to_chat(usr, "<span class='danger'>The client chosen is an admin! Cannot mentorize.</span>")
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.NextRow())
to_chat(usr, "<span class='danger'>[ckey] is already a mentor.</span>")
return
var/datum/DBQuery/query_add_mentor = SSdbcore.NewQuery("INSERT INTO `[format_table_name("mentor")]` (`id`, `ckey`) VALUES (null, '[ckey]')")
if(!query_add_mentor.warn_execute())
return
var/datum/DBQuery/query_add_admin_log = SSdbcore.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added new mentor [ckey]');")
if(!query_add_admin_log.warn_execute())
return
else
to_chat(usr, "<span class='danger'>Failed to establish database connection. The changes will last only for the current round.</span>")
new /datum/mentors(ckey)
to_chat(usr, "<span class='adminnotice'>New mentor added.</span>")
/datum/admins/proc/removeMentor(ckey)
if(!usr.client)
return
if (!check_rights(0))
return
if(!ckey)
return
var/client/C = GLOB.directory[ckey]
if(C)
if(check_rights_for(C, R_ADMIN,0))
to_chat(usr, "<span class='danger'>The client chosen is an admin, not a mentor! Cannot de-mentorize.</span>")
return
C.remove_mentor_verbs()
C.mentor_datum = null
GLOB.mentors -= C
if(SSdbcore.Connect())
var/datum/DBQuery/query_remove_mentor = SSdbcore.NewQuery("DELETE FROM [format_table_name("mentor")] WHERE ckey = '[ckey]'")
if(!query_remove_mentor.warn_execute())
return
var/datum/DBQuery/query_add_admin_log = SSdbcore.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Removed mentor [ckey]');")
if(!query_add_admin_log.warn_execute())
return
else
to_chat(usr, "<span class='danger'>Failed to establish database connection. The changes will last only for the current round.</span>")
to_chat(usr, "<span class='adminnotice'>Mentor removed.</span>")
@@ -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.
@@ -46,7 +46,6 @@
dat += "<a href='?src=[REF(src)];dispense=baton'>Advanced Baton (2 Credits)</A><br>"
dat += "<a href='?src=[REF(src)];dispense=mind_device'>Mental Interface Device (2 Credits)</A><br>"
dat += "<a href='?src=[REF(src)];dispense=chem_dispenser'>Reagent Synthesizer (2 Credits)</A><br>"
dat += "<a href='?src=[REF(src)];dispense=shrink_ray'>Shrink Ray Blaster (2 Credits)</a><br>"
dat += "<a href='?src=[REF(src)];dispense=helmet'>Agent Helmet (1 Credit)</A><br>"
dat += "<a href='?src=[REF(src)];dispense=vest'>Agent Vest (1 Credit)</A><br>"
dat += "<a href='?src=[REF(src)];dispense=silencer'>Radio Silencer (1 Credit)</A><br>"
@@ -119,8 +118,6 @@
Dispense(/obj/item/abductor_machine_beacon/chem_dispenser,cost=2)
if("tongue")
Dispense(/obj/item/organ/tongue/abductor)
if("shrink_ray")
Dispense(/obj/item/gun/energy/shrink_ray,cost=2)
updateUsrDialog()
/obj/machinery/abductor/console/proc/TeleporterRetrieve()
@@ -245,4 +242,4 @@
new item(drop_location)
else
say("Insufficent data!")
say("Insufficent data!")
@@ -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)
@@ -91,7 +91,7 @@
target.Stun(40) //Utterly useless without this, its okay since there are so many checks to go through
target.apply_status_effect(STATUS_EFFECT_MESMERIZE, 45) //So you cant rotate with combat mode, plus fancy status alert
if(do_mob(user, target, 40, 0, TRUE, extra_checks=CALLBACK(src, .proc/ContinueActive, user, target)))
if(do_mob(user, target, 40, 0, TRUE, extra_checks = CALLBACK(src, .proc/ContinueActive, user, target)))
PowerActivatedSuccessfully() // PAY COST! BEGIN COOLDOWN!
var/power_time = 90 + level_current * 12
target.apply_status_effect(STATUS_EFFECT_MESMERIZE, power_time + 80)
@@ -345,13 +345,13 @@
/obj/item/projectile/tentacle/on_hit(atom/target, blocked = FALSE)
var/mob/living/carbon/human/H = firer
if(blocked >= 100)
return 0
return BULLET_ACT_BLOCK
if(isitem(target))
var/obj/item/I = target
if(!I.anchored)
to_chat(firer, "<span class='notice'>You pull [I] right into your grasp.</span>")
H.put_in_hands(I) //Because throwing it is goofy as fuck and unreliable. If you land the tentacle despite the penalties to accuracy, you should have your reward.
. = 1
. = BULLET_ACT_HIT
else if(isliving(target))
var/mob/living/L = target
@@ -366,7 +366,7 @@
if(INTENT_HELP)
C.visible_message("<span class='danger'>[L] is pulled by [H]'s tentacle!</span>","<span class='userdanger'>A tentacle grabs you and pulls you towards [H]!</span>")
C.throw_at(get_step_towards(H,C), 8, 2)
return 1
return BULLET_ACT_HIT
if(INTENT_DISARM)
var/obj/item/I = C.get_active_held_item()
@@ -374,27 +374,27 @@
if(C.dropItemToGround(I))
C.visible_message("<span class='danger'>[I] is yanked off [C]'s hand by [src]!</span>","<span class='userdanger'>A tentacle pulls [I] away from you!</span>")
on_hit(I) //grab the item as if you had hit it directly with the tentacle
return 1
return BULLET_ACT_HIT
else
to_chat(firer, "<span class='danger'>You can't seem to pry [I] off [C]'s hands!</span>")
return 0
return BULLET_ACT_BLOCK
else
to_chat(firer, "<span class='danger'>[C] has nothing in hand to disarm!</span>")
return 0
return BULLET_ACT_HIT
if(INTENT_GRAB)
C.visible_message("<span class='danger'>[L] is grabbed by [H]'s tentacle!</span>","<span class='userdanger'>A tentacle grabs you and pulls you towards [H]!</span>")
C.throw_at(get_step_towards(H,C), 8, 2, H, TRUE, TRUE, callback=CALLBACK(src, .proc/tentacle_grab, H, C))
return 1
return BULLET_ACT_HIT
if(INTENT_HARM)
C.visible_message("<span class='danger'>[L] is thrown towards [H] by a tentacle!</span>","<span class='userdanger'>A tentacle grabs you and throws you towards [H]!</span>")
C.throw_at(get_step_towards(H,C), 8, 2, H, TRUE, TRUE, callback=CALLBACK(src, .proc/tentacle_stab, H, C))
return 1
return BULLET_ACT_HIT
else
L.visible_message("<span class='danger'>[L] is pulled by [H]'s tentacle!</span>","<span class='userdanger'>A tentacle grabs you and pulls you towards [H]!</span>")
L.throw_at(get_step_towards(H,L), 8, 2)
. = 1
. = BULLET_ACT_HIT
/obj/item/projectile/tentacle/Destroy()
qdel(chain)
@@ -319,9 +319,9 @@
L.dust()
else
if(!GLOB.ratvar_awakens && L.stat == CONSCIOUS)
vitality_drained = L.adjustToxLoss(1)
vitality_drained = L.adjustToxLoss(1, forced = TRUE)
else
vitality_drained = L.adjustToxLoss(1.5)
vitality_drained = L.adjustToxLoss(1.5, forced = TRUE)
if(vitality_drained)
GLOB.clockwork_vitality += vitality_drained
else
@@ -182,7 +182,7 @@
if(isliving(target))
var/mob/living/L = target
if(is_servant_of_ratvar(L) || L.stat || L.has_status_effect(STATUS_EFFECT_KINDLE))
return
return BULLET_ACT_HIT
var/atom/O = L.anti_magic_check()
playsound(L, 'sound/magic/fireball.ogg', 50, TRUE, frequency = 1.25)
if(O)
@@ -45,10 +45,10 @@
bonus_damage *= 3 //total 30 damage on cultists, 50 with ratvar
GLOB.clockwork_vitality += target.adjustFireLoss(bonus_damage) //adds the damage done to existing vitality
/obj/item/clockwork/weapon/ratvarian_spear/throw_impact(atom/target)
var/turf/T = get_turf(target)
if(isliving(target))
var/mob/living/L = target
/obj/item/clockwork/weapon/ratvarian_spear/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
var/turf/T = get_turf(hit_atom)
if(isliving(hit_atom))
var/mob/living/L = hit_atom
if(is_servant_of_ratvar(L))
if(L.put_in_active_hand(src))
L.visible_message("<span class='warning'>[L] catches [src] out of the air!</span>")
@@ -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()
. = ..()
@@ -97,7 +97,7 @@
/mob/living/simple_animal/hostile/clockwork/marauder/bullet_act(obj/item/projectile/P)
if(deflect_projectile(P))
return
return BULLET_ACT_BLOCK
return ..()
/mob/living/simple_animal/hostile/clockwork/marauder/proc/deflect_projectile(obj/item/projectile/P)
@@ -31,7 +31,7 @@
if(auto_reflect(P, P.dir, get_turf(P), P.Angle) != -1)
return ..()
return -1
return BULLET_ACT_FORCE_PIERCE
/obj/structure/destructible/clockwork/reflector/proc/auto_reflect(obj/item/projectile/P, pdir, turf/ploc, pangle)
+9 -9
View File
@@ -265,7 +265,7 @@
to_chat(user, "<span class='warning'>The bola seems to take on a life of its own!</span>")
throw_impact(user)
/obj/item/restraints/legcuffs/bola/cult/throw_impact(atom/hit_atom)
/obj/item/restraints/legcuffs/bola/cult/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(iscultist(hit_atom))
return
. = ..()
@@ -690,10 +690,10 @@
/obj/item/twohanded/cult_spear/update_icon()
icon_state = "bloodspear[wielded]"
/obj/item/twohanded/cult_spear/throw_impact(atom/target)
var/turf/T = get_turf(target)
if(isliving(target))
var/mob/living/L = target
/obj/item/twohanded/cult_spear/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
var/turf/T = get_turf(hit_atom)
if(isliving(hit_atom))
var/mob/living/L = hit_atom
if(iscultist(L))
playsound(src, 'sound/weapons/throwtap.ogg', 50)
if(L.put_in_active_hand(src))
@@ -987,11 +987,11 @@
return TRUE
return FALSE
/obj/item/shield/mirror/throw_impact(atom/target, throwingdatum)
var/turf/T = get_turf(target)
/obj/item/shield/mirror/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
var/turf/T = get_turf(hit_atom)
var/datum/thrownthing/D = throwingdatum
if(isliving(target))
var/mob/living/L = target
if(isliving(hit_atom))
var/mob/living/L = hit_atom
if(iscultist(L))
playsound(src, 'sound/weapons/throwtap.ogg', 50)
if(L.put_in_active_hand(src))
@@ -44,7 +44,7 @@
wander = FALSE
density = FALSE
movement_type = FLYING
anchored = TRUE
move_resist = MOVE_FORCE_OVERPOWERING
mob_size = MOB_SIZE_TINY
pass_flags = PASSTABLE | PASSGRILLE | PASSMOB
speed = 1
@@ -361,7 +361,7 @@
user.dropItemToGround(src)
scatter()
/obj/item/ectoplasm/revenant/throw_impact(atom/hit_atom)
/obj/item/ectoplasm/revenant/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
..()
if(inert)
return
@@ -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
@@ -142,7 +142,7 @@
. = ..()
olddir = dir
/obj/item/assembly/infra/throw_impact()
/obj/item/assembly/infra/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
. = ..()
if(!olddir)
return
+2 -2
View File
@@ -130,10 +130,10 @@
return FALSE
/obj/item/assembly/mousetrap/hitby(A as mob|obj)
/obj/item/assembly/mousetrap/hitby(atom/hit_atom, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)
if(!armed)
return ..()
visible_message("<span class='warning'>[src] is triggered by [A].</span>")
visible_message("<span class='warning'>[src] is triggered by [hit_atom].</span>")
triggered(null)
+1 -1
View File
@@ -24,7 +24,7 @@
recorded = raw_message
listening = FALSE
languages = message_language
say("Activation message is '[recorded]'.", language = message_language)
say("The recorded message is '[recorded]'.", language = message_language)
/obj/item/assembly/playback/activate()
if(recorded == "") // Why say anything when there isn't anything to say
+4 -3
View File
@@ -34,9 +34,10 @@
if(listening && !radio_freq)
record_speech(speaker, raw_message, message_language)
else
if(message_language == languages) // If it isn't in the same language as the message, don't try to find the message
if(check_activation(speaker, raw_message))
addtimer(CALLBACK(src, .proc/pulse, 0), 10)
if(!istype(speaker, /obj/item/assembly/playback)) // Check if it isn't a playback device to prevent spam and lag
if(message_language == languages) // If it isn't in the same language as the message, don't try to find the message
if(check_activation(speaker, raw_message)) // Is it the message?
addtimer(CALLBACK(src, .proc/pulse, 0), 10)
/obj/item/assembly/voice/proc/record_speech(atom/movable/speaker, raw_message, datum/language/message_language)
languages = message_language // Assign the message's language to a variable to use it elsewhere
@@ -267,12 +267,13 @@
/atom/movable/proc/experience_pressure_difference(pressure_difference, direction, pressure_resistance_prob_delta = 0)
var/const/PROBABILITY_OFFSET = 25
var/const/PROBABILITY_BASE_PRECENT = 75
var/max_force = sqrt(pressure_difference)*(MOVE_FORCE_DEFAULT / 5)
set waitfor = 0
var/move_prob = 100
if (pressure_resistance > 0)
move_prob = (pressure_difference/pressure_resistance*PROBABILITY_BASE_PRECENT)-PROBABILITY_OFFSET
move_prob += pressure_resistance_prob_delta
if (move_prob > PROBABILITY_OFFSET && prob(move_prob))
if (move_prob > PROBABILITY_OFFSET && prob(move_prob) && (move_resist != INFINITY) && (!anchored && (max_force >= (move_resist * MOVE_FORCE_PUSH_RATIO))) || (anchored && (max_force >= (move_resist * MOVE_FORCE_FORCEPUSH_RATIO))))
step(src, direction)
last_high_pressure_movement_air_cycle = SSair.times_fired
@@ -1,19 +1,18 @@
/*
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
/obj/machinery/atmospherics
anchored = TRUE
move_resist = INFINITY //Moving a connected machine without actually doing the normal (dis)connection things will probably cause a LOT of issues.
idle_power_usage = 0
active_power_usage = 0
power_channel = ENVIRON
@@ -100,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()
@@ -118,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)
@@ -175,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
@@ -234,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))
@@ -254,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)
@@ -319,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)
@@ -331,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)
@@ -355,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"
@@ -0,0 +1,108 @@
/obj/machinery/atmospherics/components/binary/relief_valve
name = "binary pressure relief valve"
desc = "Like a manual valve, but opens at a certain pressure rather than being toggleable."
icon = 'icons/obj/atmospherics/components/relief_valve.dmi'
icon_state = "relief_valve-t-map"
can_unwrench = TRUE
construction_type = /obj/item/pipe/binary
var/opened = FALSE
var/open_pressure = ONE_ATMOSPHERE * 3
var/close_pressure = ONE_ATMOSPHERE
pipe_state = "relief_valve-t"
/obj/machinery/atmospherics/components/binary/relief_valve/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/relief_valve/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/relief_valve/update_icon_nopipes()
if(dir==SOUTH)
setDir(NORTH)
else if(dir==WEST)
setDir(EAST)
cut_overlays()
if(!nodes[1] || !opened || !is_operational())
icon_state = "relief_valve-t"
return
icon_state = "relief_valve-t-blown"
/obj/machinery/atmospherics/components/binary/relief_valve/proc/open()
opened = TRUE
update_icon_nopipes()
update_parents()
var/datum/pipeline/parent1 = parents[1]
parent1.reconcile_air()
/obj/machinery/atmospherics/components/binary/relief_valve/proc/close()
opened = FALSE
update_icon_nopipes()
/obj/machinery/atmospherics/components/binary/relief_valve/process_atmos()
..()
if(!is_operational())
return
var/datum/gas_mixture/air_contents = airs[1]
var/our_pressure = air_contents.return_pressure()
if(opened && our_pressure < close_pressure)
close()
else if(!opened && our_pressure >= open_pressure)
open()
/obj/machinery/atmospherics/components/binary/relief_valve/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "atmos_relief", name, 335, 115, master_ui, state)
ui.open()
/obj/machinery/atmospherics/components/binary/relief_valve/ui_data()
var/data = list()
data["open_pressure"] = round(open_pressure)
data["close_pressure"] = round(close_pressure)
data["max_pressure"] = round(50*ONE_ATMOSPHERE)
return data
/obj/machinery/atmospherics/components/binary/relief_valve/ui_act(action, params)
if(..())
return
switch(action)
if("open_pressure")
var/pressure = params["open_pressure"]
if(pressure == "max")
pressure = 50*ONE_ATMOSPHERE
. = TRUE
else if(pressure == "input")
pressure = input("New output pressure ([close_pressure]-[50*ONE_ATMOSPHERE] kPa):", name, open_pressure) as num|null
if(!isnull(pressure) && !..())
. = TRUE
else if(text2num(pressure) != null)
pressure = text2num(pressure)
. = TRUE
if(.)
open_pressure = CLAMP(pressure, close_pressure, 50*ONE_ATMOSPHERE)
investigate_log("open pressure was set to [open_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
if("close_pressure")
var/pressure = params["close_pressure"]
if(pressure == "max")
pressure = open_pressure
. = TRUE
else if(pressure == "input")
pressure = input("New output pressure (0-[open_pressure] kPa):", name, close_pressure) as num|null
if(!isnull(pressure) && !..())
. = TRUE
else if(text2num(pressure) != null)
pressure = text2num(pressure)
. = TRUE
if(.)
close_pressure = CLAMP(pressure, 0, open_pressure)
investigate_log("close pressure was set to [close_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
update_icon()
@@ -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
@@ -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
@@ -57,6 +57,11 @@
heat_capacity = initial(heat_capacity) / C
conduction_coefficient = initial(conduction_coefficient) * C
/obj/machinery/atmospherics/components/unary/cryo_cell/examine(mob/user) //this is leaving out everything but efficiency since they follow the same idea of "better matter bin, better results"
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Efficiency at <b>[efficiency*100]%</b>.</span>"
/obj/machinery/atmospherics/components/unary/cryo_cell/Destroy()
QDEL_NULL(radio)
QDEL_NULL(beaker)
@@ -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
@@ -0,0 +1,63 @@
/obj/machinery/atmospherics/components/unary/passive_vent
icon_state = "passive_vent_map-2"
name = "passive vent"
desc = "It is an open vent."
can_unwrench = TRUE
level = 1
layer = GAS_SCRUBBER_LAYER
pipe_state = "pvent"
/obj/machinery/atmospherics/components/unary/passive_vent/update_icon_nopipes()
cut_overlays()
if(showpipe)
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/active = FALSE
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 = (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
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 = 1
icon_state = "passive_vent_map-1"
/obj/machinery/atmospherics/components/unary/passive_vent/layer3
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"
@@ -0,0 +1,111 @@
/obj/machinery/atmospherics/components/unary/relief_valve
name = "pressure relief valve"
desc = "A valve that opens to the air at a certain pressure, then closes once it goes below another."
icon = 'icons/obj/atmospherics/components/relief_valve.dmi'
icon_state = "relief_valve-e-map"
can_unwrench = TRUE
var/opened = FALSE
var/open_pressure = ONE_ATMOSPHERE * 3
var/close_pressure = ONE_ATMOSPHERE
pipe_state = "relief_valve-e"
/obj/machinery/atmospherics/components/unary/relief_valve/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/relief_valve/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/relief_valve/atmos
close_pressure = ONE_ATMOSPHERE * 2
/obj/machinery/atmospherics/components/unary/relief_valve/atmos/atmos_waste
name = "atmos waste relief valve"
/obj/machinery/atmospherics/components/unary/relief_valve/update_icon_nopipes()
cut_overlays()
if(!nodes[1] || !opened || !is_operational())
icon_state = "relief_valve-e"
return
icon_state = "relief_valve-e-blown"
/obj/machinery/atmospherics/components/unary/relief_valve/process_atmos()
..()
if(!is_operational())
return
var/datum/gas_mixture/air_contents = airs[1]
var/our_pressure = air_contents.return_pressure()
if(opened && our_pressure < close_pressure)
opened = FALSE
update_icon_nopipes()
else if(!opened && our_pressure >= open_pressure)
opened = TRUE
update_icon_nopipes()
if(opened && air_contents.temperature > 0)
var/datum/gas_mixture/environment = loc.return_air()
var/pressure_delta = our_pressure - environment.return_pressure()
var/transfer_moles = pressure_delta*200/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
if(transfer_moles > 0)
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
loc.assume_air(removed)
air_update_turf()
update_parents()
/obj/machinery/atmospherics/components/unary/relief_valve/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "atmos_relief", name, 335, 115, master_ui, state)
ui.open()
/obj/machinery/atmospherics/components/unary/relief_valve/ui_data()
var/data = list()
data["open_pressure"] = round(open_pressure)
data["close_pressure"] = round(close_pressure)
data["max_pressure"] = round(50*ONE_ATMOSPHERE)
return data
/obj/machinery/atmospherics/components/unary/relief_valve/ui_act(action, params)
if(..())
return
switch(action)
if("open_pressure")
var/pressure = params["open_pressure"]
if(pressure == "max")
pressure = 50*ONE_ATMOSPHERE
. = TRUE
else if(pressure == "input")
pressure = input("New output pressure ([close_pressure]-[50*ONE_ATMOSPHERE] kPa):", name, open_pressure) as num|null
if(!isnull(pressure) && !..())
. = TRUE
else if(text2num(pressure) != null)
pressure = text2num(pressure)
. = TRUE
if(.)
open_pressure = CLAMP(pressure, close_pressure, 50*ONE_ATMOSPHERE)
investigate_log("open pressure was set to [open_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
if("close_pressure")
var/pressure = params["close_pressure"]
if(pressure == "max")
pressure = open_pressure
. = TRUE
else if(pressure == "input")
pressure = input("New output pressure (0-[open_pressure] kPa):", name, close_pressure) as num|null
if(!isnull(pressure) && !..())
. = TRUE
else if(text2num(pressure) != null)
pressure = text2num(pressure)
. = TRUE
if(.)
close_pressure = CLAMP(pressure, 0, open_pressure)
investigate_log("close pressure was set to [close_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
update_icon()
@@ -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
@@ -227,6 +227,11 @@
if(V.on)
PL |= V.parents[1]
PL |= V.parents[2]
else if (istype(atmosmch,/obj/machinery/atmospherics/components/binary/relief_valve))
var/obj/machinery/atmospherics/components/binary/relief_valve/V = atmosmch
if(V.opened)
PL |= V.parents[1]
PL |= V.parents[2]
else if (istype(atmosmch, /obj/machinery/atmospherics/components/unary/portables_connector))
var/obj/machinery/atmospherics/components/unary/portables_connector/C = atmosmch
if(C.connected_device)
@@ -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,4 +1,4 @@
//3-way manifold
//3-Way Manifold
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold
icon_state = "manifold"
@@ -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()
+15 -8
View File
@@ -10,13 +10,13 @@
/datum/bounty/item/assistant/skateboard
name = "Skateboard"
description = "Nanotrasen has determined walking to be wasteful. Ship a skateboard to CentCom to speed operations up."
reward = 750 // the tony hawk
reward = 800 // the tony hawk
wanted_types = list(/obj/vehicle/ridden/scooter/skateboard)
/datum/bounty/item/assistant/stunprod
name = "Stunprod"
description = "CentCom demands a stunprod to use against dissidents. Craft one, then ship it."
reward = 800
reward = 950
wanted_types = list(/obj/item/melee/baton/cattleprod)
/datum/bounty/item/assistant/soap
@@ -126,7 +126,7 @@
/datum/bounty/item/assistant/shadyjims
name = "Shady Jim's"
description = "There's an irate officer at CentCom demanding that he receive a box of Shady Jim's cigarettes. Please ship one. He's starting to make threats."
reward = 750
reward = 1150
wanted_types = list(/obj/item/storage/fancy/cigarettes/cigpack_shadyjims)
/datum/bounty/item/assistant/potted_plants
@@ -148,14 +148,14 @@
reward = 1000
required_count = 5
wanted_types = list(/obj/item/restraints/handcuffs)
/* I don't like that you can just buy a box of monkey cubes and finish this for -half- of them.
/datum/bounty/item/assistant/monkey_cubes
name = "Monkey Cubes"
description = "Due to a recent genetics accident, Central Command is in serious need of monkeys. Your mission is to ship monkey cubes."
reward = 2000
required_count = 3
wanted_types = list(/obj/item/reagent_containers/food/snacks/monkeycube)
*/
/datum/bounty/item/assistant/chainsaw
name = "Chainsaw"
description = "The chef at CentCom is having trouble butchering her animals. She requests one chainsaw, please."
@@ -208,15 +208,22 @@
wanted_types = list(/obj/item/shield/makeshift)
/datum/bounty/item/assistant/toolbelts
name = "Tool Belts"
name = "Tool Belts" //Made it 5 so you can't just buy one set of toolbelts to finish the bounty.
description = "These things always seem to go missing. Ship us a few to help us restock."
reward = 1350
required_count = 3
required_count = 5
wanted_types = list(/obj/item/storage/belt/utility)
/datum/bounty/item/assistant/gasmasks
name = "Gas Masks"
description = "The good news is that we have more miasma than we'll ever need. The bad news is, somone opened the release valve on the canisters. Ship us some gas masks!"
reward = 1100
reward = 1250
required_count = 4
wanted_types = list(/obj/item/clothing/mask/gas)
/datum/bounty/item/assistant/pneumatic_cannon
name = "Pneumatic Cannons"
description = "Have you ever launched a tennis ball, newspaper, or ***** at someones head from across the room? No? We haven't either. Help us rectify this."
reward = 2000
required_count = 2
wanted_types = list(/obj/item/pneumatic_cannon/ghetto)
+135 -99
View File
@@ -10,22 +10,23 @@
reward += multiplier * 1000
required_count = rand(5, 10)
//Easy Stuff (1200)
/datum/bounty/item/botany/ambrosia_vulgaris
name = "Ambrosia Vulgaris Leaves"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/ambrosia/vulgaris)
foodtype = "stew"
/datum/bounty/item/botany/ambrosia_gaia
name = "Ambrosia Gaia Leaves"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/ambrosia/gaia)
multiplier = 4
foodtype = "stew"
/datum/bounty/item/botany/pineapples
name = "Pineapples"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/pineapple)
bonus_desc = "Not for human consumption."
foodtype = "ashtray"
/datum/bounty/item/botany/apple_golden
name = "Golden Apples"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/apple/gold)
multiplier = 4
foodtype = "dessert"
/datum/bounty/item/botany/tomato
name = "Tomatoes"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/tomato)
exclude_types = list(/obj/item/reagent_containers/food/snacks/grown/tomato/blue)
/datum/bounty/item/botany/banana
name = "Bananas"
@@ -33,58 +34,9 @@
exclude_types = list(/obj/item/reagent_containers/food/snacks/grown/banana/bluespace)
foodtype = "banana split"
/datum/bounty/item/botany/banana_bluespace
name = "Bluespace Bananas"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/banana/bluespace)
multiplier = 2
foodtype = "banana split"
/datum/bounty/item/botany/beans_koi
name = "Koi Beans"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/koibeans)
multiplier = 2
/datum/bounty/item/botany/berries_death
name = "Death Berries"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/berries/death)
multiplier = 2
bonus_desc = "He insists that \"he knows what he's doing\"."
foodtype = "sorbet"
/datum/bounty/item/botany/berries_glow
name = "Glow-Berries"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/berries/glow)
multiplier = 2
foodtype = "sorbet"
/datum/bounty/item/botany/cannabis
name = "Cannabis Leaves"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/cannabis)
exclude_types = list(/obj/item/reagent_containers/food/snacks/grown/cannabis/white, /obj/item/reagent_containers/food/snacks/grown/cannabis/death, /obj/item/reagent_containers/food/snacks/grown/cannabis/ultimate)
multiplier = 4 //hush money
bonus_desc = "Do not mention this shipment to security."
foodtype = "\"meal\""
/datum/bounty/item/botany/cannabis_white
name = "Lifeweed Leaves"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/cannabis/white)
multiplier = 6
bonus_desc = "Do not mention this shipment to security."
foodtype = "\"meal\""
/datum/bounty/item/botany/cannabis_death
name = "Deathweed Leaves"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/cannabis/death)
multiplier = 6
bonus_desc = "Do not mention this shipment to security."
foodtype = "\"meal\""
/datum/bounty/item/botany/cannabis_ultimate
name = "Omega Weed Leaves"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/cannabis/ultimate)
multiplier = 6
bonus_desc = "Under no circumstances mention this shipment to security."
foodtype = "\"meal\""
/datum/bounty/item/botany/coconuts
name = "Coconuts"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/coconut)
/datum/bounty/item/botany/wheat
name = "Wheat Grains"
@@ -98,16 +50,6 @@
name = "Chili Peppers"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/chili)
/datum/bounty/item/botany/chili
name = "Ice Chili Peppers"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/icepepper)
multiplier = 2
/datum/bounty/item/botany/chili
name = "Ghost Chili Peppers"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/ghost_chili)
multiplier = 2
/datum/bounty/item/botany/citrus_lime
name = "Limes"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/citrus/lime)
@@ -129,35 +71,85 @@
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/eggplant)
bonus_desc = "Not to be confused with egg-plants."
/datum/bounty/item/botany/eggplant_eggy
name = "Egg-plants"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/shell/eggy)
bonus_desc = "Not to be confused with eggplants."
multiplier = 2
// /datum/bounty/item/botany/kudzu
// name = "Kudzu Pods"
// wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/kudzupod)
// bonus_desc = "Store in a dry, dark place."
// multiplier = 4
/datum/bounty/item/botany/watermelon
name = "Watermelons"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/watermelon)
foodtype = "dessert"
/datum/bounty/item/botany/watermelon_holy
name = "Holy Melons"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/holymelon)
multiplier = 2
foodtype = "dessert"
/datum/bounty/item/botany/glowshroom
name = "Glowshrooms"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/mushroom/glowshroom)
exclude_types = list(/obj/item/reagent_containers/food/snacks/grown/mushroom/glowshroom/glowcap, /obj/item/reagent_containers/food/snacks/grown/mushroom/glowshroom/shadowshroom)
foodtype = "omelet"
//Medium Stuff (2400)
/datum/bounty/item/botany/moonflower
name = "Moonflowers"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/moonflower)
multiplier = 2
/datum/bounty/item/botany/novaflower
name = "Novaflowers"
wanted_types = list(/obj/item/grown/novaflower)
multiplier = 2
/datum/bounty/item/botany/banana_bluespace
name = "Bluespace Bananas"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/banana/bluespace)
multiplier = 2
foodtype = "banana split"
/datum/bounty/item/botany/beans_koi
name = "Koi Beans"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/koibeans)
multiplier = 2
/datum/bounty/item/botany/coffee_robusta
name = "Coffee Robusta Beans"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/coffee/robusta)
multiplier = 2
/datum/bounty/item/botany/steelcaps
name = "Steelcap Logs"
wanted_types = list(/obj/item/grown/log/steel)
multiplier = 2
/datum/bounty/item/botany/berries_death
name = "Death Berries"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/berries/death)
multiplier = 2
bonus_desc = "He insists that \"he knows what he's doing\"."
foodtype = "sorbet"
/datum/bounty/item/botany/berries_glow
name = "Glow-Berries"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/berries/glow)
multiplier = 2
foodtype = "sorbet"
/datum/bounty/item/botany/chili
name = "Ice Chili Peppers"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/icepepper)
multiplier = 2
/datum/bounty/item/botany/chili
name = "Ghost Chili Peppers"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/ghost_chili)
multiplier = 2
/datum/bounty/item/botany/eggplant_eggy
name = "Egg-plants"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/shell/eggy)
bonus_desc = "Not to be confused with eggplants."
multiplier = 2
/datum/bounty/item/botany/watermelon_holy
name = "Holy Melons"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/holymelon)
multiplier = 2
foodtype = "dessert"
/datum/bounty/item/botany/glowshroom_cap
name = "Glowcaps"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/mushroom/glowshroom/glowcap)
@@ -177,18 +169,62 @@
bonus_desc = "Wear protection when handling them."
foodtype = "cheese"
/datum/bounty/item/botany/pineapples
name = "Pineapples"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/pineapple)
bonus_desc = "Not for human consumption."
foodtype = "ashtray"
//Harder Stuff (3600-7200)
/datum/bounty/item/botany/tomato
name = "Tomatoes"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/tomato)
exclude_types = list(/obj/item/reagent_containers/food/snacks/grown/tomato/blue)
// /datum/bounty/item/botany/kudzu
// name = "Kudzu Pods"
// wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/kudzupod)
// bonus_desc = "Store in a dry, dark place."
// multiplier = 4
/datum/bounty/item/botany/bungopit
name = "Bungo Pits"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/bungopit)
bonus_desc = "Heartbreaker."
multiplier = 4
/datum/bounty/item/botany/ambrosia_gaia
name = "Ambrosia Gaia Leaves"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/ambrosia/gaia)
multiplier = 4
foodtype = "stew"
/datum/bounty/item/botany/apple_golden
name = "Golden Apples"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/apple/gold)
multiplier = 4
foodtype = "dessert"
/datum/bounty/item/botany/tomato_bluespace
name = "Bluespace Tomatoes"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/tomato/blue/bluespace)
multiplier = 4
/datum/bounty/item/botany/cannabis
name = "Cannabis Leaves"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/cannabis)
exclude_types = list(/obj/item/reagent_containers/food/snacks/grown/cannabis/white, /obj/item/reagent_containers/food/snacks/grown/cannabis/death, /obj/item/reagent_containers/food/snacks/grown/cannabis/ultimate)
multiplier = 3 //hush money
bonus_desc = "Do not mention this shipment to security."
foodtype = "\"meal\""
/datum/bounty/item/botany/cannabis_white
name = "Lifeweed Leaves"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/cannabis/white)
multiplier = 5
bonus_desc = "Do not mention this shipment to security."
foodtype = "\"meal\""
/datum/bounty/item/botany/cannabis_death
name = "Deathweed Leaves"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/cannabis/death)
multiplier = 5
bonus_desc = "Do not mention this shipment to security."
foodtype = "\"meal\""
/datum/bounty/item/botany/cannabis_ultimate
name = "Omega Weed Leaves"
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/cannabis/ultimate)
multiplier = 6
bonus_desc = "Under no circumstances mention this shipment to security."
foodtype = "\"meal\""
+19 -17
View File
@@ -2,16 +2,17 @@
/datum/bounty/item/chef/soup
name = "Soup"
description = "To quell the homeless uprising, Nanotrasen will be serving soup to all underpaid workers. Ship any type of soup."
reward = 700
required_count = 3
description = "To quell the homeless uprising, Nanotrasen will be serving soup to all underpaid workers. Ship any type of soup. Do NOT ship bowls of water."
reward = 1200
required_count = 4
wanted_types = list(/obj/item/reagent_containers/food/snacks/soup)
exclude_types = list(/obj/item/reagent_containers/food/snacks/soup/wish)
/datum/bounty/item/chef/icecreamsandwich
name = "Ice Cream Sandwiches"
description = "Upper management has been screaming non-stop for ice cream. Please send some."
reward = 800
required_count = 3
reward = 1200
required_count = 5
wanted_types = list(/obj/item/reagent_containers/food/snacks/icecreamsandwich)
/datum/bounty/item/chef/bread
@@ -26,6 +27,13 @@
reward = 3142
wanted_types = list(/obj/item/reagent_containers/food/snacks/pie)
/datum/bounty/item/gardencook/khinkali
name = "Khinkali"
description = "Requesting -some khinki stuff- for a private staff party at Centcom."
reward = 2400
required_count = 6
wanted_types = list(/obj/item/reagent_containers/food/snacks/khinkali)
/datum/bounty/item/chef/salad
name = "Salad or Rice Bowls"
description = "CentCom management is going on a health binge. Your order is to ship salad or rice bowls."
@@ -33,18 +41,6 @@
required_count = 3
wanted_types = list(/obj/item/reagent_containers/food/snacks/salad)
/datum/bounty/item/chef/superbite
name = "Super Bite Burger"
description = "Commander Tubbs thinks he can set a competitive eating world record. All he needs is a super bite burger shipped to him."
reward = 1800
wanted_types = list(/obj/item/reagent_containers/food/snacks/burger/superbite)
/datum/bounty/item/chef/poppypretzel
name = "Poppy Pretzel"
description = "Central Command needs a reason to fire their HR head. Send over a poppy pretzel to force a failed drug test."
reward = 3000
wanted_types = list(/obj/item/reagent_containers/food/snacks/poppypretzel)
// /datum/bounty/item/chef/cubancarp
// name = "Cuban Carp"
// description = "To celebrate the birth of Castro XXVII, ship one cuban carp to CentCom."
@@ -135,3 +131,9 @@
reward = 1200
required_count = 6
wanted_types = list(/obj/item/reagent_containers/food/snacks/sugarcookie)
/datum/bounty/item/chef/bbqribs
description = "There's a debate around command as to weather or not ribs should be considered finger food, and we need a few delicious racks to process."
reward = 2250
required_count = 3
wanted_types = list(/obj/item/reagent_containers/food/snacks/bbqribs)
+4 -4
View File
@@ -40,14 +40,14 @@
/datum/bounty/item/engineering/microwave
name = "Microwaves"
description = "Due to a shortage of microwaves, our chefs are incapable of keeping up with our sheer volume of orders. We need at least three microwaves to keep up with our crew's dietary habits."
reward = 1000
reward = 2000
required_count = 3
wanted_types = list(/obj/machinery/microwave)
/datum/bounty/item/engineering/hydroponicstrays
name = "Hydroponics Tray"
description = "The garden has become a hot spot of late, they need a few more hydroponics tray to grow more flowers."
reward = 1500
reward = 2500
required_count = 5
wanted_types = list(/obj/machinery/hydroponics)
@@ -75,14 +75,14 @@
/datum/bounty/item/engineering/arcadetrail
name = "Orion Trail Arcade Games"
description = "The staff have nothing to do when off-work. Can you send us some Orion Trail games to play?"
reward = 1500
reward = 2500
required_count = 5
wanted_types = list(/obj/machinery/computer/arcade/orion_trail)
/datum/bounty/item/engineering/arcadebattle
name = "Battle Arcade Games"
description = "The staff have nothing to do when off-work. Can you send us some Battle Arcade games to play?"
reward = 1500
reward = 2500
required_count = 5
wanted_types = list(/obj/machinery/computer/arcade/battle)
+22 -10
View File
@@ -1,7 +1,7 @@
/datum/bounty/item/chef/birthday_cake
name = "Birthday Cake"
description = "Nanotrasen's birthday is coming up! Ship them a birthday cake to celebrate!"
reward = 1000
reward = 1800
wanted_types = list(/obj/item/reagent_containers/food/snacks/store/cake/birthday, /obj/item/reagent_containers/food/snacks/cakeslice/birthday)
/datum/bounty/item/gardencook/carrotfries
@@ -21,24 +21,17 @@
/datum/bounty/item/gardencook/popcorn
name = "Popcorn Bags"
description = "Upper management wants to host a movie night. Ship bags of popcorn for the occasion."
reward = 800
reward = 1200
required_count = 3
wanted_types = list(/obj/item/reagent_containers/food/snacks/popcorn)
/datum/bounty/item/gardencook/onionrings
name = "Onion Rings"
description = "Nanotrasen is remembering Saturn day. Ship onion rings to show the station's support."
reward = 800
reward = 1200
required_count = 3
wanted_types = list(/obj/item/reagent_containers/food/snacks/onionrings)
/datum/bounty/item/gardencook/khinkali
name = "Khinkali"
description = "Requesting -some khinki stuff- for a private staff party at Centcom"
reward = 2400
required_count = 6
wanted_types = list(/obj/item/reagent_containers/food/snacks/khinkali)
/datum/bounty/item/gardencook/bakedbeans
name = "Beans"
description = "Management wants to make sure we have a fallback shelter to rely on. Prepare some beans to stock it with."
@@ -51,3 +44,22 @@
description = "Something sticky, something fun, ship us a honeybun."
reward = 3500
wanted_types = list(/obj/item/reagent_containers/food/snacks/honeybun)
/datum/bounty/item/chef/superbite
name = "Super Bite Burger" //Salt, Pepper, Boiled Egg, 5 Steak, 4 Tomato, 3 Cheese, Bacon, and a Bun. Should be more than 1800.
description = "Commander Tubbs thinks he can set a competitive eating world record. All he needs is a super bite burger shipped to him."
reward = 2750
wanted_types = list(/obj/item/reagent_containers/food/snacks/burger/superbite)
/datum/bounty/item/chef/poppypretzel
name = "Poppy Pretzel"
description = "Central Command needs a reason to fire their HR head. Send over a poppy pretzel to force a failed drug test."
reward = 1800
wanted_types = list(/obj/item/reagent_containers/food/snacks/poppypretzel)
/datum/bounty/item/chef/fiestaskewer
name = "Fiesta Skewer"
description = "Apparently people are putting vegetables on kebabs now. Central Command has taken an interest in this turn of events and would like to know more."
reward = 2600
required_count = 3
wanted_types = list(/obj/item/reagent_containers/food/snacks/kebab/fiesta)
+1 -1
View File
@@ -121,7 +121,7 @@
/datum/bounty/item/medical/defibrillator
name = "New defibillators"
description = "After years of storge are defibrillator units have become more liabilities then we want. Please send us some new ones to replace these old ones."
description = "After years of storge our defib units have become liabilities. Please send us some new ones."
reward = 2250
required_count = 5
wanted_types = list(/obj/item/defibrillator)
+3 -3
View File
@@ -25,7 +25,7 @@
/datum/bounty/item/science/nightvision_goggles
name = "Night Vision Goggles"
description = "An electrical storm has busted all the lights at CentCom. While management is waiting for replacements, perhaps some night vision goggles can be shipped?"
reward = 1000
reward = 1250
wanted_types = list(/obj/item/clothing/glasses/night, /obj/item/clothing/glasses/meson/night, /obj/item/clothing/glasses/hud/health/night, /obj/item/clothing/glasses/hud/security/night, /obj/item/clothing/glasses/hud/diagnostic/night)
/datum/bounty/item/science/experimental_welding_tool
@@ -55,7 +55,7 @@
/datum/bounty/item/science/advanced_mop
name = "Advanced Mop"
description = "Excuse me. I'd like to request $17 for a push broom rebristling. Either that, or an advanced mop."
description = "Excuse me. I'd like to request 17 credits for a push broom rebristling. Either that, or an advanced mop."
reward = 3000
wanted_types = list(/obj/item/mop/advanced)
@@ -108,7 +108,7 @@
wanted_types = list(/obj/item/stock_parts/micro_laser/quadultra)
/datum/bounty/item/science/fakecrystals
name = "synthetic bluespace crystals"
name = "Synthetic Bluespace Crystals"
description = "Don't, uh, tell anyone, but one of our BSA arrays might have had a little... accident. Send us some bluespace crystals so we can recalibrate it before anyone realizes. The whole set uses artificial bluespace crystals, so we need and not any other type of bluespace crystals..."
reward = 8000
required_count = 5
+14 -1
View File
@@ -51,4 +51,17 @@
name = "Strange Object"
description = "Nanotrasen has taken an interest in strange objects. Find one in maint, and ship it off to CentCom right away."
reward = 1000
wanted_types = list(/obj/item/relic)
wanted_types = list(/obj/item/relic)
/datum/bounty/item/silly/coconut_bong
name = "Coconut Bong"
description = "Duuuude, what if we like, carved out a coconut, and smoked some stuff in it. It'd be like, coconut flavored maaaaaan."
reward = 2750
wanted_types = list(/obj/item/bong/coconut)
/datum/bounty/item/silly/toy_swords
name = "Toy Swords"
description = "Nanotrasen has secured a contract in a reenactment of a famous movie, but we only have lethal energy based swords. Send us some convincing replicas so we save on medical costs."
reward = 1200
required_count = 3
wanted_types = list(/obj/item/toy/sword, /obj/item/toy/sword/cx)
+8 -3
View File
@@ -24,7 +24,8 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they
var/list/exported_atoms = list()//names of atoms sold/deleted by export
var/list/total_amount = list() //export instance => total count of sold objects of its type, only exists if any were sold
var/list/total_value = list() //export instance => total value of sold objects
var/list/total_reagents = list()//export reagents => into the total vaule of the object sold
var/list/reagents_volume = list()//export reagents => into the total volume of the object sold
var/list/reagents_value = list()//export reagents => into the reagent type total value.
// external_report works as "transaction" object, pass same one in if you're doing more than one export in single go
/proc/export_item_and_contents(atom/movable/AM, allowed_categories = EXPORT_CARGO, apply_elastic = TRUE, delete_unsold = TRUE, dry_run=FALSE, datum/export_report/external_report)
@@ -49,8 +50,12 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they
report.exported_atoms += " [thing.name]"
break
if(thing.reagents)
for(var/datum/reagent/R in thing.reagents.reagent_list)
report.total_reagents[R] += R.volume
for(var/A in thing.reagents.reagent_list)
var/datum/reagent/R = A
if(!R.value)
continue
report.reagents_volume[R.name] += R.volume
report.reagents_value[R.name] += R.volume * R.value
if(!dry_run && (sold || delete_unsold))
if(ismob(thing))
thing.investigate_log("deleted through cargo export",INVESTIGATE_CARGO)
+14 -8
View File
@@ -20,15 +20,9 @@
/datum/supply_pack/engineering/conveyor
name = "Conveyor Assembly Crate"
desc = "Keep production moving along with six conveyor belts. Conveyor switch included. If you have any questions, check out the enclosed instruction book."
desc = "Keep production moving along with fifteen conveyor belts. Conveyor switch included. If you have any questions, check out the enclosed instruction book."
cost = 750
contains = list(/obj/item/conveyor_construct,
/obj/item/conveyor_construct,
/obj/item/conveyor_construct,
/obj/item/conveyor_construct,
/obj/item/conveyor_construct,
/obj/item/conveyor_construct,
/obj/item/conveyor_switch_construct,
contains = list(/obj/item/stack/conveyor/fifteen,
/obj/item/paper/guides/conveyor)
crate_name = "conveyor assembly crate"
@@ -73,6 +67,18 @@
crate_name = "atmospherics hardsuit"
crate_type = /obj/structure/closet/crate/secure/engineering
/datum/supply_pack/engineering/radvoidsuit
name = "Radiation Voidsuit"
desc = "The Singulo is loose? Do you need to do a few changes to its containment and don't want to spent the rest of the shift under the shower? Get this Radiation Hardsuit! It protect from radiations and space only."
cost = 3500
access = ACCESS_ENGINE
contains = list(/obj/item/tank/internals/air,
/obj/item/clothing/mask/gas,
/obj/item/clothing/suit/space/rad,
/obj/item/clothing/head/helmet/space/rad)
crate_name = "radiation hardsuit"
crate_type = /obj/structure/closet/crate/secure/engineering
/datum/supply_pack/engineering/industrialrcd
name = "Industrial RCD"
desc = "An industrial RCD in case the station has gone through more then one meteor storm and the CE needs to bring out the somthing a bit more reliable. Does not contain spare ammo for the industrial RCD or any other RCD models."
+5 -4
View File
@@ -2,8 +2,9 @@ GLOBAL_LIST_EMPTY(clientmessages)
/proc/addclientmessage(var/ckey, var/message)
ckey = ckey(ckey)
if (!ckey || !message)
if(!ckey || !message)
return
if (!(ckey in GLOB.clientmessages))
GLOB.clientmessages[ckey] = list()
GLOB.clientmessages[ckey] += message
var/list/L = GLOB.clientmessages[ckey]
if(!L)
GLOB.clientmessages[ckey] = L = list()
L += message
+5
View File
@@ -1007,6 +1007,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<b>Forced Feminization:</b> <a href='?_src_=prefs;preference=feminization'>[(cit_toggles & FORCED_FEM) ? "Allowed" : "Disallowed"]</a><br>"
dat += "<b>Forced Masculinization:</b> <a href='?_src_=prefs;preference=masculinization'>[(cit_toggles & FORCED_MASC) ? "Allowed" : "Disallowed"]</a><br>"
dat += "<b>Lewd Hypno:</b> <a href='?_src_=prefs;preference=hypno'>[(cit_toggles & HYPNO) ? "Allowed" : "Disallowed"]</a><br>"
dat += "<b>Bimbofication:</b> <a href='?_src_=prefs;preference=bimbo'>[(cit_toggles & BIMBOFICATION) ? "Allowed" : "Disallowed"]</a><br>"
dat += "</td>"
dat +="<td width='300px' height='300px' valign='top'>"
dat += "<h2>Other content prefs</h2>"
@@ -1015,6 +1016,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<b>Hypno:</b> <a href='?_src_=prefs;preference=never_hypno'>[(cit_toggles & NEVER_HYPNO) ? "Disallowed" : "Allowed"]</a><br>"
dat += "<b>Aphrodisiacs:</b> <a href='?_src_=prefs;preference=aphro'>[(cit_toggles & NO_APHRO) ? "Disallowed" : "Allowed"]</a><br>"
dat += "<b>Ass Slapping:</b> <a href='?_src_=prefs;preference=ass_slap'>[(cit_toggles & NO_ASS_SLAP) ? "Disallowed" : "Allowed"]</a><br>"
dat += "</tr></table>"
dat += "<br>"
@@ -2234,6 +2236,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("ass_slap")
cit_toggles ^= NO_ASS_SLAP
if("bimbo")
cit_toggles ^= BIMBOFICATION
//END CITADEL EDIT
+2 -4
View File
@@ -109,10 +109,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
else if(current_version < 23) // we are fixing a gamebreaking bug.
job_preferences = list() //It loaded null from nonexistant savefile field.
if(current_version < 24 && S["feature_exhibitionist"])
var/datum/quirk/exhibitionism/E
var/quirk_name = initial(E.name)
all_quirks += quirk_name
if(current_version < 25)
var/digi
S["feature_lizard_legs"] >> digi
@@ -543,6 +539,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
ENABLE_BITFIELD(cit_toggles,NO_ASS_SLAP)
all_quirks -= V
if(features["meat_type"] == "Inesct")
features["meat_type"] = "Insect"
cit_character_pref_load(S)
return 1
+3
View File
@@ -207,6 +207,9 @@
message_admins("[key_name(src)] (job: [src.job ? "[src.job]" : "None"]) [is_special_character(src) ? "(ANTAG!) " : ""][ghosting ? "ghosted" : "committed suicide"] at [AREACOORD(src)].")
/mob/living/proc/canSuicide()
if(!CONFIG_GET(flag/suicide_allowed))
to_chat(src, "Suicide is not enabled in the config.")
return FALSE
switch(stat)
if(CONSCIOUS)
return TRUE
+31 -1
View File
@@ -250,6 +250,36 @@
throwforce = 12
glass_colour_type = /datum/client_colour/glass_colour/red
/obj/item/clothing/glasses/sunglasses/stunglasses
name = "stunglasses"
desc = "Sunglasses with inbuilt flashes. Made for those who prefer to walk around in style, who needs clumsy flashes anyway?"
actions_types = list(/datum/action/item_action/flash)
var/obj/item/assembly/flash/installed
/obj/item/clothing/glasses/sunglasses/stunglasses/Initialize()
. = ..()
if (!installed)
installed = new(src)
/obj/item/clothing/glasses/sunglasses/stunglasses/ui_action_click(mob/user)
if (installed && !installed.crit_fail)
installed.attack_self(user)
else
to_chat(user, "<span class = 'danger'>Install a new flash in [src]!</span>")
/obj/item/clothing/glasses/sunglasses/stunglasses/attackby(obj/item/W,mob/user)
if (istype(W,/obj/item/screwdriver))
if (installed)
installed.forceMove(get_turf(src))
to_chat(user, "<span class = 'notice'>You remove [installed] from [src].</span>")
installed = null
if (istype(W,/obj/item/assembly/flash))
if (!installed)
W.forceMove(src)
to_chat(user, "<span class = 'notice'>You install [W] into [src].</span>")
installed = W
. = ..()
/obj/item/clothing/glasses/welding
name = "welding goggles"
desc = "Protects the eyes from welders; approved by the mad scientist association."
@@ -458,4 +488,4 @@
if(client && client.prefs.uses_glasses_colour && glasses_equipped)
add_client_colour(G.glass_colour_type)
else
remove_client_colour(G.glass_colour_type)
remove_client_colour(G.glass_colour_type)
+2 -1
View File
@@ -178,6 +178,7 @@
icon_state = "xenos"
item_state = "xenos_helm"
desc = "A helmet made out of chitinous alien hide."
alternate_screams = list('sound/voice/hiss6.ogg')
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
/obj/item/clothing/head/fedora
@@ -421,4 +422,4 @@
name = "security cowboy hat"
desc = "A security cowboy hat, perfect for any true lawman"
icon_state = "cowboyhat_sec"
item_state= "cowboyhat_sec"
item_state= "cowboyhat_sec"
@@ -86,6 +86,7 @@
desc = "Perfect for winter in Siberia, da?"
icon_state = "ushankadown"
item_state = "ushankadown"
alternate_screams = list('sound/voice/human/cyka1.ogg', 'sound/voice/human/cheekibreeki.ogg')
flags_inv = HIDEEARS|HIDEHAIR
var/earflaps = 1
cold_protection = HEAD
@@ -164,6 +165,7 @@
icon_state = "cardborg_h"
item_state = "cardborg_h"
flags_cover = HEADCOVERSEYES
alternate_screams = list('modular_citadel/sound/voice/scream_silicon.ogg')
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
dog_fashion = /datum/dog_fashion/head/cardborg
@@ -203,7 +203,6 @@
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/engine/atmos
//Chief Engineer's hardsuit
/obj/item/clothing/head/helmet/space/hardsuit/engine/elite
name = "advanced hardsuit helmet"
@@ -11,6 +11,7 @@ Contains:
- ERT hardsuit: Command, Sec, Engi, Med
- ERT High Alarm - Command, Sec, Engi, Med
- EVA spacesuit
- Radiation Spacesuit
- Freedom's spacesuit (freedom from vacuum's oppression)
- Carp hardsuit
*/
@@ -312,6 +313,28 @@ Contains:
flash_protect = 0
armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 20, "fire" = 50, "acid" = 65)
//Radiation
/obj/item/clothing/head/helmet/space/rad
name = "radiation voidsuit helmet"
desc = "A special helmet that protects against radiation and space. Not much else unfortunately."
icon_state = "cespace_helmet"
item_state = "nothing"
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 0, "acid" = 0)
item_color = "engineering"
resistance_flags = FIRE_PROOF
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
actions_types = list()
/obj/item/clothing/suit/space/rad
name = "radiation voidsuit"
desc = "A special suit that protects against radiation and space. Not much else unfortunately."
icon_state = "hardsuit-rad"
item_state = "nothing"
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 0, "acid" = 0)
resistance_flags = FIRE_PROOF
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
mutantrace_variation = NONE
/obj/item/clothing/head/helmet/space/freedom
name = "eagle helmet"
desc = "An advanced, space-proof helmet. It appears to be modeled after an old-world eagle."
@@ -434,7 +457,7 @@ Contains:
strip_delay = 65
/obj/item/clothing/suit/space/fragile/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(!torn && prob(50))
if(!torn && prob(50) && damage >= 5)
to_chat(owner, "<span class='warning'>[src] tears from the damage, breaking the air-tight seal!</span>")
clothing_flags &= ~STOPSPRESSUREDAMAGE
name = "torn [src]."
@@ -826,6 +826,22 @@
armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
real = FALSE
/obj/item/clothing/suit/hooded/wintercoat/durathread
name = "durathread winter coat"
desc = "The one coat to rule them all. Extremely durable while providing the utmost comfort."
icon_state = "coatdurathread"
item_state = "coatdurathread"
armor = list("melee" = 15, "bullet" = 8, "laser" = 25, "energy" = 5, "bomb" = 12, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 50)
hoodtype = /obj/item/clothing/head/hooded/winterhood/durathread
/obj/item/clothing/suit/hooded/wintercoat/durathread/Initialize()
. = ..()
allowed = GLOB.security_wintercoat_allowed
/obj/item/clothing/head/hooded/winterhood/durathread
icon_state = "winterhood_durathread"
armor = list("melee" = 20, "bullet" = 8, "laser" = 15, "energy" = 8, "bomb" = 25, "bio" = 10, "rad" = 15, "fire" = 75, "acid" = 37)
/obj/item/clothing/suit/spookyghost
name = "spooky ghost"
+3
View File
@@ -91,6 +91,9 @@
if(user && notifyAttach)
to_chat(user, "<span class='notice'>You attach [I] to [src].</span>")
if((flags_inv & HIDEACCESSORY) || (A.flags_inv & HIDEACCESSORY))
return TRUE
var/accessory_color = attached_accessory.item_color
if(!accessory_color)
accessory_color = attached_accessory.icon_state
+11 -8
View File
@@ -370,22 +370,25 @@
/////////////////////
/obj/item/clothing/accessory/padding
name = "soft padding"
desc = "Some long sheets of padding to help soften the blows of a physical attacks."
name = "protective padding"
desc = "A soft padding meant to cushion the wearer from melee harm."
icon_state = "padding"
item_color = "nothing"
armor = list("melee" = 15, "bullet" = 10, "laser" = 0, "energy" = 0, "bomb" = 5, "bio" = 0, "rad" = 0, "fire" = -20, "acid" = 45)
armor = list("melee" = 20, "bullet" = 10, "laser" = 0, "energy" = 0, "bomb" = 5, "bio" = 0, "rad" = 0, "fire" = -20, "acid" = 45)
flags_inv = HIDEACCESSORY //hidden from indiscrete mob examines.
/obj/item/clothing/accessory/kevlar
name = "kevlar sheets"
desc = "Long thin sheets of kevlar to help resist bullets and some physical attacks."
name = "kevlar padding"
desc = "A layered kevlar padding meant to cushion the wearer from ballistic harm."
icon_state = "padding"
item_color = "nothing"
armor = list("melee" = 10, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 25)
flags_inv = HIDEACCESSORY
/obj/item/clothing/accessory/plastics
name = "underling plastic sheet"
desc = "A full body sheet of white plastic to help defuse lasers and energy based weapons."
name = "ablative padding"
desc = "A thin ultra-refractory composite padding meant to cushion the wearer from energy lasers harm."
icon_state = "plastics"
item_color = "nothing"
armor = list("melee" = 0, "bullet" = 0, "laser" = 20, "energy" = 10, "bomb" = 0, "bio" = 30, "rad" = 0, "fire" = 0, "acid" = -40)
armor = list("melee" = 0, "bullet" = 0, "laser" = 20, "energy" = 10, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 20, "acid" = -40)
flags_inv = HIDEACCESSORY
+14 -4
View File
@@ -471,6 +471,7 @@
name = "white sundress"
desc = "Makes you want to frolic in a field of lillies."
icon_state = "sundress_white"
item_state = "sundress"
item_color = "sundress_white"
body_parts_covered = CHEST|GROIN
fitted = FEMALE_UNIFORM_TOP
@@ -527,6 +528,16 @@
item_color = "assistant_formal"
can_adjust = FALSE
/obj/item/clothing/under/staffassistant
name = "staff assistant's jumpsuit"
desc = "It's a generic grey jumpsuit. That's about what assistants are worth, anyway."
icon = 'goon/icons/obj/item_js_rank.dmi'
alternate_worn_icon = 'goon/icons/mob/worn_js_rank.dmi'
icon_state = "assistant"
item_state = "gy_suit"
item_color = "assistant"
mutantrace_variation = NONE
/obj/item/clothing/under/blacktango
name = "black tango dress"
desc = "Filled with Latin fire."
@@ -580,7 +591,7 @@
icon_state = "flower_dress"
item_state = "sailordress"
item_color = "flower_dress"
body_parts_covered = CHEST|GROIN
body_parts_covered = CHEST|GROIN|LEGS
fitted = FEMALE_UNIFORM_TOP
can_adjust = FALSE
@@ -605,9 +616,8 @@
/obj/item/clothing/under/croptop
name = "crop top"
desc = "We've saved money by giving you half a shirt!"
icon_state = "sailor_dress"
item_state = "sailordress"
item_color = "sailor_dress"
icon_state = "croptop"
item_color = "croptop"
body_parts_covered = CHEST|GROIN|ARMS
fitted = FEMALE_UNIFORM_TOP
can_adjust = FALSE
+1
View File
@@ -158,6 +158,7 @@
I.CheckParts(parts, R)
if(send_feedback)
SSblackbox.record_feedback("tally", "object_crafted", 1, I.type)
log_craft("[I] crafted by [user] at [loc_name(I.loc)]")
return 0
return "."
return ", missing tool."
@@ -86,7 +86,17 @@
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
reqs = list(/obj/item/clothing/glasses/sunglasses/reagent = 1)
category = CAT_CLOTHING
/* //Kevinz doesn't want it as a recipe for now, leaving it in if anything ever changes to let it in
/datum/crafting_recipe/stunglasses
name = "Stunglasses"
result = /obj/item/clothing/glasses/sunglasses/stunglasses
time = 60
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
reqs = list(/obj/item/assembly/flash = 1,
/obj/item/clothing/glasses/sunglasses = 1,
/obj/item/stack/cable_coil = 5)
category = CAT_CLOTHING
*/
/datum/crafting_recipe/ghostsheet
name = "Ghost Sheet"
result = /obj/item/clothing/suit/ghost_sheet
@@ -159,6 +169,14 @@
always_availible = TRUE
category = CAT_CLOTHING
/datum/crafting_recipe/durathread_wintercoat
name = "Durathread Winter Coat"
result = /obj/item/clothing/suit/hooded/wintercoat/durathread
reqs = list(/obj/item/stack/sheet/durathread = 12,
/obj/item/stack/sheet/leather = 10)
time = 70
category = CAT_CLOTHING
/datum/crafting_recipe/wintercoat_cosmic
name = "Cosmic Winter Coat"
result = /obj/item/clothing/suit/hooded/wintercoat/cosmic
+3
View File
@@ -43,6 +43,9 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
icon = 'icons/obj/objects.dmi'
icon_state = "immrod"
throwforce = 100
move_force = INFINITY
move_resist = INFINITY
pull_force = INFINITY
density = TRUE
anchored = TRUE
flags_1 = PREVENT_CONTENTS_EXPLOSION_1
+93 -53
View File
@@ -9,7 +9,7 @@
pixel_x = -64
pixel_y = -64
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
var/list/immune = list() // the one who creates the timestop is immune
var/list/immune = list() // the one who creates the timestop is immune, which includes wizards and the dead slime you murdered to make this chronofield
var/turf/target
var/freezerange = 2
var/duration = 140
@@ -27,10 +27,10 @@
for(var/A in immune_atoms)
immune[A] = TRUE
for(var/mob/living/L in GLOB.player_list)
if(locate(/obj/effect/proc_holder/spell/aoe_turf/conjure/timestop) in L.mind.spell_list) //People who can stop time are immune to its effects
if(locate(/obj/effect/proc_holder/spell/aoe_turf/timestop) in L.mind.spell_list) //People who can stop time are immune to its effects
immune[L] = TRUE
for(var/mob/living/simple_animal/hostile/guardian/G in GLOB.parasites)
if(G.summoner && locate(/obj/effect/proc_holder/spell/aoe_turf/conjure/timestop) in G.summoner.mind.spell_list) //It would only make sense that a person's stand would also be immune.
if(G.summoner && locate(/obj/effect/proc_holder/spell/aoe_turf/timestop) in G.summoner.mind.spell_list) //It would only make sense that a person's stand would also be immune.
immune[G] = TRUE
if(start)
timestop()
@@ -46,9 +46,8 @@
chronofield = make_field(/datum/proximity_monitor/advanced/timestop, list("current_range" = freezerange, "host" = src, "immune" = immune, "check_anti_magic" = check_anti_magic, "check_holy" = check_holy))
QDEL_IN(src, duration)
/obj/effect/timestop/wizard
/obj/effect/timestop/magic
check_anti_magic = TRUE
duration = 100
/datum/proximity_monitor/advanced/timestop
name = "chronofield"
@@ -56,9 +55,10 @@
field_shape = FIELD_SHAPE_RADIUS_SQUARE
requires_processing = TRUE
var/list/immune = list()
var/list/mob/living/frozen_mobs = list()
var/list/obj/item/projectile/frozen_projectiles = list()
var/list/atom/movable/frozen_throws = list()
var/list/frozen_things = list()
var/list/frozen_mobs = list() //cached separately for processing
var/list/frozen_structures = list() //Also machinery, and only frozen aestethically
var/list/frozen_turfs = list() //Only aesthetically
var/check_anti_magic = FALSE
var/check_holy = FALSE
@@ -74,85 +74,125 @@
/datum/proximity_monitor/advanced/timestop/proc/freeze_atom(atom/movable/A)
if(immune[A] || global_frozen_atoms[A] || !istype(A))
return FALSE
if(A.throwing)
freeze_throwing(A)
if(ismob(A))
var/mob/M = A
if(M.anti_magic_check(check_anti_magic, check_holy))
immune[A] = TRUE
return
var/frozen = TRUE
if(isliving(A))
freeze_mob(A)
else if(istype(A, /obj/item/projectile))
freeze_projectile(A)
else if(istype(A, /obj/mecha))
freeze_mecha(A)
else if((ismachinery(A) && !istype(A, /obj/machinery/light)) || isstructure(A)) //Special exception for light fixtures since recoloring causes them to change light
freeze_structure(A)
else
return FALSE
frozen = FALSE
if(A.throwing)
freeze_throwing(A)
frozen = TRUE
if(!frozen)
return
frozen_things[A] = A.move_resist
A.move_resist = INFINITY
global_frozen_atoms[A] = src
into_the_negative_zone(A)
RegisterSignal(A, COMSIG_MOVABLE_PRE_MOVE, .proc/unfreeze_atom)
RegisterSignal(A, COMSIG_ITEM_PICKUP, .proc/unfreeze_atom)
return TRUE
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_all()
for(var/i in frozen_projectiles)
unfreeze_projectile(i)
for(var/i in frozen_mobs)
unfreeze_mob(i)
for(var/i in frozen_throws)
unfreeze_throw(i)
for(var/i in frozen_things)
unfreeze_atom(i)
for(var/T in frozen_turfs)
unfreeze_turf(T)
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_atom(atom/movable/A)
if(A.throwing)
unfreeze_throwing(A)
if(isliving(A))
unfreeze_mob(A)
else if(istype(A, /obj/item/projectile))
unfreeze_projectile(A)
else if(istype(A, /obj/mecha))
unfreeze_mecha(A)
UnregisterSignal(A, COMSIG_MOVABLE_PRE_MOVE)
UnregisterSignal(A, COMSIG_ITEM_PICKUP)
escape_the_negative_zone(A)
A.move_resist = frozen_things[A]
frozen_things -= A
global_frozen_atoms -= A
/datum/proximity_monitor/advanced/timestop/proc/freeze_mecha(obj/mecha/M)
M.completely_disabled = TRUE
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_mecha(obj/mecha/M)
M.completely_disabled = FALSE
/datum/proximity_monitor/advanced/timestop/proc/freeze_throwing(atom/movable/AM)
var/datum/thrownthing/T = AM.throwing
T.paused = TRUE
frozen_throws[AM] = T
global_frozen_atoms[AM] = TRUE
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_throw(atom/movable/AM)
var/datum/thrownthing/T = frozen_throws[AM]
T.paused = FALSE
frozen_throws -= AM
global_frozen_atoms -= AM
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_throwing(atom/movable/AM)
var/datum/thrownthing/T = AM.throwing
if(T)
T.paused = FALSE
/datum/proximity_monitor/advanced/timestop/proc/freeze_turf(turf/T)
into_the_negative_zone(T)
frozen_turfs += T
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_turf(turf/T)
escape_the_negative_zone(T)
/datum/proximity_monitor/advanced/timestop/proc/freeze_structure(obj/O)
into_the_negative_zone(O)
frozen_structures += O
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_structure(obj/O)
escape_the_negative_zone(O)
/datum/proximity_monitor/advanced/timestop/process()
for(var/i in frozen_mobs)
var/mob/living/m = i
if(get_dist(get_turf(m), get_turf(host)) > current_range)
unfreeze_mob(m)
else
m.Stun(20, 1, 1)
m.Stun(20, 1, 1)
/datum/proximity_monitor/advanced/timestop/setup_field_turf(turf/T)
for(var/i in T.contents)
freeze_atom(i)
freeze_turf(T)
return ..()
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_projectile(obj/item/projectile/P)
escape_the_negative_zone(P)
frozen_projectiles -= P
P.paused = FALSE
global_frozen_atoms -= P
/datum/proximity_monitor/advanced/timestop/proc/freeze_projectile(obj/item/projectile/P)
frozen_projectiles[P] = TRUE
P.paused = TRUE
global_frozen_atoms[P] = TRUE
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_projectile(obj/item/projectile/P)
P.paused = FALSE
/datum/proximity_monitor/advanced/timestop/proc/freeze_mob(mob/living/L)
if(L.anti_magic_check(check_anti_magic, check_holy))
immune += L
return
frozen_mobs += L
L.Stun(20, 1, 1)
frozen_mobs[L] = L.anchored
L.anchored = TRUE
global_frozen_atoms[L] = TRUE
if(ishostile(L))
var/mob/living/simple_animal/hostile/H = L
H.toggle_ai(AI_OFF)
H.LoseTarget()
ADD_TRAIT(L, TRAIT_MUTE, TIMESTOP_TRAIT)
walk(L, 0) //stops them mid pathing even if they're stunimmune
if(isanimal(L))
var/mob/living/simple_animal/S = L
S.toggle_ai(AI_OFF)
if(ishostile(L))
var/mob/living/simple_animal/hostile/H = L
H.LoseTarget()
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_mob(mob/living/L)
escape_the_negative_zone(L)
L.AdjustStun(-20, 1, 1)
L.anchored = frozen_mobs[L]
REMOVE_TRAIT(L, TRAIT_MUTE, TIMESTOP_TRAIT)
frozen_mobs -= L
global_frozen_atoms -= L
if(ishostile(L))
var/mob/living/simple_animal/hostile/H = L
H.toggle_ai(initial(H.AIStatus))
if(isanimal(L))
var/mob/living/simple_animal/S = L
S.toggle_ai(initial(S.AIStatus))
//you don't look quite right, is something the matter?
/datum/proximity_monitor/advanced/timestop/proc/into_the_negative_zone(atom/A)
@@ -160,4 +200,4 @@
//let's put some colour back into your cheeks
/datum/proximity_monitor/advanced/timestop/proc/escape_the_negative_zone(atom/A)
A.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY)
A.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY)
+2 -2
View File
@@ -214,9 +214,9 @@ GLOBAL_LIST_INIT(hallucination_list, list(
. = ..()
name = "alien hunter ([rand(1, 1000)])"
/obj/effect/hallucination/simple/xeno/throw_impact(A)
/obj/effect/hallucination/simple/xeno/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
update_icon("alienh_pounce")
if(A == target && target.stat!=DEAD)
if(hit_atom == target && target.stat!=DEAD)
target.Knockdown(100)
target.visible_message("<span class='danger'>[target] flails around wildly.</span>","<span class ='userdanger'>[name] pounces on you!</span>")
@@ -101,10 +101,10 @@
to_chat(user, "<span class='notice'>You heat [name] with [I]!</span>")
..()
/obj/item/reagent_containers/food/drinks/throw_impact(atom/target, datum/thrownthing/throwinfo)
/obj/item/reagent_containers/food/drinks/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
. = ..()
if(!.) //if the bottle wasn't caught
smash(target, throwinfo.thrower, TRUE)
smash(hit_atom, throwingdatum?.thrower, TRUE)
/obj/item/reagent_containers/food/drinks/proc/smash(atom/target, mob/thrower, ranged = FALSE)
if(!isGlass)
@@ -505,7 +505,7 @@
isGlass = FALSE
return
/obj/item/reagent_containers/food/drinks/bottle/molotov/throw_impact(atom/target,datum/thrownthing/throwdata)
/obj/item/reagent_containers/food/drinks/bottle/molotov/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
var/firestarter = 0
for(var/datum/reagent/R in reagents.reagent_list)
for(var/A in accelerants)
@@ -513,8 +513,8 @@
firestarter = 1
break
if(firestarter && active)
target.fire_act()
new /obj/effect/hotspot(get_turf(target))
hit_atom.fire_act()
new /obj/effect/hotspot(get_turf(hit_atom))
..()
/obj/item/reagent_containers/food/drinks/bottle/molotov/attackby(obj/item/I, mob/user, params)
@@ -31,7 +31,7 @@
var/color = mix_color_from_reagents(reagents.reagent_list)
add_atom_colour(color, FIXED_COLOUR_PRIORITY)
/obj/item/reagent_containers/food/snacks/egg/throw_impact(atom/hit_atom)
/obj/item/reagent_containers/food/snacks/egg/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(!..()) //was it caught by a mob?
var/turf/T = get_turf(hit_atom)
new/obj/effect/decal/cleanable/egg_smudge(T)
@@ -443,8 +443,8 @@
head.color = C
add_overlay(head)
/obj/item/reagent_containers/food/snacks/lollipop/throw_impact(atom/A)
..(A)
/obj/item/reagent_containers/food/snacks/lollipop/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
..(hit_atom)
throw_speed = 1
throwforce = 0
@@ -65,7 +65,7 @@
reagents.add_reagent(extra_reagent, 3)
/obj/item/reagent_containers/food/snacks/donut/meat
name = "Meat Donut"
name = "meat donut"
desc = "Tastes as gross as it looks."
icon_state = "donut_meat"
bonus_reagents = list(/datum/reagent/consumable/ketchup = 1)
@@ -152,7 +152,7 @@
icon_state = "jelly"
decorated_icon = "jelly_homer"
bonus_reagents = list(/datum/reagent/consumable/sugar = 1, /datum/reagent/consumable/nutriment/vitamin = 1)
extra_reagent = "berryjuice"
extra_reagent = /datum/reagent/consumable/berryjuice
tastes = list("jelly" = 1, "donut" = 3)
foodtype = JUNKFOOD | GRAIN | FRIED | FRUIT | SUGAR | BREAKFAST
@@ -240,7 +240,7 @@
name = "jelly donut"
desc = "You jelly?"
icon_state = "jelly"
extra_reagent = "slimejelly"
extra_reagent = /datum/reagent/toxin/slimejelly
foodtype = JUNKFOOD | GRAIN | FRIED | TOXIC | SUGAR | BREAKFAST
/obj/item/reagent_containers/food/snacks/donut/jelly/slimejelly/plain
@@ -29,7 +29,7 @@
foodtype = GRAIN | DAIRY | SUGAR
var/stunning = TRUE
/obj/item/reagent_containers/food/snacks/pie/cream/throw_impact(atom/hit_atom)
/obj/item/reagent_containers/food/snacks/pie/cream/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
. = ..()
if(!.) //if we're not being caught
splat(hit_atom)
@@ -66,10 +66,12 @@ God bless America.
oil_use = initial(oil_use) - (oil_efficiency * 0.0095)
fry_speed = oil_efficiency
/obj/machinery/deepfryer/examine()
/obj/machinery/deepfryer/examine(mob/user)
. = ..()
if(frying)
. += "You can make out \a [frying] in the oil."
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Frying at <b>[fry_speed*100]%</b> speed.<br>Using <b>[oil_use*10]</b> units of oil per second.</span>"
/obj/machinery/deepfryer/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/reagent_containers/pill))
@@ -30,6 +30,14 @@
if(M.rating >= 2)
ignore_clothing = TRUE
/obj/machinery/gibber/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Outputting <b>[meat_produced]</b> meat slab(s) after <b>[gibtime*0.1]</b> seconds of processing.</span>"
for(var/obj/item/stock_parts/manipulator/M in component_parts)
if(M.rating >= 2)
. += "<span class='notice'>Gibber has been upgraded to process inorganic materials.</span>"
/obj/machinery/gibber/update_icon()
cut_overlays()
if (dirty)
@@ -1,6 +1,6 @@
/obj/machinery/monkey_recycler
name = "monkey recycler"
desc = "A machine used for recycling dead monkeys into monkey cubes. It currently produces 1 cube for every 5 monkeys inserted." // except it literally never does
desc = "A machine used for recycling dead monkeys into monkey cubes." // except it literally never does
icon = 'icons/obj/kitchen.dmi'
icon_state = "grinder"
layer = BELOW_OBJ_LAYER
@@ -22,7 +22,11 @@
cubes_made = M.rating
cube_production = cubes_made
required_grind = req_grind
src.desc = "A machine used for recycling dead monkeys into monkey cubes. It currently produces [cubes_made] cube(s) for every [required_grind] monkey(s) inserted."
/obj/machinery/monkey_recycler/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Producing <b>[cube_production]</b> cubes for every monkey inserted.</span>"
/obj/machinery/monkey_recycler/attackby(obj/item/O, mob/user, params)
if(default_deconstruction_screwdriver(user, "grinder_open", "grinder", O))
@@ -21,6 +21,11 @@
for(var/obj/item/stock_parts/manipulator/M in component_parts)
rating_speed = M.rating
/obj/machinery/processor/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Outputting <b>[rating_amount]</b> item(s) at <b>[rating_speed*100]%</b> speed.</span>"
/obj/machinery/processor/proc/process_food(datum/food_processor_process/recipe, atom/movable/what)
if (recipe.output && loc && !QDELETED(src))
for(var/i = 0, i < rating_amount, i++)
@@ -33,6 +33,11 @@
for(var/obj/item/stock_parts/matter_bin/B in component_parts)
max_n_of_items = 1500 * B.rating
/obj/machinery/smartfridge/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: This unit can hold a maximum of <b>[max_n_of_items]</b> items.</span>"
/obj/machinery/smartfridge/power_change()
..()
update_icon()
+1 -1
View File
@@ -231,7 +231,7 @@
if(boxes.len >= 3 && prob(25 * boxes.len))
disperse_pizzas()
/obj/item/pizzabox/throw_impact(atom/movable/AM)
/obj/item/pizzabox/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(boxes.len >= 2 && prob(20 * boxes.len))
disperse_pizzas()
@@ -15,9 +15,9 @@
required_catalysts = list(/datum/reagent/consumable/enzyme = 5)
mob_react = FALSE
/datum/chemical_reaction/tofu/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/tofu/on_reaction(datum/reagents/holder, multiplier)
var/location = get_turf(holder.my_atom)
for(var/i = 1, i <= created_volume, i++)
for(var/i = 1, i <= multiplier, i++)
new /obj/item/reagent_containers/food/snacks/tofu(location)
return
@@ -26,9 +26,9 @@
id = "chocolate_bar"
required_reagents = list(/datum/reagent/consumable/soymilk = 2, /datum/reagent/consumable/coco = 2, /datum/reagent/consumable/sugar = 2)
/datum/chemical_reaction/chocolate_bar/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/chocolate_bar/on_reaction(datum/reagents/holder, multiplier)
var/location = get_turf(holder.my_atom)
for(var/i = 1, i <= created_volume, i++)
for(var/i = 1, i <= multiplier, i++)
new /obj/item/reagent_containers/food/snacks/chocolatebar(location)
return
@@ -39,9 +39,9 @@
required_reagents = list(/datum/reagent/consumable/milk/chocolate_milk = 4, /datum/reagent/consumable/sugar = 2)
mob_react = FALSE
/datum/chemical_reaction/chocolate_bar2/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/chocolate_bar2/on_reaction(datum/reagents/holder, multiplier)
var/location = get_turf(holder.my_atom)
for(var/i = 1, i <= created_volume, i++)
for(var/i = 1, i <= multiplier, i++)
new /obj/item/reagent_containers/food/snacks/chocolatebar(location)
return
@@ -90,9 +90,9 @@
required_reagents = list(/datum/reagent/consumable/milk = 40)
required_catalysts = list(/datum/reagent/consumable/enzyme = 5)
/datum/chemical_reaction/cheesewheel/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/cheesewheel/on_reaction(datum/reagents/holder, multiplier)
var/location = get_turf(holder.my_atom)
for(var/i = 1, i <= created_volume, i++)
for(var/i = 1, i <= multiplier, i++)
new /obj/item/reagent_containers/food/snacks/store/cheesewheel(location)
/datum/chemical_reaction/synthmeat
@@ -101,9 +101,9 @@
required_reagents = list(/datum/reagent/blood = 5, /datum/reagent/medicine/cryoxadone = 1)
mob_react = FALSE
/datum/chemical_reaction/synthmeat/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/synthmeat/on_reaction(datum/reagents/holder, multiplier)
var/location = get_turf(holder.my_atom)
for(var/i = 1, i <= created_volume, i++)
for(var/i = 1, i <= multiplier, i++)
new /obj/item/reagent_containers/food/snacks/meat/slab/synthmeat(location)
/datum/chemical_reaction/hot_ramen
@@ -137,9 +137,9 @@
required_reagents = list(/datum/reagent/water = 10, /datum/reagent/consumable/flour = 15)
mix_message = "The ingredients form a dough."
/datum/chemical_reaction/dough/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/dough/on_reaction(datum/reagents/holder, multiplier)
var/location = get_turf(holder.my_atom)
for(var/i = 1, i <= created_volume, i++)
for(var/i = 1, i <= multiplier, i++)
new /obj/item/reagent_containers/food/snacks/dough(location)
/datum/chemical_reaction/cakebatter
@@ -148,9 +148,9 @@
required_reagents = list(/datum/reagent/consumable/eggyolk = 15, /datum/reagent/consumable/flour = 15, /datum/reagent/consumable/sugar = 5)
mix_message = "The ingredients form a cake batter."
/datum/chemical_reaction/cakebatter/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/cakebatter/on_reaction(datum/reagents/holder, multiplier)
var/location = get_turf(holder.my_atom)
for(var/i = 1, i <= created_volume, i++)
for(var/i = 1, i <= multiplier, i++)
new /obj/item/reagent_containers/food/snacks/cakebatter(location)
/datum/chemical_reaction/cakebatter/vegan
+1 -1
View File
@@ -132,7 +132,7 @@
speak_emote = list("howls")
emote_hear = list("wails","screeches")
density = FALSE
anchored = TRUE
move_resist = MOVE_FORCE_OVERPOWERING
incorporeal_move = 1
layer = 4
var/timer = 0
+1 -1
View File
@@ -450,7 +450,7 @@
reagents.add_reagent(R, 30)
name = "[R] Potion"
/obj/item/reagent_containers/potion_container/throw_impact(atom/target)
/obj/item/reagent_containers/potion_container/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
..()
sleep(20)
var/datum/effect_system/smoke_spread/chem/s = new()
+2 -2
View File
@@ -80,7 +80,7 @@
item_state = "dodgeball"
desc = "Used for playing the most violent and degrading of childhood games."
/obj/item/toy/beach_ball/holoball/dodgeball/throw_impact(atom/hit_atom)
/obj/item/toy/beach_ball/holoball/dodgeball/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
..()
if((ishuman(hit_atom)))
var/mob/living/carbon/M = hit_atom
@@ -123,7 +123,7 @@
else
..()
/obj/structure/holohoop/hitby(atom/movable/AM)
/obj/structure/holohoop/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
if (isitem(AM) && !istype(AM,/obj/item/projectile))
if(prob(50))
AM.forceMove(get_turf(src))

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