Merge branch 'master' into upstream-merge-31737

This commit is contained in:
Poojawa
2017-10-21 07:18:14 -05:00
committed by GitHub
591 changed files with 181531 additions and 178280 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
// it's """VR"""
/obj/machinery/vr_sleeper
name = "virtual reality sleeper"
desc = "a sleeper modified to alter the subconscious state of the user, allowing them to visit virtual worlds"
desc = "A sleeper modified to alter the subconscious state of the user, allowing them to visit virtual worlds."
icon = 'icons/obj/Cryogenic2.dmi'
icon_state = "sleeper"
state_open = TRUE
+8 -4
View File
@@ -50,9 +50,12 @@
announceinirc = 1
blockselfban = 1
kickbannedckey = 1
if( !bantype_pass ) return
if( !istext(reason) ) return
if( !isnum(duration) ) return
if( !bantype_pass )
return
if( !istext(reason) )
return
if( !isnum(duration) )
return
var/ckey
var/computerid
@@ -174,7 +177,8 @@
if(BANTYPE_ANY_JOB)
bantype_str = "ANYJOB"
bantype_pass = 1
if( !bantype_pass ) return
if( !bantype_pass )
return
var/bantype_sql
if(bantype_str == "ANY")
+9 -5
View File
@@ -25,7 +25,7 @@ GLOBAL_PROTECT(Banlist)
.["desc"] = "\nReason: [GLOB.Banlist["reason"]]\nExpires: [GetExp(GLOB.Banlist["minutes"])]\nBy: [GLOB.Banlist["bannedby"]][appeal]"
else
GLOB.Banlist.cd = "/base/[ckey][id]"
.["desc"] = "\nReason: [GLOB.Banlist["reason"]]\nExpires: <B>PERMENANT</B>\nBy: [GLOB.Banlist["bannedby"]][appeal]"
.["desc"] = "\nReason: [GLOB.Banlist["reason"]]\nExpires: <B>PERMANENT</B>\nBy: [GLOB.Banlist["bannedby"]][appeal]"
.["reason"] = "ckey/id"
return .
else
@@ -65,7 +65,8 @@ GLOBAL_PROTECT(Banlist)
GLOB.Banlist = new("data/banlist.bdb")
log_admin("Loading Banlist")
if (!length(GLOB.Banlist.dir)) log_admin("Banlist is empty.")
if (!length(GLOB.Banlist.dir))
log_admin("Banlist is empty.")
if (!GLOB.Banlist.dir.Find("base"))
log_admin("Banlist missing base dir.")
@@ -89,8 +90,10 @@ GLOBAL_PROTECT(Banlist)
message_admins("Invalid Ban.")
continue
if (!GLOB.Banlist["temp"]) continue
if (GLOB.CMinutes >= GLOB.Banlist["minutes"]) RemoveBan(A)
if (!GLOB.Banlist["temp"])
continue
if (GLOB.CMinutes >= GLOB.Banlist["minutes"])
RemoveBan(A)
return 1
@@ -133,7 +136,8 @@ GLOBAL_PROTECT(Banlist)
GLOB.Banlist["id"] >> id
GLOB.Banlist.cd = "/base"
if (!GLOB.Banlist.dir.Remove(foldername)) return 0
if (!GLOB.Banlist.dir.Remove(foldername))
return 0
if(!usr)
log_admin_private("Ban Expired: [key]")
+2 -1
View File
@@ -594,7 +594,8 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
set name = "Give Disease"
set desc = "Gives a Disease to a mob."
var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in SSdisease.diseases
if(!D) return
if(!D)
return
T.ForceContractDisease(new D)
SSblackbox.add_details("admin_verb","Give Disease") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] gave [key_name(T)] the disease [D].")
+6 -6
View File
@@ -1,7 +1,7 @@
//returns a reason if M is banned from rank, returns 0 otherwise
//returns a reason if M is banned from rank, returns FALSE otherwise
/proc/jobban_isbanned(mob/M, rank)
if(!M || !istype(M) || !M.ckey)
return 0
return FALSE
if(!M.client) //no cache. fallback to a datum/DBQuery
var/datum/DBQuery/query_jobban_check_ban = SSdbcore.NewQuery("SELECT reason FROM [format_table_name("ban")] WHERE ckey = '[sanitizeSQL(M.ckey)]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned) AND job = '[sanitizeSQL(rank)]'")
@@ -9,17 +9,17 @@
return
if(query_jobban_check_ban.NextRow())
var/reason = query_jobban_check_ban.item[1]
return reason ? reason : 1 //we don't want to return "" if there is no ban reason, as that would evaluate to false
return reason ? reason : TRUE //we don't want to return "" if there is no ban reason, as that would evaluate to false
else
return 0
return FALSE
if(!M.client.jobbancache)
jobban_buildcache(M.client)
if(rank in M.client.jobbancache)
var/reason = M.client.jobbancache[rank]
return (reason) ? reason : 1 //see above for why we need to do this
return 0
return (reason) ? reason : TRUE //see above for why we need to do this
return FALSE
/proc/jobban_buildcache(client/C)
if(!SSdbcore.Connect())
+1 -1
View File
@@ -104,7 +104,7 @@
/obj/effect/shuttle_build
name = "shuttle_build"
desc = "Some assembly required"
desc = "Some assembly required."
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "syndballoon"
anchored = TRUE
+2 -1
View File
@@ -101,7 +101,8 @@ if it doesn't return 1 and show_msg=1 it will prints a message explaining why th
generally it would be used like so:
/proc/admin_proc()
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
to_chat(world, "you have enough rights!")
NOTE: it checks usr! not src! So if you're checking somebody's rank in a proc which they did not call
+5 -4
View File
@@ -410,9 +410,10 @@
dat += "in [disk_loc.loc] at ([disk_loc.x], [disk_loc.y], [disk_loc.z])</td></tr>"
dat += "</table>"
if(SSticker.mode.head_revolutionaries.len || SSticker.mode.revolutionaries.len)
var/list/revs = get_antagonists(/datum/antagonist/rev)
if(revs.len > 0)
dat += "<br><table cellspacing=5><tr><td><B>Revolutionaries</B></td><td></td></tr>"
for(var/datum/mind/N in SSticker.mode.head_revolutionaries)
for(var/datum/mind/N in get_antagonists(/datum/antagonist/rev/head))
var/mob/M = N.current
if(!M)
dat += "<tr><td><a href='?_src_=vars;[HrefToken()];Vars=\ref[N]'>[N.name]([N.key])</a><i>Head Revolutionary body destroyed!</i></td>"
@@ -421,14 +422,14 @@
dat += "<tr><td><a href='?_src_=holder;[HrefToken()];adminplayeropts=\ref[M]'>[M.real_name]</a> <b>(Leader)</b>[M.client ? "" : " <i>(No Client)</i>"][M.stat == DEAD ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td>"
dat += "<td><A href='?_src_=holder;[HrefToken()];adminplayerobservefollow=\ref[M]'>FLW</a></td></tr>"
for(var/datum/mind/N in SSticker.mode.revolutionaries)
for(var/datum/mind/N in get_antagonists(/datum/antagonist/rev,TRUE))
var/mob/M = N.current
if(M)
dat += "<tr><td><a href='?_src_=holder;[HrefToken()];adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(No Client)</i>"][M.stat == DEAD ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td>"
dat += "<td><A href='?_src_=holder;[HrefToken()];adminplayerobservefollow=\ref[M]'>FLW</a></td></tr>"
dat += "</table><table cellspacing=5><tr><td><B>Target(s)</B></td><td></td><td><B>Location</B></td></tr>"
for(var/datum/mind/N in SSticker.mode.get_living_heads())
for(var/datum/mind/N in SSjob.get_living_heads())
var/mob/M = N.current
if(M)
dat += "<tr><td><a href='?_src_=holder;[HrefToken()];adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(No Client)</i>"][M.stat == DEAD ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
+10 -6
View File
@@ -215,8 +215,8 @@
return
SSblackbox.add_details("admin_secrets_fun_used","Send CentCom Ferry")
if(!SSshuttle.toggleShuttle("ferry","ferry_home","ferry_away"))
message_admins("[key_name_admin(usr)] moved the centcom ferry")
log_admin("[key_name(usr)] moved the centcom ferry")
message_admins("[key_name_admin(usr)] moved the CentCom ferry")
log_admin("[key_name(usr)] moved the CentCom ferry")
if("togglearrivals")
if(!check_rights(R_ADMIN))
@@ -334,9 +334,12 @@
return
SSblackbox.add_details("admin_secrets_fun_used","Traitor All ([objective])")
for(var/mob/living/H in GLOB.player_list)
if(!(ishuman(H)||istype(H, /mob/living/silicon/))) continue
if(H.stat == DEAD || !H.client || !H.mind || ispAI(H)) continue
if(is_special_character(H)) continue
if(!(ishuman(H)||istype(H, /mob/living/silicon/)))
continue
if(H.stat == DEAD || !H.client || !H.mind || ispAI(H))
continue
if(is_special_character(H))
continue
H.mind.add_antag_datum(ANTAG_DATUM_TRAITOR_CUSTOM)
var/datum/antagonist/traitor/traitordatum = H.mind.has_antag_datum(ANTAG_DATUM_TRAITOR) //original datum self deletes
var/datum/objective/new_objective = new
@@ -546,7 +549,8 @@
if(!check_rights(R_DEBUG))
return
var/datum/job/J = SSjob.GetJob("Security Officer")
if(!J) return
if(!J)
return
J.total_positions = -1
J.spawn_positions = -1
message_admins("[key_name_admin(usr)] has removed the cap on security officers.")
+1 -1
View File
@@ -2240,7 +2240,7 @@
if(!newname)
return
G.name = newname
var/description = input("Enter centcom message contents:") as message|null
var/description = input("Enter CentCom message contents:") as message|null
if(!description)
return
G.report_message = description
+3 -4
View File
@@ -2,7 +2,8 @@
var/text
for(var/A in typesof(/obj/item))
var/obj/item/O = new A( locate(1,1,1) )
if(!O) continue
if(!O)
continue
var/icon/IL = new(O.lefthand_file)
var/list/Lstates = IL.IconStates()
var/icon/IR = new(O.righthand_file)
@@ -28,7 +29,5 @@
if(text)
var/F = file("broken_icons.txt")
fdel(F)
WRITE_FILE(F, text)
WRITE_FILE(F, text)
to_chat(world, "Completely successfully and written to [F]")
+3 -1
View File
@@ -489,7 +489,9 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
return
if(handle_spam_prevention(msg,MUTE_ADMINHELP))
return
msg = trim(msg)
if(!msg)
return
+1 -1
View File
@@ -131,7 +131,7 @@
//clean the message if it's not sent by a high-rank admin
if(!check_rights(R_SERVER|R_DEBUG,0)||irc)//no sending html to the poor bots
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
msg = trim(sanitize(copytext(msg,1,MAX_MESSAGE_LEN)))
if(!msg)
return
+4 -2
View File
@@ -181,7 +181,8 @@
if(varholder in locked && !check_rights(R_DEBUG,0))
return 1
var/thetype = input(user,"Select variable type:" ,"Type") in list("text","number","mob-reference","obj-reference","turf-reference")
if(!thetype) return 1
if(!thetype)
return 1
switch(thetype)
if("text")
valueholder = input(user,"Enter variable value:" ,"Value", "value") as text
@@ -200,7 +201,8 @@
var/datum/mapGenerator/MP = path
options[initial(MP.buildmode_name)] = path
var/type = input(user,"Select Generator Type","Type") as null|anything in options
if(!type) return
if(!type)
return
generator_path = options[type]
cornerA = null
+2 -1
View File
@@ -31,7 +31,8 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
set name = "Advanced ProcCall"
set waitfor = 0
if(!check_rights(R_DEBUG)) return
if(!check_rights(R_DEBUG))
return
var/datum/target = null
var/targetselected = 0
@@ -36,7 +36,8 @@
var/obj/item/organ = input("Select organ/implant:", "Organ Manipulation", null) in organs
organ = organs[organ]
if(!organ) return
if(!organ)
return
var/obj/item/organ/O
var/obj/item/implant/I
+14 -7
View File
@@ -194,15 +194,20 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
set category = "Mapping"
set name = "Count Objects On Level"
var/level = input("Which z-level?","Level?") as text
if(!level) return
if(!level)
return
var/num_level = text2num(level)
if(!num_level) return
if(!isnum(num_level)) return
if(!num_level)
return
if(!isnum(num_level))
return
var/type_text = input("Which type path?","Path?") as text
if(!type_text) return
if(!type_text)
return
var/type_path = text2path(type_text)
if(!type_path) return
if(!type_path)
return
var/count = 0
@@ -238,9 +243,11 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
set name = "Count Objects All"
var/type_text = input("Which type path?","") as text
if(!type_text) return
if(!type_text)
return
var/type_path = text2path(type_text)
if(!type_path) return
if(!type_path)
return
var/count = 0
+16 -8
View File
@@ -545,15 +545,20 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
var/devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null
if(devastation == null) return
if(devastation == null)
return
var/heavy = input("Range of heavy impact. -1 to none", text("Input")) as num|null
if(heavy == null) return
if(heavy == null)
return
var/light = input("Range of light impact. -1 to none", text("Input")) as num|null
if(light == null) return
if(light == null)
return
var/flash = input("Range of flash. -1 to none", text("Input")) as num|null
if(flash == null) return
if(flash == null)
return
var/flames = input("Range of flames. -1 to none", text("Input")) as num|null
if(flames == null) return
if(flames == null)
return
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1) || (flames != -1))
if ((devastation > 20) || (heavy > 20) || (light > 20) || (flames > 20))
@@ -577,9 +582,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
var/heavy = input("Range of heavy pulse.", text("Input")) as num|null
if(heavy == null) return
if(heavy == null)
return
var/light = input("Range of light pulse.", text("Input")) as num|null
if(light == null) return
if(light == null)
return
if (heavy || light)
@@ -960,7 +967,8 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
set name = "Toggle AntagHUD"
set desc = "Toggles the Admin AntagHUD"
if(!holder) return
if(!holder)
return
var/adding_hud = !has_antag_hud()
+13 -20
View File
@@ -146,27 +146,20 @@
/obj/item/device/assembly/flash/proc/terrible_conversion_proc(mob/living/carbon/human/H, mob/user)
if(istype(H) && ishuman(user) && H.stat != DEAD)
if(user.mind && (user.mind in SSticker.mode.head_revolutionaries))
if(H.client)
if(H.stat == CONSCIOUS)
H.mind_initialize() //give them a mind datum if they don't have one.
var/resisted
if(!H.isloyal())
if(user.mind in SSticker.mode.head_revolutionaries)
if(SSticker.mode.add_revolutionary(H.mind))
H.Stun(60)
times_used -- //Flashes less likely to burn out for headrevs when used for conversion
else
resisted = 1
else
resisted = 1
if(resisted)
to_chat(user, "<span class='warning'>This mind seems resistant to the flash!</span>")
else
to_chat(user, "<span class='warning'>They must be conscious before you can convert them!</span>")
else
if(user.mind)
var/datum/antagonist/rev/head/converter = user.mind.has_antag_datum(/datum/antagonist/rev/head)
if(!converter)
return
if(!H.client)
to_chat(user, "<span class='warning'>This mind is so vacant that it is not susceptible to influence!</span>")
return
if(H.stat != CONSCIOUS)
to_chat(user, "<span class='warning'>They must be conscious before you can convert them!</span>")
return
if(converter.add_revolutionary(H.mind))
times_used -- //Flashes less likely to burn out for headrevs when used for conversion
else
to_chat(user, "<span class='warning'>This mind seems resistant to the flash!</span>")
/obj/item/device/assembly/flash/cyborg
+4 -2
View File
@@ -107,7 +107,8 @@ Code:
..()
/obj/item/device/assembly/signaler/proc/signal()
if(!radio_connection) return
if(!radio_connection)
return
var/datum/signal/signal = new
signal.source = src
@@ -173,7 +174,8 @@ Code:
return "The radio receiver is [on?"on":"off"]."
/obj/item/device/assembly/signaler/reciever/receive_signal(datum/signal/signal)
if(!on) return
if(!on)
return
return ..(signal)
@@ -27,7 +27,7 @@
var/datum/excited_group/excited_group
var/excited = 0
var/recently_active = 0
var/datum/gas_mixture/air
var/datum/gas_mixture/turf/air
var/obj/effect/hotspot/active_hotspot
var/atmos_cooldown = 0
@@ -65,22 +65,17 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
//PV = nRT
/datum/gas_mixture/proc/heat_capacity() //joules per kelvin
/datum/gas_mixture/proc/heat_capacity(data = MOLES) //joules per kelvin
var/list/cached_gases = gases
. = 0
for(var/id in cached_gases)
var/gas_data = cached_gases[id]
. += gas_data[MOLES] * gas_data[GAS_META][META_GAS_SPECIFIC_HEAT]
if(!. && temperature) //if temp isn't defined, this mixture isn't a vacuum like space is. it hasn't been filled with *anything* so we want it to take on the properties of whatever gas enters it
. += HEAT_CAPACITY_VACUUM //however, if temp is defined but HC is still 0, then we want the mixture to behave like space does, as a heat sink
. += gas_data[data] * gas_data[GAS_META][META_GAS_SPECIFIC_HEAT]
/datum/gas_mixture/proc/heat_capacity_archived() //joules per kelvin
var/list/cached_gases = gases
. = 0
for(var/id in cached_gases)
var/gas_data = cached_gases[id]
. += gas_data[ARCHIVE] * gas_data[GAS_META][META_GAS_SPECIFIC_HEAT]
/datum/gas_mixture/turf/heat_capacity()
. = ..()
if(!.)
. += HEAT_CAPACITY_VACUUM //we want vacuums in turfs to have the same heat capacity as space
//prefer this in performance critical areas
#define TOTAL_MOLES(cached_gases, out_var)\
@@ -195,7 +190,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
amount = min(amount, sum) //Can not take more air than tile has!
if(amount <= 0)
return null
var/datum/gas_mixture/removed = new
var/datum/gas_mixture/removed = new type
var/list/removed_gases = removed.gases //accessing datum vars is slower than proc vars
removed.temperature = temperature
@@ -213,7 +208,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
ratio = min(ratio, 1)
var/list/cached_gases = gases
var/datum/gas_mixture/removed = new
var/datum/gas_mixture/removed = new type
var/list/removed_gases = removed.gases //accessing datum vars is slower than proc vars
removed.temperature = temperature
@@ -228,7 +223,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
/datum/gas_mixture/copy()
var/list/cached_gases = gases
var/datum/gas_mixture/copy = new
var/datum/gas_mixture/copy = new type
var/list/copy_gases = copy.gases
copy.temperature = temperature
@@ -364,8 +359,8 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
sharer_temperature = sharer.temperature_archived
var/temperature_delta = temperature_archived - sharer_temperature
if(abs(temperature_delta) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
var/self_heat_capacity = heat_capacity_archived()
sharer_heat_capacity = sharer_heat_capacity || sharer.heat_capacity_archived()
var/self_heat_capacity = heat_capacity(ARCHIVE)
sharer_heat_capacity = sharer_heat_capacity || sharer.heat_capacity(ARCHIVE)
if((sharer_heat_capacity > MINIMUM_HEAT_CAPACITY) && (self_heat_capacity > MINIMUM_HEAT_CAPACITY))
var/heat = conduction_coefficient*temperature_delta* \
@@ -19,9 +19,6 @@
/datum/gas_mixture/immutable/merge()
return 0 //we're immutable.
/datum/gas_mixture/immutable/heat_capacity_archived()
return heat_capacity()
/datum/gas_mixture/immutable/share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4)
. = ..(sharer, 0)
garbage_collect()
@@ -27,7 +27,7 @@
/obj/item/wallframe/airalarm
name = "air alarm frame"
desc = "Used for building Air Alarms"
desc = "Used for building Air Alarms."
icon = 'icons/obj/monitors.dmi'
icon_state = "alarm_bitem"
result_path = /obj/machinery/airalarm
@@ -25,6 +25,8 @@ Pipelines + Other Objects -> Pipe network
var/can_unwrench = 0
var/initialize_directions = 0
var/pipe_color
var/piping_layer = PIPING_LAYER_DEFAULT
var/pipe_flags = NONE
var/global/list/iconsetids = list()
var/global/list/pipeimages = list()
@@ -34,12 +36,18 @@ Pipelines + Other Objects -> Pipe network
var/device_type = 0
var/list/obj/machinery/atmospherics/nodes
/obj/machinery/atmospherics/examine(mob/living/user)
/obj/machinery/atmospherics/examine(mob/user)
..()
if(is_type_in_list(src, GLOB.ventcrawl_machinery) && user.ventcrawler)
to_chat(user, "<span class='notice'>Alt-click to crawl through it.</span>")
if(is_type_in_list(src, GLOB.ventcrawl_machinery) && isliving(user))
var/mob/living/L = user
if(L.ventcrawler)
to_chat(L, "<span class='notice'>Alt-click to crawl through it.</span>")
/obj/machinery/atmospherics/New(loc, process = TRUE)
/obj/machinery/atmospherics/New(loc, process = TRUE, setdir)
if(!isnull(setdir))
setDir(setdir)
if(pipe_flags & PIPING_CARDINAL_AUTONORMALIZE)
normalize_cardinal_directions()
nodes = new(device_type)
if (!armor)
armor = list(melee = 25, bullet = 10, laser = 10, energy = 100, bomb = 0, bio = 100, rad = 100, fire = 100, acid = 70)
@@ -61,6 +69,13 @@ Pipelines + Other Objects -> Pipe network
return ..()
//return QDEL_HINT_FINDREFERENCE
/obj/machinery/atmospherics/proc/destroy_network()
return
/obj/machinery/atmospherics/proc/build_network()
// Called to build a network from this node
return
/obj/machinery/atmospherics/proc/nullifyNode(I)
if(NODE_I)
var/obj/machinery/atmospherics/N = NODE_I
@@ -80,6 +95,11 @@ Pipelines + Other Objects -> Pipe network
break
return node_connects
/obj/machinery/atmospherics/proc/normalize_cardinal_directions()
if(dir==SOUTH)
setDir(NORTH)
else if(dir==WEST)
setDir(EAST)
//this is called just after the air controller sets up turfs
/obj/machinery/atmospherics/proc/atmosinit(var/list/node_connects)
@@ -91,12 +111,37 @@ Pipelines + Other Objects -> Pipe network
if(can_be_node(target, I))
NODE_I = target
break
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)
/obj/machinery/atmospherics/proc/can_be_node(obj/machinery/atmospherics/target)
if(target.initialize_directions & get_dir(target,src))
return connection_check(target, piping_layer)
//Find a connecting /obj/machinery/atmospherics in specified direction
/obj/machinery/atmospherics/proc/findConnecting(direction, prompted_layer)
for(var/obj/machinery/atmospherics/target in get_step(src, direction))
if(target.initialize_directions & get_dir(target,src))
if(connection_check(target, prompted_layer))
return target
/obj/machinery/atmospherics/proc/connection_check(obj/machinery/atmospherics/target, given_layer)
if(isConnectable(target, given_layer) && target.isConnectable(src, given_layer) && (target.initialize_directions & get_dir(target,src)))
return TRUE
return FALSE
/obj/machinery/atmospherics/proc/isConnectable(obj/machinery/atmospherics/target, given_layer)
if(isnull(given_layer))
given_layer = piping_layer
if((target.piping_layer == given_layer) || (target.pipe_flags & PIPING_ALL_LAYER))
return TRUE
return FALSE
/obj/machinery/atmospherics/proc/pipeline_expansion()
return nodes
@@ -119,14 +164,10 @@ Pipelines + Other Objects -> Pipe network
/obj/machinery/atmospherics/proc/replacePipenet()
return
/obj/machinery/atmospherics/proc/build_network()
// Called to build a network from this node
return
/obj/machinery/atmospherics/proc/disconnect(obj/machinery/atmospherics/reference)
if(istype(reference, /obj/machinery/atmospherics/pipe))
var/obj/machinery/atmospherics/pipe/P = reference
qdel(P.parent)
P.destroy_network()
var/I = nodes.Find(reference)
NODE_I = null
update_icon()
@@ -135,12 +176,17 @@ Pipelines + Other Objects -> Pipe network
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
if(user.dropItemToGround(pipe))
pipe.setPipingLayer(piping_layer) //align it with us
return TRUE
if(istype(W, /obj/item/wrench))
if(can_unwrench(user))
var/turf/T = get_turf(src)
if (level==1 && isturf(T) && T.intact)
to_chat(user, "<span class='warning'>You must remove the plating first!</span>")
return 1
return TRUE
var/datum/gas_mixture/int_air = return_air()
var/datum/gas_mixture/env_air = loc.return_air()
add_fingerprint(user)
@@ -148,7 +194,7 @@ Pipelines + Other Objects -> Pipe network
var/unsafe_wrenching = FALSE
var/internal_pressure = int_air.return_pressure()-env_air.return_pressure()
playsound(src.loc, W.usesound, 50, 1)
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if (internal_pressure > 2*ONE_ATMOSPHERE)
to_chat(user, "<span class='warning'>As you begin unwrenching \the [src] a gush of air blows in your face... maybe you should reconsider?</span>")
@@ -193,7 +239,8 @@ Pipelines + Other Objects -> Pipe network
/obj/machinery/atmospherics/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
if(can_unwrench)
var/obj/item/pipe/stored = new(loc, make_from=src)
var/obj/item/pipe/stored = new(loc, piping_layer, dir, src)
stored.setPipingLayer(piping_layer)
if(!disassembled)
stored.obj_integrity = stored.max_integrity * 0.5
transfer_fingerprints_to(stored)
@@ -224,10 +271,11 @@ Pipelines + Other Objects -> Pipe network
if(unconnected & direction)
underlays += getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', "pipe_exposed", direction)
/obj/machinery/atmospherics/on_construction(pipe_type, obj_color)
/obj/machinery/atmospherics/on_construction(pipe_type, obj_color, set_layer)
if(can_unwrench)
add_atom_colour(obj_color, FIXED_COLOUR_PRIORITY)
pipe_color = obj_color
setPipingLayer(set_layer)
var/turf/T = get_turf(src)
level = T.intact ? 2 : 1
atmosinit()
@@ -237,18 +285,16 @@ Pipelines + Other Objects -> Pipe network
A.addMember(src)
build_network()
/obj/machinery/atmospherics/Entered(atom/movable/AM)
if(istype(AM, /mob/living))
var/mob/living/L = AM
L.ventcrawl_layer = piping_layer
return ..()
/obj/machinery/atmospherics/singularity_pull(S, current_size)
..()
if(current_size >= STAGE_FIVE)
deconstruct(FALSE)
//Find a connecting /obj/machinery/atmospherics in specified direction
/obj/machinery/atmospherics/proc/findConnecting(direction)
for(var/obj/machinery/atmospherics/target in get_step(src, direction))
if(target.initialize_directions & get_dir(target,src))
return target
return ..()
#define VENT_SOUND_DELAY 30
@@ -259,7 +305,7 @@ Pipelines + Other Objects -> Pipe network
if(user in buckled_mobs)// fixes buckle ventcrawl edgecase fuck bug
return
var/obj/machinery/atmospherics/target_move = findConnecting(direction)
var/obj/machinery/atmospherics/target_move = findConnecting(direction, user.ventcrawl_layer)
if(target_move)
if(target_move.can_crawl_through())
if(is_type_in_typecache(target_move, GLOB.ventcrawl_machinery))
@@ -269,14 +315,14 @@ Pipelines + Other Objects -> Pipe network
var/list/pipenetdiff = returnPipenets() ^ target_move.returnPipenets()
if(pipenetdiff.len)
user.update_pipe_vision(target_move)
user.loc = target_move
user.forceMove(target_move)
user.client.eye = target_move //Byond only updates the eye every tick, This smooths out the movement
if(world.time - user.last_played_vent > VENT_SOUND_DELAY)
user.last_played_vent = world.time
playsound(src, 'sound/machines/ventcrawl.ogg', 50, 1, -3)
else
if((direction & initialize_directions) || 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(src.loc)
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.canmove = 0
spawn(1)
@@ -11,6 +11,7 @@
var/status = 0
var/last_pressure_delta = 0
pipe_flags = PIPING_ONE_PER_TURF
anchored = TRUE
density = TRUE
@@ -69,7 +69,7 @@
var/output_starting_pressure = air3.return_pressure()
if(output_starting_pressure >= target_pressure || air2.return_pressure() >= target_pressure)
if(output_starting_pressure >= target_pressure)
//No need to transfer if target is already full!
return
@@ -106,7 +106,8 @@
removed.gases[filter_type][MOLES] = 0
removed.garbage_collect()
air2.merge(filtered_out)
var/datum/gas_mixture/target = (air2.return_pressure() < target_pressure ? air2 : air1) //if there's no room for the filtered gas; just leave it in air1
target.merge(filtered_out)
air3.merge(removed)
@@ -5,6 +5,7 @@
use_power = IDLE_POWER_USE
device_type = TRINARY
layer = GAS_FILTER_LAYER
pipe_flags = PIPING_ONE_PER_TURF
var/flipped = FALSE
@@ -11,6 +11,7 @@
layer = ABOVE_WINDOW_LAYER
state_open = FALSE
circuit = /obj/item/circuitboard/machine/cryo_tube
pipe_flags = PIPING_ONE_PER_TURF | PIPING_DEFAULT_LAYER_ONLY
var/on = FALSE
var/autoeject = FALSE
@@ -293,10 +294,15 @@
var/reagentlist = pretty_string_from_reagent_list(I.reagents.reagent_list)
log_game("[key_name(user)] added an [I] to cyro containing [reagentlist]")
return
if(!on && !occupant && !state_open && (default_deconstruction_screwdriver(user, "pod-o", "pod-off", I) || exchange_parts(user, I)) \
if(!on && !occupant && !state_open && (default_deconstruction_screwdriver(user, "pod-off", "pod-off", I) || exchange_parts(user, I)) \
|| default_change_direction_wrench(user, I) \
|| default_pry_open(I) \
|| default_deconstruction_crowbar(I))
update_icon()
return
else if(istype(I, /obj/item/screwdriver))
to_chat(user, "<span class='notice'>You can't access the maintenance panel while the pod is " \
+ (on ? "active" : (occupant ? "full" : "open")) + ".</span>")
return
return ..()
@@ -3,7 +3,7 @@
icon_state = "he_intact"
name = "heat exchanger"
desc = "Exchanges heat between two input gases. Setup for fast heat transfer"
desc = "Exchanges heat between two input gases. Set up for fast heat transfer."
can_unwrench = TRUE
@@ -1,6 +1,6 @@
/obj/machinery/atmospherics/components/unary/outlet_injector
name = "air injector"
desc = "Has a valve and pump attached to it"
desc = "Has a valve and pump attached to it."
icon_state = "inje_map"
use_power = IDLE_POWER_USE
can_unwrench = TRUE
@@ -3,7 +3,7 @@
icon_state = "o2gen_map"
name = "oxygen generator"
desc = "Generates oxygen"
desc = "Generates oxygen."
dir = SOUTH
initialize_directions = SOUTH
@@ -8,6 +8,7 @@
use_power = NO_POWER_USE
level = 0
layer = GAS_FILTER_LAYER
pipe_flags = PIPING_ONE_PER_TURF
/obj/machinery/atmospherics/components/unary/portables_connector/New()
..()
@@ -9,6 +9,7 @@
density = TRUE
var/gas_type = 0
layer = ABOVE_WINDOW_LAYER
pipe_flags = PIPING_ONE_PER_TURF
/obj/machinery/atmospherics/components/unary/tank/New()
..()
@@ -11,6 +11,7 @@
armor = list(melee = 0, bullet = 0, laser = 0, energy = 100, bomb = 0, bio = 100, rad = 100, fire = 80, acid = 30)
layer = OBJ_LAYER
circuit = /obj/item/circuitboard/machine/thermomachine
pipe_flags = PIPING_ONE_PER_TURF | PIPING_DEFAULT_LAYER_ONLY
var/on = FALSE
var/min_temperature = 0
@@ -3,6 +3,7 @@
dir = SOUTH
initialize_directions = SOUTH
device_type = UNARY
pipe_flags = PIPING_ONE_PER_TURF
/obj/machinery/atmospherics/components/unary/SetInitDirections()
initialize_directions = dir
@@ -13,19 +13,33 @@
active_power_usage = 4
max_integrity = 150
armor = list(melee = 0, bullet = 0, laser = 0, energy = 100, bomb = 0, bio = 100, rad = 100, fire = 40, acid = 0)
/obj/machinery/meter/Initialize(mapload)
. = ..()
SSair.atmos_machinery += src
if (!target)
target = locate(/obj/machinery/atmospherics/pipe) in loc
var/target_layer = PIPING_LAYER_DEFAULT
/obj/machinery/meter/Destroy()
SSair.atmos_machinery -= src
src.target = null
target = null
return ..()
/obj/machinery/meter/Initialize(mapload, new_piping_layer)
if(!isnull(new_piping_layer))
target_layer = new_piping_layer
SSair.atmos_machinery += src
if(!target)
reattach_to_layer()
return ..()
/obj/machinery/meter/proc/reattach_to_layer()
for(var/obj/machinery/atmospherics/pipe/pipe in loc)
if(pipe.piping_layer == target_layer)
target = pipe
setAttachLayer(pipe.piping_layer)
break
/obj/machinery/meter/proc/setAttachLayer(var/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
/obj/machinery/meter/process_atmos()
if(!target)
icon_state = "meterX"
@@ -75,7 +89,7 @@
radio_connection.post_signal(src, signal)
/obj/machinery/meter/proc/status()
if (src.target)
if (target)
var/datum/gas_mixture/environment = target.return_air()
if(environment)
. = "The pressure gauge reads [round(environment.return_pressure(), 0.01)] kPa; [round(environment.temperature,0.01)] K ([round(environment.temperature-T0C,0.01)]&deg;C)."
@@ -91,23 +105,23 @@
/obj/machinery/meter/attackby(obj/item/W, mob/user, params)
if (istype(W, /obj/item/wrench))
playsound(src.loc, W.usesound, 50, 1)
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if (do_after(user, 40*W.toolspeed, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"<span class='notice'>You unfasten \the [src].</span>", \
"<span class='italics'>You hear ratchet.</span>")
new /obj/item/pipe_meter(src.loc)
new /obj/item/pipe_meter(loc)
qdel(src)
else
return ..()
/obj/machinery/meter/attack_ai(mob/user)
return src.attack_hand(user)
return attack_hand(user)
/obj/machinery/meter/attack_paw(mob/user)
return src.attack_hand(user)
return attack_hand(user)
/obj/machinery/meter/attack_hand(mob/user)
@@ -129,4 +143,4 @@
/obj/machinery/meter/turf/Initialize()
. = ..()
src.target = loc
target = loc
@@ -1,47 +0,0 @@
GLOBAL_LIST_EMPTY(bluespace_pipes)
/obj/machinery/atmospherics/pipe/bluespace
name = "bluespace pipe"
desc = "Transmits gas across large distances of space. Developed using bluespace technology."
icon = 'icons/obj/atmospherics/pipes/bluespace.dmi'
icon_state = "map"
dir = SOUTH
initialize_directions = SOUTH
device_type = UNARY
can_buckle = FALSE
/obj/machinery/atmospherics/pipe/bluespace/New()
icon_state = "pipe"
GLOB.bluespace_pipes += src
..()
/obj/machinery/atmospherics/pipe/bluespace/Destroy()
GLOB.bluespace_pipes -= src
for(var/p in GLOB.bluespace_pipes)
var/obj/machinery/atmospherics/pipe/bluespace/P = p
QDEL_NULL(P.parent)
P.build_network()
return ..()
/obj/machinery/atmospherics/pipe/bluespace/SetInitDirections()
initialize_directions = dir
/obj/machinery/atmospherics/pipe/bluespace/pipeline_expansion()
return ..() + GLOB.bluespace_pipes - src
/obj/machinery/atmospherics/components/pipe/bluespace/hide()
update_icon()
/obj/machinery/atmospherics/pipe/bluespace/update_icon(showpipe)
underlays.Cut()
var/turf/T = loc
if(level != 2 && T.intact)
return //no need to update the pipes if they aren't showing
var/connected = 0 //Direction bitset
for(DEVICE_TYPE_LOOP) //adds intact pieces
if(NODE_I)
connected |= icon_addintact(NODE_I)
icon_addbroken(connected) //adds broken pieces
/obj/machinery/atmospherics/pipe/bluespace/paint()
return FALSE
@@ -31,7 +31,7 @@
var/turf/T = loc
if(istype(T))
if(istype(T, /turf/open/lava))
if(islava(T))
environment_temperature = 5000
else if(T.blocks_air)
environment_temperature = T.temperature
@@ -3,7 +3,7 @@
icon_state = "intact"
name = "junction"
desc = "A one meter junction that connects regular and heat-exchanging pipe"
desc = "A one meter junction that connects regular and heat-exchanging pipe."
minimum_temperature_difference = 300
thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
@@ -3,7 +3,7 @@
icon_state = "manifold"
name = "pipe manifold"
desc = "A manifold composed of regular pipes"
desc = "A manifold composed of regular pipes."
dir = SOUTH
initialize_directions_he = EAST|NORTH|WEST
@@ -38,7 +38,7 @@
icon_state = "manifold4w"
name = "4-way pipe manifold"
desc = "A manifold composed of heat-exchanging pipes"
desc = "A manifold composed of heat-exchanging pipes."
initialize_directions_he = NORTH|SOUTH|EAST|WEST
@@ -2,7 +2,7 @@
icon_state = "intact"
name = "pipe"
desc = "A one meter section of heat-exchanging pipe"
desc = "A one meter section of heat-exchanging pipe."
dir = SOUTH
initialize_directions_he = SOUTH|NORTH
@@ -0,0 +1,135 @@
/obj/machinery/atmospherics/pipe/layer_manifold
name = "pipe-layer manifold"
icon = 'icons/obj/atmospherics/pipes/manifold.dmi'
icon_state = "manifoldlayer"
desc = "A special pipe to bridge pipe layers with."
dir = SOUTH
initialize_directions = NORTH|SOUTH
pipe_flags = PIPING_ALL_LAYER | PIPING_DEFAULT_LAYER_ONLY | PIPING_CARDINAL_AUTONORMALIZE
piping_layer = PIPING_LAYER_DEFAULT
device_type = 0
volume = 260
var/list/front_nodes
var/list/back_nodes
/obj/machinery/atmospherics/pipe/layer_manifold/Initialize()
front_nodes = list()
back_nodes = list()
return ..()
/obj/machinery/atmospherics/pipe/layer_manifold/Destroy()
nullifyAllNodes()
return ..()
/obj/machinery/atmospherics/pipe/layer_manifold/proc/nullifyAllNodes()
var/list/obj/machinery/atmospherics/needs_nullifying = get_all_connected_nodes()
front_nodes = null
back_nodes = null
nodes = list()
for(var/obj/machinery/atmospherics/A in needs_nullifying)
A.disconnect(src)
A.build_network()
/obj/machinery/atmospherics/pipe/layer_manifold/proc/get_all_connected_nodes()
var/list/obj/machinery/atmospherics/all_connected = list()
for(var/obj/machinery/atmospherics/I in front_nodes)
all_connected[I] = I
for(var/obj/machinery/atmospherics/I in back_nodes)
all_connected[I] = I
for(var/obj/machinery/atmospherics/I in nodes)
all_connected[I] = I
var/list/obj/machinery/atmospherics/returnlist = list()
for(var/obj/machinery/atmospherics/A in all_connected)
returnlist += all_connected[A]
return returnlist
/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)
/obj/machinery/atmospherics/pipe/layer_manifold/proc/add_attached_image(obj/machinery/atmospherics/A)
var/invis = A.invisibility ? "-f" : ""
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)
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)
/obj/machinery/atmospherics/pipe/layer_manifold/SetInitDirections()
switch(dir)
if(NORTH || SOUTH)
initialize_directions = NORTH|SOUTH
if(EAST || WEST)
initialize_directions = EAST|WEST
/obj/machinery/atmospherics/pipe/layer_manifold/isConnectable(obj/machinery/atmospherics/target, given_layer)
if(!given_layer)
return TRUE
. = ..()
/obj/machinery/atmospherics/pipe/layer_manifold/proc/findAllConnections()
front_nodes = list()
back_nodes = list()
var/list/new_nodes = list()
for(var/iter in PIPING_LAYER_MIN to PIPING_LAYER_MAX)
var/obj/machinery/atmospherics/foundfront = findConnecting(dir, iter)
var/obj/machinery/atmospherics/foundback = findConnecting(turn(dir, 180), iter)
front_nodes += foundfront
back_nodes += foundback
if(foundfront && !QDELETED(foundfront))
new_nodes += foundfront
if(foundback && !QDELETED(foundback))
new_nodes += foundback
update_icon()
return new_nodes
/obj/machinery/atmospherics/pipe/layer_manifold/atmosinit()
normalize_cardinal_directions()
findAllConnections()
var/turf/T = loc // hide if turf is not intact
hide(T.intact)
/obj/machinery/atmospherics/pipe/layer_manifold/setPipingLayer()
piping_layer = PIPING_LAYER_DEFAULT
/obj/machinery/atmospherics/pipe/layer_manifold/pipeline_expansion()
return get_all_connected_nodes()
/obj/machinery/atmospherics/pipe/layer_manifold/disconnect(obj/machinery/atmospherics/reference)
if(istype(reference, /obj/machinery/atmospherics/pipe))
var/obj/machinery/atmospherics/pipe/P = reference
P.destroy_network()
while(reference in get_all_connected_nodes())
if(reference in nodes)
var/I = nodes.Find(reference)
NODE_I = null
if(reference in front_nodes)
var/I = front_nodes.Find(reference)
front_nodes[I] = null
if(reference in back_nodes)
var/I = back_nodes.Find(reference)
back_nodes[I] = null
update_icon()
/obj/machinery/atmospherics/pipe/layer_manifold/relaymove(mob/living/user, dir)
if(initialize_directions & dir)
return ..()
if((NORTH|EAST) & dir)
user.ventcrawl_layer = Clamp(user.ventcrawl_layer + 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
if((SOUTH|WEST) & dir)
user.ventcrawl_layer = Clamp(user.ventcrawl_layer - 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
to_chat(user, "You align yourself with the [user.ventcrawl_layer]\th output.")
@@ -6,7 +6,7 @@
icon_state = "manifold"
name = "pipe manifold"
desc = "A manifold composed of regular pipes"
desc = "A manifold composed of regular pipes."
dir = SOUTH
initialize_directions = EAST|NORTH|WEST
@@ -125,7 +125,7 @@
/obj/machinery/atmospherics/pipe/manifold/orange/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/purple
pipe_color=rgb(128,0,182)
color=rgb(128,0,182)
@@ -6,7 +6,7 @@
icon_state = "manifold4w"
name = "4-way pipe manifold"
desc = "A manifold composed of regular pipes"
desc = "A manifold composed of regular pipes."
initialize_directions = NORTH|SOUTH|EAST|WEST
@@ -24,6 +24,14 @@
if(oldN)
oldN.build_network()
/obj/machinery/atmospherics/pipe/destroy_network()
QDEL_NULL(parent)
/obj/machinery/atmospherics/pipe/build_network()
if(QDELETED(parent))
parent = new
parent.build_pipeline(src)
/obj/machinery/atmospherics/pipe/update_icon() //overridden by manifolds
if(NODE1&&NODE2)
icon_state = "intact[invisibility ? "-f" : "" ]"
@@ -51,14 +59,13 @@
/obj/machinery/atmospherics/pipe/return_air()
return parent.air
/obj/machinery/atmospherics/pipe/build_network()
if(!parent)
parent = new /datum/pipeline()
parent.build_pipeline(src)
/obj/machinery/atmospherics/pipe/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/device/analyzer))
atmosanalyzer_scan(parent.air, user)
if(istype(W, /obj/item/pipe_meter))
var/obj/item/pipe_meter/meter = W
user.dropItemToGround(meter)
meter.setAttachLayer(piping_layer)
else
return ..()
@@ -81,9 +88,7 @@
qdel(meter)
. = ..()
if(parent && !QDELETED(parent))
qdel(parent)
parent = null
QDEL_NULL(parent)
/obj/machinery/atmospherics/pipe/proc/update_node_icon()
for(DEVICE_TYPE_LOOP)
@@ -12,10 +12,12 @@ The regular pipe you see everywhere, including bent ones.
dir = SOUTH
initialize_directions = SOUTH|NORTH
pipe_flags = PIPING_CARDINAL_AUTONORMALIZE
device_type = BINARY
/obj/machinery/atmospherics/pipe/simple/SetInitDirections()
normalize_cardinal_directions()
if(dir in GLOB.diagonals)
initialize_directions = dir
switch(dir)
@@ -24,20 +26,6 @@ The regular pipe you see everywhere, including bent ones.
if(EAST,WEST)
initialize_directions = EAST|WEST
/obj/machinery/atmospherics/pipe/simple/atmosinit()
normalize_dir()
..()
/obj/machinery/atmospherics/pipe/simple/proc/normalize_dir()
if(dir==SOUTH)
setDir(NORTH)
else if(dir==WEST)
setDir(EAST)
/obj/machinery/atmospherics/pipe/simple/update_icon()
normalize_dir()
..()
//Colored pipes, use these for mapping
/obj/machinery/atmospherics/pipe/simple/general
@@ -45,11 +45,11 @@
/obj/machinery/portable_atmospherics/proc/connect(obj/machinery/atmospherics/components/unary/portables_connector/new_port)
//Make sure not already connected to something else
if(connected_port || !new_port || new_port.connected_device)
return 0
return FALSE
//Make sure are close enough for a valid connection
if(new_port.loc != get_turf(src))
return 0
return FALSE
//Perform the connection
connected_port = new_port
@@ -58,7 +58,9 @@
connected_port_parent.reconcile_air()
anchored = TRUE //Prevent movement
return 1
pixel_x = new_port.pixel_x
pixel_y = new_port.pixel_y
return TRUE
/obj/machinery/portable_atmospherics/Move()
. = ..()
@@ -67,11 +69,11 @@
/obj/machinery/portable_atmospherics/proc/disconnect()
if(!connected_port)
return 0
return FALSE
anchored = FALSE
connected_port.connected_device = null
connected_port = null
return 1
return TRUE
/obj/machinery/portable_atmospherics/portableConnectorReturnAir()
return air_contents
@@ -1,6 +1,6 @@
#define PUMP_OUT "out"
#define PUMP_IN "in"
#define PUMP_MAX_PRESSURE (ONE_ATMOSPHERE * 10)
#define PUMP_MAX_PRESSURE (ONE_ATMOSPHERE * 25)
#define PUMP_MIN_PRESSURE (ONE_ATMOSPHERE / 10)
#define PUMP_DEFAULT_PRESSURE (ONE_ATMOSPHERE)
@@ -84,7 +84,7 @@
/obj/structure/academy_wizard_spawner
name = "Academy Defensive System"
desc = "Made by Abjuration Inc"
desc = "Made by Abjuration, Inc."
icon = 'icons/obj/cult.dmi'
icon_state = "forge"
anchored = TRUE
@@ -18,7 +18,7 @@
/obj/structure/firepit
name = "firepit"
desc = "warm and toasty"
desc = "Warm and toasty."
icon = 'icons/obj/fireplace.dmi'
icon_state = "firepit-active"
density = FALSE
@@ -17,7 +17,7 @@
/obj/machinery/power/emitter/energycannon
name = "Energy Cannon"
desc = "A heavy duty industrial laser"
desc = "A heavy duty industrial laser."
icon = 'icons/obj/singularity.dmi'
icon_state = "emitter"
anchored = TRUE
@@ -40,7 +40,7 @@
/obj/item/paper/crumpled/ruins/snowdin/snowdingatewaynotice
name = "scribbled note"
info = {"The gateway has been inactive for months, engineers think it's due to the recent drop in tempature fucking with the
circuitry or something. Without a constant supply of resources from central command, our stock is getting awfully low. Some of the security members have taken to
circuitry or something. Without a constant supply of resources from Central Command, our stock is getting awfully low. Some of the security members have taken to
using the sparse rifle ammo left to hunting some of the wildlife to try and keep our food supply from emptying. God forbid if the heating goes out, I don't want to
die as a fucking popsicle down here."}
@@ -65,9 +65,9 @@
The colder months are finally hitting, some of the machinery seems to be having trouble starting up sometimes. Central sent some portable heaters to help keep the airlocks from
freezing shut along with a couple storage crates with supplies. Nothing on the radio so far, what the hell do they even expect to hear down here, anyway?<br><br><b>September 15th</b>
<br>Another supply shipment through the gateway, they've sent some heavier sets of clothes for the coming winter months. Central said they might encounter issues with shipments
during December to Feburary, so we should try to be frugal with the next shipment.<br><br><b>November 20th</b><br>Final shipment from central for the next few months. Going outside
during December to Feburary, so we should try to be frugal with the next shipment.<br><br><b>November 20th</b><br>Final shipment from Central for the next few months. Going outside
for more than 10-15 minutes without losing feeling in your fingers is difficult. We've finally gotten a signal on the radio, it's mostly some weird static though. One of the researchers is trying to decypher it.
<br><br><b>December 10th</b><br>Signal has gotten much stronger, it almost seems like it's coming from under us according to what the researcher managed to decypher. We're waiting from the go from central before investigating.<br><br>
<br><br><b>December 10th</b><br>Signal has gotten much stronger, it almost seems like it's coming from under us according to what the researcher managed to decypher. We're waiting from the go from Central before investigating.<br><br>
<i>The rest of the paper seems to be a mixture of scribbles and smudged ink.</i>"}
/obj/item/paper/fluff/awaymissions/snowdin/log2
@@ -85,7 +85,7 @@
info = {"You have been assigned a position on a listening outpost. Here you'll be watching over several crewmembers assigned to watching signals of the general area.
As not much is expected in terms of issues, we've only assigned one guard per outpost. Crewmembers are expected to keep to their regulated work schedules and may be
disciplined properly if found slacking. Food hoarding is heavily discouraged as all outposts will be sharing from the same shipment every 2-3 months. Hoarding of supplies
should be punished severely as to prevent future incidients. Mutiny and/or rioting should be reported to central and dealt with swiftly. You're here to secure and protect
should be punished severely as to prevent future incidients. Mutiny and/or rioting should be reported to Central and dealt with swiftly. You're here to secure and protect
Nanotrasen assets, not be a police officer. Do what you must, but make sure it's not messy."}
/obj/item/paper/fluff/awaymissions/snowdin/syndienotice
@@ -199,7 +199,7 @@
/obj/item/clothing/under/syndicate/coldres
name = "insulated tactical turtleneck"
desc = "A non-descript and slightly suspicious looking turtleneck with digital camouflage cargo pants. The interior has been padded with special insulation for both warmth and protection"
desc = "A non-descript and slightly suspicious-looking turtleneck with digital camouflage cargo pants. The interior has been padded with special insulation for both warmth and protection."
armor = list(melee = 20, bullet = 10, laser = 0,energy = 5, bomb = 0, bio = 0, rad = 0, fire = 25, acid = 25)
cold_protection = CHEST|GROIN|ARMS|LEGS
min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT
@@ -136,18 +136,41 @@ GLOBAL_VAR_INIT(sc_safecode5, "[rand(0,9)]")
/*
* Modified Nar-Sie
*/
/obj/singularity/narsie/mini
/obj/singularity/narsie/sc_Narsie
desc = "Your body becomes weak and your feel your mind slipping away as you try to comprehend what you know can't be possible."
move_self = 0 //Contianed narsie does not move!
grav_pull = 0 //Contained narsie does not pull stuff in!
var/uneatable = list(/turf/open/space, /obj/effect/overlay, /mob/living/simple_animal/hostile/construct)
//Override this to prevent no adminlog runtimes and admin warnings about a singularity without containment
/obj/singularity/narsie/mini/admin_investigate_setup()
/obj/singularity/narsie/sc_Narsie/admin_investigate_setup()
return
/obj/singularity/narsie/mini/process()
/obj/singularity/narsie/sc_Narsie/process()
eat()
if(prob(25))
mezzer()
/obj/singularity/narsie/mini/ex_act()
/obj/singularity/narsie/sc_Narsie/consume(atom/A)
if(is_type_in_list(A, uneatable))
return 0
if(isliving(A))
var/mob/living/L = A
L.gib()
else if(istype(A, /obj/))
var/obj/O = A
O.ex_act(EXPLODE_DEVASTATE)
if(O)
qdel(O)
else if(isturf(A))
var/turf/T = A
if(T.intact)
for(var/obj/O in T.contents)
if(O.level != 1)
continue
if(O.invisibility == INVISIBILITY_MAXIMUM)
src.consume(O)
T.ChangeTurf(/turf/open/space)
return
/obj/singularity/narsie/sc_Narsie/ex_act()
return
+1 -1
View File
@@ -20,7 +20,7 @@ GLOBAL_LIST_INIT(potentialRandomZlevels, generateMapList(filename = "config/away
/obj/effect/landmark/awaystart
name = "away mission spawn"
desc = "Randomly picked away mission spawn points"
desc = "Randomly picked away mission spawn points."
/obj/effect/landmark/awaystart/New()
GLOB.awaydestinations += src
+2 -1
View File
@@ -239,7 +239,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
S["real_name"] >> name
if(!name)
name = "Character[i]"
//if(i!=1) dat += " | "
/*if(i!=1)
dat += " | " */
dat += "<a style='white-space:nowrap;' href='?_src_=prefs;preference=changeslot;num=[i];' [i == default_slot ? "class='linkOn'" : ""]>[name]</a> "
dat += "</center>"
+2 -1
View File
@@ -391,7 +391,8 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
set name = "Show/Hide Radio Chatter"
set category = "Preferences"
set desc = "Toggle seeing radiochatter from nearby radios and speakers"
if(!holder) return
if(!holder)
return
prefs.chat_toggles ^= CHAT_RADIO
prefs.save_preferences()
to_chat(usr, "You will [(prefs.chat_toggles & CHAT_RADIO) ? "now" : "no longer"] see radio chatter from nearby radios or speakers")
+68 -62
View File
@@ -1,45 +1,48 @@
//Engineering Mesons
#define MODE_NONE ""
#define MODE_MESON "meson"
#define MODE_TRAY "t-ray"
#define MODE_RAD "radiation"
/obj/item/clothing/glasses/meson/engine
name = "engineering scanner goggles"
desc = "Goggles used by engineers. The Meson Scanner mode lets you see basic structural and terrain layouts through walls, regardless of lighting condition. The T-ray Scanner mode lets you see underfloor objects such as cables and pipes."
icon_state = "trayson-meson"
desc = "Goggles used by engineers. The Meson Scanner mode lets you see basic structural and terrain layouts through walls, the T-ray Scanner mode lets you see underfloor objects such as cables and pipes, and the Radiation Scanner mode let's you see objects contaminated by radiation."
icon_state = "trayson"
actions_types = list(/datum/action/item_action/toggle_mode)
origin_tech = "materials=3;magnets=3;engineering=3;plasmatech=3"
var/mesons_on = TRUE //if set to FALSE, these goggles work as t-ray scanners.
vision_flags = NONE
darkness_view = 2
invis_view = SEE_INVISIBLE_LIVING
var/list/modes = list(MODE_NONE = MODE_MESON, MODE_MESON = MODE_TRAY, MODE_TRAY = MODE_RAD, MODE_RAD = MODE_NONE)
var/mode = MODE_NONE
var/range = 1
/obj/item/clothing/glasses/meson/engine/Initialize()
. = ..()
START_PROCESSING(SSobj, src)
update_icon()
/obj/item/clothing/glasses/meson/engine/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/clothing/glasses/meson/engine/proc/toggle_mode(mob/user, voluntary)
mesons_on = !mesons_on
mode = modes[mode]
to_chat(user, "<span class='[voluntary ? "notice":"warning"]'>[voluntary ? "You turn the goggles":"The goggles turn"] [mode ? "to [mode] mode":"off"][voluntary ? ".":"!"]</span>")
if(!mesons_on)
vision_flags = 0
darkness_view = 2
invis_view = SEE_INVISIBLE_LIVING
lighting_alpha = null
if(voluntary)
to_chat(user, "<span class='notice'>You toggle the goggles' scanning mode to \[T-Ray].</span>")
else
to_chat(user, "<span class='warning'>The goggles abruptly toggle to \[T-Ray] mode!</span>")
else
vision_flags = SEE_TURFS
darkness_view = 1
lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE
if(voluntary)
to_chat(user, "<span class='notice'>You toggle the goggles' scanning mode to \[Meson].</span>")
else
to_chat(user, "<span class='warning'>The goggles abruptly toggle to \[Meson] mode!</span>")
switch(mode)
if(MODE_MESON)
vision_flags = SEE_TURFS
darkness_view = 1
lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE
if(MODE_TRAY) //undoes the last mode, meson
vision_flags = NONE
darkness_view = 2
lighting_alpha = null
if(ishuman(user))
var/mob/living/carbon/human/H = user
@@ -55,7 +58,7 @@
toggle_mode(user, TRUE)
/obj/item/clothing/glasses/meson/engine/process()
if(mesons_on)
if(mode == MODE_MESON)
var/turf/T = get_turf(src)
if(T && T.z == ZLEVEL_MINING)
toggle_mode(loc)
@@ -63,11 +66,13 @@
if(!ishuman(loc))
return
var/mob/living/carbon/human/user = loc
if(user.glasses != src)
if(user.glasses != src || !user.client)
return
scan()
if(mode == MODE_TRAY)
scan()
else if(mode == MODE_RAD)
show_rads()
/obj/item/clothing/glasses/meson/engine/proc/scan()
for(var/turf/T in range(range, loc))
@@ -79,17 +84,40 @@
flick_sonar(O)
/obj/item/clothing/glasses/meson/engine/proc/flick_sonar(obj/pipe)
if(ismob(loc))
var/mob/M = loc
var/image/I = new(loc = get_turf(pipe))
var/mutable_appearance/MA = new(pipe)
var/mob/M = loc
var/image/I = new(loc = get_turf(pipe))
var/mutable_appearance/MA = new(pipe)
MA.alpha = 128
I.appearance = MA
flick_overlay(I, list(M.client), 8)
/obj/item/clothing/glasses/meson/engine/proc/show_rads()
var/mob/living/carbon/human/user = loc
var/list/rad_places = list()
for(var/datum/component/radioactive/thing in SSradiation.processing)
var/atom/owner = thing.parent
var/turf/place = get_turf(owner)
if(rad_places[place])
rad_places[place] += thing.strength
else
rad_places[place] = thing.strength
for(var/i in rad_places)
var/turf/place = i
if(get_dist(user, place) >= range*2) //Rads are easier to see than wires under the floor
continue
var/strength = round(rad_places[i] / 1000, 0.1)
var/image/pic = new(loc = place)
var/mutable_appearance/MA = new()
MA.alpha = 128
I.appearance = MA
if(M.client)
flick_overlay(I, list(M.client), 8)
MA.maptext = "[strength]k"
MA.color = "#64C864"
MA.layer = AREA_LAYER
pic.appearance = MA
flick_overlay(pic, list(user.client), 8)
/obj/item/clothing/glasses/meson/engine/update_icon()
icon_state = mesons_on ? "trayson-meson" : "trayson-tray"
icon_state = "[initial(icon_state)]-[mode]"
if(istype(loc, /mob/living/carbon/human/))
var/mob/living/carbon/human/user = loc
if(user.glasses == src)
@@ -98,35 +126,13 @@
/obj/item/clothing/glasses/meson/engine/tray //atmos techs have lived far too long without tray goggles while those damned engineers get their dual-purpose gogles all to themselves
name = "optical t-ray scanner"
desc = "Used by engineering staff to see underfloor objects such as cables and pipes."
icon_state = "trayson-tray_off"
origin_tech = "materials=3;magnets=2;engineering=2"
mesons_on = FALSE
var/on = FALSE
vision_flags = 0
darkness_view = 2
invis_view = SEE_INVISIBLE_LIVING
range = 2
modes = list(MODE_NONE = MODE_TRAY, MODE_TRAY = MODE_NONE)
/obj/item/clothing/glasses/meson/engine/tray/process()
if(!on)
return
..()
/obj/item/clothing/glasses/meson/engine/tray/update_icon()
icon_state = "trayson-tray[on ? "" : "_off"]"
if(istype(loc, /mob/living/carbon/human/))
var/mob/living/carbon/human/user = loc
if(user.glasses == src)
user.update_inv_glasses()
/obj/item/clothing/glasses/meson/engine/tray/toggle_mode(mob/user, voluntary)
on = !on
to_chat(user, "<span class='[voluntary ? "notice":"warning"]'>[voluntary ? "You turn the goggles":"The goggles turn"] [on ? "on":"off"][voluntary ? ".":"!"]</span>")
update_icon()
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
#undef MODE_NONE
#undef MODE_MESON
#undef MODE_TRAY
#undef MODE_RAD
+1 -1
View File
@@ -23,7 +23,7 @@
/obj/item/clothing/head/canada
name = "striped red tophat"
desc = "it smells like fresh donut holes / <i>il sent comme des trous de beignets frais</i>"
desc = "It smells like fresh donut holes. / <i>Il sent comme des trous de beignets frais.</i>"
icon_state = "canada"
item_state = "canada"
+1 -1
View File
@@ -49,7 +49,7 @@
/obj/item/clothing/shoes/sandal/magic
name = "magical sandals"
desc = "A pair of sandals imbued with magic"
desc = "A pair of sandals imbued with magic."
resistance_flags = FIRE_PROOF | ACID_PROOF
/obj/item/clothing/shoes/galoshes
@@ -20,7 +20,7 @@
/obj/item/clothing/suit/space/chronos
name = "Chronosuit"
desc = "An advanced spacesuit equipped with time-bluespace teleportation and anti-compression technology"
desc = "An advanced spacesuit equipped with time-bluespace teleportation and anti-compression technology."
icon_state = "chronosuit"
item_state = "chronosuit"
actions_types = list(/datum/action/item_action/toggle)
+2 -2
View File
@@ -475,7 +475,7 @@
//Head of Security hardsuit
/obj/item/clothing/head/helmet/space/hardsuit/security/hos
name = "head of security's hardsuit helmet"
desc = "a special bulky helmet designed for work in a hazardous, low pressure environment. Has an additional layer of armor."
desc = "A special bulky helmet designed for work in a hazardous, low pressure environment. Has an additional layer of armor."
icon_state = "hardsuit0-hos"
item_color = "hos"
armor = list(melee = 45, bullet = 25, laser = 30,energy = 10, bomb = 25, bio = 100, rad = 50, fire = 95, acid = 95)
@@ -720,7 +720,7 @@
///SWAT version
/obj/item/clothing/suit/space/hardsuit/shielded/swat
name = "death commando spacesuit"
desc = "an advanced hardsuit favored by commandos for use in special operations."
desc = "An advanced hardsuit favored by commandos for use in special operations."
icon_state = "deathsquad"
item_state = "swat_suit"
item_color = "syndi"
@@ -157,7 +157,7 @@ Contains:
//Emergency Response Team suits
/obj/item/clothing/head/helmet/space/hardsuit/ert
name = "emergency response unit helmet"
desc = "Standard issue command helmet for the ERT"
desc = "Standard issue command helmet for the ERT."
icon_state = "hardsuit0-ert_commander"
item_state = "hardsuit0-ert_commander"
item_color = "ert_commander"
+2 -2
View File
@@ -13,7 +13,7 @@
name = "cloak hood"
icon = 'icons/obj/clothing/hats.dmi'
icon_state = "golhood"
desc = "A hood for a cloak"
desc = "A hood for a cloak."
body_parts_covered = HEAD
flags_1 = NODROP_1
flags_inv = HIDEHAIR|HIDEEARS
@@ -75,7 +75,7 @@
/obj/item/clothing/suit/hooded/cloak/drake
name = "drake armour"
icon_state = "dragon"
desc = "A suit of armour fashioned from the remains of an ash drake. "
desc = "A suit of armour fashioned from the remains of an ash drake."
allowed = list(/obj/item/device/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/device/mining_scanner, /obj/item/device/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator, /obj/item/pickaxe, /obj/item/twohanded/spear)
armor = list(melee = 70, bullet = 30, laser = 50, energy = 40, bomb = 70, bio = 60, rad = 50, fire = 100, acid = 100)
hoodtype = /obj/item/clothing/head/hooded/cloakhood/drake
+21 -3
View File
@@ -414,6 +414,24 @@
icon_state = "letterman_n"
item_state = "letterman_n"
/obj/item/clothing/suit/dracula
name = "dracula coat"
desc = "Looks like this belongs in a very old movie set."
icon_state = "draculacoat"
item_state = "draculacoat"
/obj/item/clothing/suit/drfreeze_coat
name = "doctor freeze's labcoat"
desc = "A labcoat imbued with the power of features and freezes."
icon_state = "drfreeze_coat"
item_state = "drfreeze_coat"
/obj/item/clothing/suit/gothcoat
name = "gothic coat"
desc = "Perfect for those who want stalk in a corner of a bar."
icon_state = "gothcoat"
item_state = "gothcoat"
/obj/item/clothing/suit/xenos
name = "xenos suit"
desc = "A suit made out of chitinous alien hide."
@@ -459,7 +477,7 @@
icon_state = "coatcaptain"
item_state = "coatcaptain"
armor = list(melee = 25, bullet = 30, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0, fire = 0, acid = 50)
allowed = list(/obj/item/gun/energy, /obj/item/reagent_containers/spray/pepper, /obj/item/gun/ballistic, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/melee/baton, /obj/item/restraints/handcuffs, /obj/item/device/flashlight/seclite, /obj/item/melee/classic_baton/telescopic)
allowed = list(/obj/item/gun/energy, /obj/item/reagent_containers/spray/pepper, /obj/item/gun/ballistic, /obj/item/ammo_box,/obj/item/ammo_casing, /obj/item/melee/baton, /obj/item/restraints/handcuffs, /obj/item/melee/classic_baton/telescopic)
hoodtype = /obj/item/clothing/head/hooded/winterhood/captain
/obj/item/clothing/head/hooded/winterhood/captain
@@ -470,7 +488,7 @@
icon_state = "coatsecurity"
item_state = "coatsecurity"
armor = list(melee = 25, bullet = 15, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0, fire = 0, acid = 45)
allowed = list(/obj/item/gun/energy, /obj/item/reagent_containers/spray/pepper, /obj/item/gun/ballistic, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/melee/baton, /obj/item/restraints/handcuffs, /obj/item/device/flashlight/seclite, /obj/item/melee/classic_baton/telescopic)
allowed = list(/obj/item/gun/energy, /obj/item/reagent_containers/spray/pepper, /obj/item/gun/ballistic, /obj/item/ammo_box,/obj/item/ammo_casing, /obj/item/melee/baton, /obj/item/restraints/handcuffs, /obj/item/device/flashlight, /obj/item/melee/classic_baton/telescopic)
hoodtype = /obj/item/clothing/head/hooded/winterhood/security
/obj/item/clothing/head/hooded/winterhood/security
@@ -550,7 +568,7 @@
/obj/item/clothing/suit/spookyghost
name = "spooky ghost"
desc = "this is obviously just a bedsheet, but maybe try it on?"
desc = "This is obviously just a bedsheet, but maybe try it on?"
icon_state = "bedsheet"
user_vars_to_edit = list("name" = "Spooky Ghost", "real_name" = "Spooky Ghost" , "incorporeal_move" = INCORPOREAL_MOVE_BASIC, "appearance_flags" = KEEP_TOGETHER|TILE_BOUND, "alpha" = 150)
alternate_worn_layer = ABOVE_BODY_FRONT_LAYER //so the bedsheet goes over everything but fire
+15 -5
View File
@@ -59,6 +59,8 @@
flags_1 = THICKMATERIAL_1
armor = list(melee = 20, bullet = 0, laser = 20,energy = 10, bomb = 100, bio = 0, rad = 0, fire = 80, acid = 50)
flags_inv = HIDEFACE|HIDEMASK|HIDEEARS|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR
dynamic_hair_suffix = ""
dynamic_fhair_suffix = ""
cold_protection = HEAD
min_cold_protection_temperature = HELMET_MIN_TEMP_PROTECT
heat_protection = HEAD
@@ -92,15 +94,23 @@
/obj/item/clothing/head/bomb_hood/security
icon_state = "bombsuitsec"
item_state = "bombsuitsec"
icon_state = "bombsuit_sec"
item_state = "bombsuit_sec"
/obj/item/clothing/suit/bomb_suit/security
icon_state = "bombsuitsec"
item_state = "bombsuitsec"
icon_state = "bombsuit_sec"
item_state = "bombsuit_sec"
allowed = list(/obj/item/gun/energy, /obj/item/melee/baton, /obj/item/restraints/handcuffs)
/obj/item/clothing/head/bomb_hood/white
icon_state = "bombsuit_white"
item_state = "bombsuit_white"
/obj/item/clothing/suit/bomb_suit/white
icon_state = "bombsuit_white"
item_state = "bombsuit_white"
/*
* Radiation protection
*/
+4 -2
View File
@@ -139,8 +139,10 @@
log_game("<b>[key_name(M)]</b> was given the following commendation by <b>[key_name(user)]</b>: [input]")
message_admins("<b>[key_name(M)]</b> was given the following commendation by <b>[key_name(user)]</b>: [input]")
else to_chat(user, "<span class='warning'>Medals can only be pinned on jumpsuits!</span>")
else ..()
else
to_chat(user, "<span class='warning'>Medals can only be pinned on jumpsuits!</span>")
else
..()
/obj/item/clothing/accessory/medal/conduct
name = "distinguished conduct medal"
+29 -2
View File
@@ -24,7 +24,7 @@
/obj/item/clothing/under/scratch
name = "white suit"
desc = "A white suit, suitable for an excellent host"
desc = "A white suit, suitable for an excellent host."
icon_state = "scratch"
item_state = "scratch"
item_color = "scratch"
@@ -693,6 +693,33 @@
can_adjust = FALSE
resistance_flags = NONE
/obj/item/clothing/under/draculass
name = "draculass coat"
desc = "A dress inspired by the ancient \"Victorian\" era."
icon_state = "draculass"
item_state = "draculass"
item_color = "draculass"
body_parts_covered = CHEST|GROIN|ARMS
fitted = FEMALE_UNIFORM_TOP
can_adjust = FALSE
/obj/item/clothing/under/drfreeze
name = "doctor freeze's jumpsuit"
desc = "A modified scientist jumpsuit to look extra cool."
icon_state = "drfreeze"
item_state = "drfreeze"
item_color = "drfreeze"
can_adjust = FALSE
/obj/item/clothing/under/lobster
name = "foam lobster suit"
desc = "Who beheaded the college mascot?"
icon_state = "lobster"
item_state = "lobster"
item_color = "lobster"
fitted = NO_FEMALE_UNIFORM
can_adjust = FALSE
/obj/item/clothing/under/skeleton
name = "skeleton jumpsuit"
desc = "A black jumpsuit with a white bone pattern printed on it. Spooky!"
@@ -702,4 +729,4 @@
body_parts_covered = CHEST|GROIN|ARMS|LEGS
fitted = NO_FEMALE_UNIFORM
can_adjust = FALSE
resistance_flags = NONE
resistance_flags = NONE
+1 -1
View File
@@ -18,7 +18,7 @@
/obj/item/clothing/under/syndicate/sniper
name = "Tactical turtleneck suit"
desc = "A double seamed tactical turtleneck disguised as a civilian grade silk suit. Intended for the most formal operator. The collar is really sharp"
desc = "A double seamed tactical turtleneck disguised as a civilian grade silk suit. Intended for the most formal operator. The collar is really sharp."
icon_state = "really_black_suit"
item_state = "bl_suit"
item_color = "black_suit"
+4 -4
View File
@@ -8,14 +8,14 @@
//TOS
/obj/item/clothing/under/trek/command
name = "command uniform"
desc = "The uniform worn by command officers"
desc = "The uniform worn by command officers."
icon_state = "trek_command"
item_color = "trek_command"
item_state = "y_suit"
/obj/item/clothing/under/trek/engsec
name = "engsec uniform"
desc = "The uniform worn by engineering/security officers"
desc = "The uniform worn by engineering/security officers."
icon_state = "trek_engsec"
item_color = "trek_engsec"
item_state = "r_suit"
@@ -24,7 +24,7 @@
/obj/item/clothing/under/trek/medsci
name = "medsci uniform"
desc = "The uniform worn by medical/science officers"
desc = "The uniform worn by medical/science officers."
icon_state = "trek_medsci"
item_color = "trek_medsci"
item_state = "b_suit"
@@ -66,7 +66,7 @@
//Q
/obj/item/clothing/under/trek/Q
name = "french marshall's uniform"
desc = "something about it feels off..."
desc = "Something about it feels off..."
icon_state = "trek_Q"
item_color = "trek_Q"
item_state = "r_suit"
+3 -2
View File
@@ -3,7 +3,7 @@
/atom/var/list/suit_fibers
/atom/proc/add_fibers(mob/living/carbon/human/M)
if(M.gloves && istype(M.gloves, /obj/item/clothing/))
if(M.gloves && istype(M.gloves, /obj/item/clothing/))
var/obj/item/clothing/gloves/G = M.gloves
if(G.transfer_blood > 1) //bloodied gloves transfer blood to touched objects
if(add_blood(G.blood_DNA)) //only reduces the bloodiness of our gloves if the item wasn't already bloody
@@ -11,7 +11,8 @@
else if(M.bloody_hands > 1)
if(add_blood(M.blood_DNA))
M.bloody_hands--
if(!suit_fibers) suit_fibers = list()
if(!suit_fibers)
suit_fibers = list()
var/fibertext
var/item_multiplier = isitem(src)?1.2:1
if(M.wear_suit)
+14 -1
View File
@@ -6,6 +6,19 @@ GLOBAL_VAR_INIT(total_runtimes_skipped, 0)
if(!istype(E)) //Something threw an unusual exception
log_world("\[[time_stamp()]] Uncaught exception: [E]")
return ..()
//this is snowflake because of a byond bug (ID:2306577), do not attempt to call non-builtin procs in this if
if(copytext(E.name,1,32) == "Maximum recursion level reached")
var/list/split = splittext(E.desc, "\n")
for (var/i in 1 to split.len)
if (split[i] != "")
split[i] = "\[[time2text(world.timeofday,"hh:mm:ss")]\][split[i]]"
E.desc = jointext(split, "\n")
//log to world while intentionally triggering the byond bug.
log_world("\[[time2text(world.timeofday,"hh:mm:ss")]\]runtime error: [E.name]\n[E.desc]")
//if we got to here without silently ending, the byond bug has been fixed.
log_world("The bug with recursion runtimes has been fixed. Please remove the snowflake check from world/Error in [__FILE__]:[__LINE__]")
return //this will never happen.
var/static/list/error_last_seen = list()
var/static/list/error_cooldown = list() /* Error_cooldown items will either be positive(cooldown time) or negative(silenced error)
@@ -118,4 +131,4 @@ GLOBAL_VAR_INIT(total_runtimes_skipped, 0)
world.log = null
#endif
#endif
+3 -3
View File
@@ -13,16 +13,16 @@
var/list/obj/machinery/vending/infectedMachines = list()
var/obj/machinery/vending/originMachine
var/list/rampant_speeches = list("Try our aggressive new marketing strategies!", \
"You should buy products to feed your lifestyle obession!", \
"You should buy products to feed your lifestyle obsession!", \
"Consume!", \
"Your money can buy happiness!", \
"Engage direct marketing!", \
"Advertising is legalized lying! But don't let that put you off our great deals!", \
"You don't want to buy anything? Yeah, well I didn't want to buy your mom either.")
"You don't want to buy anything? Yeah, well, I didn't want to buy your mom either.")
/datum/round_event/brand_intelligence/announce()
priority_announce("Rampant brand intelligence has been detected aboard [station_name()], please stand-by. The origin is believed to be \a [originMachine.name].", "Machine Learning Alert")
priority_announce("Rampant brand intelligence has been detected aboard [station_name()]. Please stand by. The origin is believed to be \a [originMachine.name].", "Machine Learning Alert")
/datum/round_event/brand_intelligence/start()
+2 -2
View File
@@ -29,9 +29,9 @@
if(HIJACK_SYNDIE)
priority_announce("Cargo: The syndicate are trying to infiltrate your station. If you let them hijack your cargo shuttle, you'll save us a headache.","CentCom Counter Intelligence")
if(RUSKY_PARTY)
priority_announce("Cargo: A group of angry russians want to have a party, can you send them your cargo shuttle then make them disappear?","CentCom Russian Outreach Program")
priority_announce("Cargo: A group of angry Russians want to have a party. Can you send them your cargo shuttle then make them disappear?","CentCom Russian Outreach Program")
if(SPIDER_GIFT)
priority_announce("Cargo: The Spider Clan has sent us a mysterious gift, can we ship it to you to see what's inside?","CentCom Diplomatic Corps")
priority_announce("Cargo: The Spider Clan has sent us a mysterious gift. Can we ship it to you to see what's inside?","CentCom Diplomatic Corps")
if(DEPARTMENT_RESUPPLY)
priority_announce("Cargo: Seems we've ordered doubles of our department resupply packages this month. Can we send them to you?","CentCom Supply Department")
thanks_msg = "The cargo shuttle should return in 5 minutes."
@@ -45,7 +45,7 @@
SSticker.mode.traitors += M
M.special_role = "separatist"
H.log_message("<font color='red'>Was made into a separatist, long live [nation]!</font>", INDIVIDUAL_ATTACK_LOG)
to_chat(H, "<B>You are a separatist! [nation] forever! Protect the soverignty of your newfound land with your comrades in arms!</B>")
to_chat(H, "<B>You are a separatist! [nation] forever! Protect the sovereignty of your newfound land with your comrades in arms!</B>")
if(citizens.len)
var/message
for(var/job in jobs_to_revolt)
+2 -2
View File
@@ -119,7 +119,7 @@
L.anchored = TRUE
if(ishostile(L))
var/mob/living/simple_animal/hostile/H = L
H.AIStatus = AI_OFF
H.toggle_ai(AI_OFF)
H.LoseTarget()
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_mob(mob/living/L)
@@ -128,4 +128,4 @@
frozen_mobs -= L
if(ishostile(L))
var/mob/living/simple_animal/hostile/H = L
H.AIStatus = initial(H.AIStatus)
H.toggle_ai(initial(H.AIStatus))
+15 -12
View File
@@ -164,7 +164,8 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
feedback_details += "Vent Coords: [center.x],[center.y],[center.z]"
flood_images += image(image_icon,center,image_state,MOB_LAYER)
flood_turfs += center
if(target.client) target.client.images |= flood_images
if(target.client)
target.client.images |= flood_images
next_expand = world.time + FAKE_FLOOD_EXPAND_TIME
START_PROCESSING(SSobj, src)
@@ -960,13 +961,18 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
var/l = ui_hand_position(target.get_held_index_of_item(l_hand))
var/r = ui_hand_position(target.get_held_index_of_item(r_hand))
var/list/slots_free = list(l,r)
if(l_hand) slots_free -= l
if(r_hand) slots_free -= r
if(l_hand)
slots_free -= l
if(r_hand)
slots_free -= r
if(ishuman(target))
var/mob/living/carbon/human/H = target
if(!H.belt) slots_free += ui_belt
if(!H.l_store) slots_free += ui_storage1
if(!H.r_store) slots_free += ui_storage2
if(!H.belt)
slots_free += ui_belt
if(!H.l_store)
slots_free += ui_storage1
if(!H.r_store)
slots_free += ui_storage2
if(slots_free.len)
target.halitem.screen_loc = pick(slots_free)
target.halitem.layer = ABOVE_HUD_LAYER
@@ -999,7 +1005,8 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
target.halitem.icon_state = "flashbang1"
target.halitem.name = "Flashbang"
feedback_details += "Type: [target.halitem.name]"
if(target.client) target.client.screen += target.halitem
if(target.client)
target.client.screen += target.halitem
QDEL_IN(target.halitem, rand(150, 350))
qdel(src)
@@ -1141,11 +1148,7 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
var/obj/item/projectile/hallucination/H = new proj_type(start)
target.playsound_local(start, H.hal_fire_sound, 60, 1)
H.hal_target = target
H.current = start
H.starting = start
H.yo = target.y - start.y
H.xo = target.x - start.x
H.original = target
H.preparePixelProjectile(target, start)
H.fire()
qdel(src)
+4 -2
View File
@@ -41,8 +41,10 @@
step(M, pick(d,turn(d,90),turn(d,-90)))
/proc/Ellipsis(original_msg, chance = 50, keep_words)
if(chance <= 0) return "..."
if(chance >= 100) return original_msg
if(chance <= 0)
return "..."
if(chance >= 100)
return original_msg
var/list
words = splittext(original_msg," ")
@@ -15,8 +15,10 @@
resistance_flags = 0
/obj/item/reagent_containers/food/drinks/on_reagent_change()
if (gulp_size < 5) gulp_size = 5
else gulp_size = max(round(reagents.total_volume / 5), 5)
if (gulp_size < 5)
gulp_size = 5
else
gulp_size = max(round(reagents.total_volume / 5), 5)
/obj/item/reagent_containers/food/drinks/attack(mob/M, mob/user, def_zone)
@@ -51,7 +53,8 @@
return 1
/obj/item/reagent_containers/food/drinks/afterattack(obj/target, mob/user , proximity)
if(!proximity) return
if(!proximity)
return
if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
if (!is_open_container())
@@ -54,7 +54,8 @@
return 1
/obj/item/reagent_containers/food/condiment/afterattack(obj/target, mob/user , proximity)
if(!proximity) return
if(!proximity)
return
if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
if(!target.reagents.total_volume)
@@ -225,7 +226,7 @@
/obj/item/reagent_containers/food/condiment/pack
name = "condiment pack"
desc = "A small plastic pack with condiments to put on your food"
desc = "A small plastic pack with condiments to put on your food."
icon_state = "condi_empty"
volume = 10
amount_per_transfer_from_this = 10
@@ -236,7 +237,8 @@
return
/obj/item/reagent_containers/food/condiment/pack/afterattack(obj/target, mob/user , proximity)
if(!proximity) return
if(!proximity)
return
//You can tear the bag open above food to put the condiments on it, obviously.
if(istype(target, /obj/item/reagent_containers/food/snacks))
@@ -57,7 +57,8 @@
update_overlays(S)
to_chat(user, "<span class='notice'>You add the [I.name] to the [name].</span>")
update_name(S)
else . = ..()
else
. = ..()
/obj/item/reagent_containers/food/snacks/customizable/proc/update_name(obj/item/reagent_containers/food/snacks/S)
@@ -308,7 +309,8 @@
else
var/obj/item/reagent_containers/food/snacks/customizable/A = new/obj/item/reagent_containers/food/snacks/customizable/salad(get_turf(src))
A.initialize_custom_food(src, S, user)
else . = ..()
else
. = ..()
return
/obj/item/reagent_containers/glass/bowl/on_reagent_change()
@@ -43,7 +43,7 @@
/obj/item/reagent_containers/food/snacks/pizzabread
name = "pizza bread"
desc = "Add ingredients to make a pizza"
desc = "Add ingredients to make a pizza."
icon = 'icons/obj/food/food_ingredients.dmi'
icon_state = "pizzabread"
custom_food_type = /obj/item/reagent_containers/food/snacks/customizable/pizza
@@ -124,7 +124,7 @@
/obj/item/reagent_containers/food/snacks/pastrybase
name = "pastry base"
desc = "A base for any self-respecting pastry"
desc = "A base for any self-respecting pastry."
icon = 'icons/obj/food/food_ingredients.dmi'
icon_state = "pastrybase"
list_reagents = list("nutriment" = 1)
@@ -4,7 +4,7 @@
/obj/item/reagent_containers/food/snacks/meat/slab
name = "meat"
desc = "A slab of meat"
desc = "A slab of meat."
icon_state = "meat"
dried_type = /obj/item/reagent_containers/food/snacks/sosjerky/healthy
bitesize = 3
@@ -82,7 +82,7 @@
/obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/lizard
icon_state = "lizardmeat"
desc = "Delicious dino damage"
desc = "Delicious dino damage."
filling_color = "#6B8E23"
tastes = list("meat" = 4, "scales" = 1)
foodtype = MEAT | RAW
@@ -96,7 +96,7 @@
/obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/shadow
icon_state = "shadowmeat"
desc = "Ow, the edge"
desc = "Ow, the edge."
filling_color = "#202020"
tastes = list("darkness" = 1, "meat" = 1)
foodtype = MEAT | RAW
@@ -180,7 +180,7 @@
/obj/item/reagent_containers/food/snacks/meat/slab/xeno
name = "xeno meat"
desc = "A slab of meat"
desc = "A slab of meat."
icon_state = "xenomeat"
list_reagents = list("nutriment" = 3, "vitamin" = 1)
bitesize = 4
@@ -19,7 +19,7 @@
/obj/item/reagent_containers/food/snacks/store/bread/plain
name = "bread"
desc = "Some plain old Earthen bread."
desc = "Some plain old earthen bread."
icon_state = "bread"
bonus_reagents = list("nutriment" = 7)
list_reagents = list("nutriment" = 10)
@@ -151,7 +151,7 @@
/obj/item/reagent_containers/food/snacks/mint
name = "mint"
desc = "it is only wafer thin."
desc = "It is only wafer thin."
icon_state = "mint"
bitesize = 1
trash = /obj/item/trash/plate
@@ -229,7 +229,7 @@
/obj/item/reagent_containers/food/snacks/chocoorange
name = "chocolate orange"
desc = "A festive chocolate orange"
desc = "A festive chocolate orange."
icon_state = "chocoorange"
bonus_reagents = list("nutriment" = 1, "sugar" = 1)
list_reagents = list("nutriment" = 3, "sugar" = 1)
@@ -303,7 +303,7 @@
/obj/item/reagent_containers/food/snacks/oatmealcookie
name = "oatmeal cookie"
desc = "The best of both cookie and oat"
desc = "The best of both cookie and oat."
icon_state = "oatmealcookie"
bonus_reagents = list("nutriment" = 1, "vitamin" = 1)
list_reagents = list("nutriment" = 5, "vitamin" = 1)
@@ -333,7 +333,7 @@
/obj/item/reagent_containers/food/snacks/bluecherrycupcake
name = "blue cherry cupcake"
desc = "Blue cherries inside a delicious cupcake"
desc = "Blue cherries inside a delicious cupcake."
icon_state = "bluecherrycupcake"
bonus_reagents = list("nutriment" = 1, "vitamin" = 3)
list_reagents = list("nutriment" = 5, "vitamin" = 1)
@@ -50,7 +50,9 @@
H.adjust_blurriness(1)
H.visible_message("<span class='warning'>[H] is creamed by [src]!</span>", "<span class='userdanger'>You've been creamed by [src]!</span>")
playsound(H, "desceration", 50, TRUE)
H.add_overlay(creamoverlay)
if (!H.creamed) // one layer at a time
H.add_overlay(creamoverlay)
H.creamed = TRUE
qdel(src)
@@ -237,4 +239,4 @@
icon_state = "frostypie"
bonus_reagents = list("nutriment" = 4, "vitamin" = 6)
tastes = list("mint" = 1, "pie" = 1)
foodtype = GRAIN | FRUIT | SUGAR
foodtype = GRAIN | FRUIT | SUGAR
@@ -32,7 +32,7 @@
/obj/item/reagent_containers/food/snacks/chips
name = "chips"
desc = "Commander Riker's What-The-Crisps"
desc = "Commander Riker's What-The-Crisps."
icon_state = "chips"
trash = /obj/item/trash/chips
bitesize = 1
@@ -55,7 +55,7 @@
/obj/item/reagent_containers/food/snacks/no_raisin/healthy
name = "homemade raisins"
desc = "homemade raisins, the best in all of spess."
desc = "Homemade raisins, the best in all of spess."
list_reagents = list("nutriment" = 3, "vitamin" = 2)
junkiness = 0
foodtype = FRUIT
@@ -1,7 +1,7 @@
/obj/machinery/juicer
name = "juicer"
desc = "a centrifugal juicer with two speeds: Juice and Separate."
desc = "A centrifugal juicer with two speeds: Juice and Separate."
icon = 'icons/obj/kitchen.dmi'
icon_state = "juicer1"
layer = BELOW_OBJ_LAYER
+6 -3
View File
@@ -59,12 +59,14 @@
if (istype(O, /obj/item/hand))
var/obj/item/hand/H = O
for (var/datum/playingcard/P in H.cards) src.cards.Add(P)
for (var/datum/playingcard/P in H.cards)
src.cards.Add(P)
qdel (O)
user.show_message("You place your cards on the bottom of the deck.")
else return ..()
else
return ..()
/obj/item/deck/attack_self(mob/user)
var/list/newcards = list()
@@ -155,7 +157,8 @@
else if(istype(O, /obj/item/hand))
var/obj/item/hand/H = O
for(var/datum/playingcard/P in src.cards) H.cards.Add(P)
for(var/datum/playingcard/P in src.cards)
H.cards.Add(P)
H.update_icon()
+4 -2
View File
@@ -21,7 +21,8 @@
)
/datum/debugFileOutput/proc/error(fileName, message, client/C)
if (!fileName || !message) return 0
if (!fileName || !message)
return 0
if (!(fileName in src.validFiles))
throw EXCEPTION("Debug log file '[fileName].[src.ext]' is not a valid path.")
@@ -36,7 +37,8 @@
return 1
/datum/debugFileOutput/proc/clear(fileName)
if (!fileName) return 0
if (!fileName)
return 0
if (!fexists("[src.directory]/[fileName].[src.ext]"))
throw EXCEPTION("Debug log file '[fileName].[src.ext]' does not exist.")
+1 -1
View File
@@ -89,7 +89,7 @@
name = "Easter Bunny Head"
icon_state = "bunnyhead"
item_state = "bunnyhead"
desc = "Considerably more cute than 'Frank'"
desc = "Considerably more cute than 'Frank'."
slowdown = -1
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR
+2 -1
View File
@@ -47,7 +47,8 @@ GLOBAL_LIST_INIT(duplicate_forbidden_vars,list("tag","area","type","loc","locs",
// Movement based on lower left corner. Tiles that do not fit
// into the new area will not be moved.
if(!A || !src) return 0
if(!A || !src)
return 0
var/list/turfs_src = get_area_turfs(src.type)
var/list/turfs_trg = get_area_turfs(A.type)
+3 -3
View File
@@ -12,7 +12,7 @@
/obj/item/holo/esword
name = "holographic energy sword"
desc = "May the force be with you. Sorta"
desc = "May the force be with you. Sorta."
icon_state = "sword0"
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
@@ -154,7 +154,7 @@
power_channel = ENVIRON
/obj/machinery/readybutton/attack_ai(mob/user as mob)
to_chat(user, "The station AI is not to interact with these devices")
to_chat(user, "The station AI is not to interact with these devices.")
return
/obj/machinery/readybutton/attack_paw(mob/user as mob)
@@ -220,4 +220,4 @@
/obj/item/paper/fluff/holodeck/disclaimer
name = "Holodeck Disclaimer"
info = "Brusies sustained in the holodeck can be healed simply by sleeping."
info = "Bruises sustained in the holodeck can be healed simply by sleeping."
+44 -21
View File
@@ -71,7 +71,8 @@ You have to use modules/client/asset_cache to ensure they get sent BEFORE the in
/mob/var/datum/html_interface/hi
/mob/verb/test()
if (!hi) hi = new/datum/html_interface(src, "[src.key]")
if (!hi)
hi = new/datum/html_interface(src, "[src.key]")
hi.updateLayout("<div id=\"content\"></div>")
hi.updateContent("content", "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>")
@@ -156,14 +157,16 @@ GLOBAL_LIST_EMPTY(html_interfaces)
"on-close" = "byond://?src=\ref[src]&html_interface_action=onclose"
)
if (hclient.client.hi_last_pos) params["pos"] = "[hclient.client.hi_last_pos]"
if (hclient.client.hi_last_pos)
params["pos"] = "[hclient.client.hi_last_pos]"
winset(hclient.client, "browser_\ref[src]", list2params(params))
winset(hclient.client, "browser_\ref[src].browser", list2params(list("parent" = "browser_\ref[src]", "type" = "browser", "pos" = "0,0", "size" = "[width]x[height]", "anchor1" = "0,0", "anchor2" = "100,100", "use-title" = "true", "auto-format" = "false")))
/* * Public API */
/datum/html_interface/proc/getTitle() return src.title
/datum/html_interface/proc/getTitle()
return src.title
/datum/html_interface/proc/setTitle(title, ignore_cache = FALSE)
src.title = title
@@ -173,19 +176,24 @@ GLOBAL_LIST_EMPTY(html_interfaces)
for (var/client in src.clients)
hclient = src._getClient(src.clients[client])
if (hclient && hclient.active) src._renderTitle(src.clients[client], ignore_cache)
if (hclient && hclient.active)
src._renderTitle(src.clients[client], ignore_cache)
/datum/html_interface/proc/executeJavaScript(jscript, datum/html_interface_client/hclient = null)
if (hclient)
hclient = getClient(hclient)
if (istype(hclient))
if (hclient.is_loaded) hclient.client << output(list2params(list(jscript)), "browser_\ref[src].browser:eval")
if (hclient.is_loaded)
hclient.client << output(list2params(list(jscript)), "browser_\ref[src].browser:eval")
else
for (var/client in src.clients) if(src.clients[client]) src.executeJavaScript(jscript, src.clients[client])
for (var/client in src.clients)
if(src.clients[client])
src.executeJavaScript(jscript, src.clients[client])
/datum/html_interface/proc/callJavaScript(func, list/arguments, datum/html_interface_client/hclient = null)
if (!arguments) arguments = new/list()
if (!arguments)
arguments = new/list()
if (hclient)
hclient = getClient(hclient)
@@ -194,7 +202,9 @@ GLOBAL_LIST_EMPTY(html_interfaces)
if (hclient.is_loaded)
hclient.client << output(list2params(arguments), "browser_\ref[src].browser:[func]")
else
for (var/client in src.clients) if (src.clients[client]) src.callJavaScript(func, arguments, src.clients[client])
for (var/client in src.clients)
if (src.clients[client])
src.callJavaScript(func, arguments, src.clients[client])
/datum/html_interface/proc/updateLayout(layout)
src.layout = layout
@@ -204,7 +214,8 @@ GLOBAL_LIST_EMPTY(html_interfaces)
for (var/client in src.clients)
hclient = src._getClient(src.clients[client])
if (hclient && hclient.active) src._renderLayout(hclient)
if (hclient && hclient.active)
src._renderLayout(hclient)
/datum/html_interface/proc/updateContent(id, content, ignore_cache = FALSE)
src.content_elements[id] = content
@@ -234,7 +245,8 @@ GLOBAL_LIST_EMPTY(html_interfaces)
winshow(hclient.client, "browser_\ref[src]", TRUE)
while (hclient.client && hclient.active && !hclient.is_loaded) sleep(2)
while (hclient.client && hclient.active && !hclient.is_loaded)
sleep(2)
/datum/html_interface/proc/hide(datum/html_interface_client/hclient)
hclient = getClient(hclient)
@@ -243,30 +255,38 @@ GLOBAL_LIST_EMPTY(html_interfaces)
if (src.clients)
src.clients.Remove(hclient.client)
if (!src.clients.len) src.clients = null
if (!src.clients.len)
src.clients = null
hclient.client.hi_last_pos = winget(hclient.client, "browser_\ref[src]" ,"pos")
winshow(hclient.client, "browser_\ref[src]", FALSE)
winset(hclient.client, "browser_\ref[src]", "parent=none")
if (hascall(src.ref, "hiOnHide")) call(src.ref, "hiOnHide")(hclient)
if (hascall(src.ref, "hiOnHide"))
call(src.ref, "hiOnHide")(hclient)
// Convert a /mob to /client, and /client to /datum/html_interface_client
/datum/html_interface/proc/getClient(client, create_if_not_exist = FALSE)
if (istype(client, /datum/html_interface_client)) return src._getClient(client)
if (istype(client, /datum/html_interface_client))
return src._getClient(client)
else if (ismob(client))
var/mob/mob = client
client = mob.client
if (istype(client, /client))
if (create_if_not_exist && (!src.clients || !(client in src.clients)))
if (!src.clients) src.clients = new/list()
if (!(client in src.clients)) src.clients[client] = new/datum/html_interface_client(client)
if (!src.clients)
src.clients = new/list()
if (!(client in src.clients))
src.clients[client] = new/datum/html_interface_client(client)
if (src.clients && (client in src.clients)) return src._getClient(src.clients[client])
else return null
else return null
if (src.clients && (client in src.clients))
return src._getClient(src.clients[client])
else
return null
else
return null
/datum/html_interface/proc/enableFor(datum/html_interface_client/hclient)
hclient.active = TRUE
@@ -284,7 +304,8 @@ GLOBAL_LIST_EMPTY(html_interfaces)
hclient = _getClient(clients[key])
if (hclient)
if (hclient.active) return TRUE
if (hclient.active)
return TRUE
else
clients.Remove(key)
@@ -335,7 +356,8 @@ GLOBAL_LIST_EMPTY(html_interfaces)
hclient.client << output(list2params(list(html)), "browser_\ref[src].browser:updateLayout")
for (var/id in src.content_elements) src._renderContent(id, hclient, ignore_loaded = ignore_loaded)
for (var/id in src.content_elements)
src._renderContent(id, hclient, ignore_loaded = ignore_loaded)
/datum/html_interface/proc/_renderContent(id, datum/html_interface_client/hclient, ignore_cache = FALSE, ignore_loaded = FALSE)
if (hclient && (ignore_loaded || hclient.is_loaded))
@@ -365,4 +387,5 @@ GLOBAL_LIST_EMPTY(html_interfaces)
if ("onclose")
src.hide(hclient)
else if (src.ref && hclient.active) src.ref.Topic(href, href_list, hclient)
else if (src.ref && hclient.active)
src.ref.Topic(href, href_list, hclient)
@@ -26,7 +26,8 @@
src.client = client
/datum/html_interface_client/proc/putExtraVar(key, value)
if (!src.extra_vars) src.extra_vars = new/list()
if (!src.extra_vars)
src.extra_vars = new/list()
src.extra_vars[key] = value
/datum/html_interface_client/proc/removeExtraVar(key)
@@ -35,9 +36,11 @@
src.extra_vars.Remove(key)
if (!src.extra_vars.len) src.extra_vars = null
if (!src.extra_vars.len)
src.extra_vars = null
return .
/datum/html_interface_client/proc/getExtraVar(key)
if (src.extra_vars) return src.extra_vars[key]
if (src.extra_vars)
return src.extra_vars[key]
@@ -161,10 +161,14 @@ The client is optional and may be a /mob, /client or /html_interface_client obje
if (istype(hclient))
var/resource
switch (color)
if ("green") resource = 'uiEyeGreen.png'
if ("orange") resource = 'uiEyeOrange.png'
if ("red") resource = 'uiEyeRed.png'
else CRASH("Invalid color: [color]")
if ("green")
resource = 'uiEyeGreen.png'
if ("orange")
resource = 'uiEyeOrange.png'
if ("red")
resource = 'uiEyeRed.png'
else
CRASH("Invalid color: [color]")
if (hclient.getExtraVar("eye_color") != color)
hclient.putExtraVar("eye_color", color)
+1 -1
View File
@@ -126,7 +126,7 @@
// Blue Cherries
/obj/item/seeds/cherry/blue
name = "pack of blue cherry pits"
desc = "The blue kind of cherries"
desc = "The blue kind of cherries."
icon_state = "seed-bluecherry"
species = "bluecherry"
plantname = "Blue Cherry Tree"
+1 -1
View File
@@ -45,7 +45,7 @@
/obj/item/reagent_containers/food/snacks/grown/icepepper
seed = /obj/item/seeds/chili/ice
name = "ice pepper"
desc = "It's a mutant strain of chili"
desc = "It's a mutant strain of chili."
icon_state = "icepepper"
filling_color = "#0000CD"
bitesize_mod = 2
+1 -1
View File
@@ -58,7 +58,7 @@
/obj/item/grown/snapcorn
seed = /obj/item/seeds/corn/snapcorn
name = "snap corn"
desc = "A cob with snap pops"
desc = "A cob with snap pops."
icon_state = "snapcorn"
item_state = "corncob"
w_class = WEIGHT_CLASS_TINY

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