mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 12:37:26 +01:00
(Plasma decal already fixed) - Merge branch 'master' of https://github.com/ParadiseSS13/Paradise
Conflicts: code/game/machinery/atmoalter/canister.dm
This commit is contained in:
@@ -453,6 +453,13 @@ Implants;
|
||||
heads += player.mind
|
||||
return heads
|
||||
|
||||
/datum/game_mode/proc/get_extra_living_heads()
|
||||
var/list/heads = list()
|
||||
var/list/alt_positions = list("Warden", "Magistrate", "Blueshield", "Nanotrasen Representative")
|
||||
for(var/mob/living/carbon/human/player in mob_list)
|
||||
if(player.stat!=2 && player.mind && (player.mind.assigned_role in alt_positions))
|
||||
heads += player.mind
|
||||
return heads
|
||||
|
||||
////////////////////////////
|
||||
//Keeps track of all heads//
|
||||
@@ -464,6 +471,14 @@ Implants;
|
||||
heads += player.mind
|
||||
return heads
|
||||
|
||||
/datum/game_mode/proc/get_extra_heads()
|
||||
var/list/heads = list()
|
||||
var/list/alt_positions = list("Warden", "Magistrate", "Blueshield", "Nanotrasen Representative")
|
||||
for(var/mob/player in mob_list)
|
||||
if(player.mind && (player.mind.assigned_role in alt_positions))
|
||||
heads += player.mind
|
||||
return heads
|
||||
|
||||
/datum/game_mode/proc/check_antagonists_topic(href, href_list[])
|
||||
return 0
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
/datum/game_mode
|
||||
var/list/datum/mind/head_revolutionaries = list()
|
||||
var/list/datum/mind/revolutionaries = list()
|
||||
var/extra_heads = 0
|
||||
|
||||
/datum/game_mode/revolution
|
||||
name = "revolution"
|
||||
@@ -74,6 +75,9 @@
|
||||
|
||||
/datum/game_mode/revolution/post_setup()
|
||||
var/list/heads = get_living_heads()
|
||||
if(num_players() >= 40)
|
||||
heads += get_extra_living_heads()
|
||||
extra_heads = 1
|
||||
|
||||
for(var/datum/mind/rev_mind in head_revolutionaries)
|
||||
for(var/datum/mind/head_mind in heads)
|
||||
@@ -109,6 +113,9 @@
|
||||
|
||||
/datum/game_mode/proc/forge_revolutionary_objectives(var/datum/mind/rev_mind)
|
||||
var/list/heads = get_living_heads()
|
||||
if(num_players() >= 40)
|
||||
heads += get_extra_living_heads()
|
||||
extra_heads = 1
|
||||
for(var/datum/mind/head_mind in heads)
|
||||
var/datum/objective/mutiny/rev_obj = new
|
||||
rev_obj.owner = rev_mind
|
||||
@@ -409,6 +416,8 @@
|
||||
var/text = "<FONT size = 2><B>The heads of staff were:</B></FONT>"
|
||||
|
||||
var/list/heads = get_all_heads()
|
||||
if(extra_heads)
|
||||
heads += get_extra_heads()
|
||||
for(var/datum/mind/head in heads)
|
||||
var/target = (head in targets)
|
||||
if(target)
|
||||
@@ -435,4 +444,4 @@
|
||||
return istype(mind) && \
|
||||
istype(mind.current, /mob/living/carbon/human) && \
|
||||
!(mind.assigned_role in command_positions) && \
|
||||
!(mind.assigned_role in list("Security Officer", "Detective", "Warden"))
|
||||
!(mind.assigned_role in list("Security Officer", "Detective", "Warden", "Nanotrasen Representative"))
|
||||
|
||||
@@ -5,55 +5,24 @@
|
||||
density = 1
|
||||
var/health = 100.0
|
||||
flags = FPRINT | CONDUCT
|
||||
|
||||
|
||||
var/menu = 0
|
||||
//used by nanoui: 0 = main menu, 1 = relabel
|
||||
|
||||
var/valve_open = 0
|
||||
var/release_pressure = ONE_ATMOSPHERE
|
||||
|
||||
var/list/_color = list("yellow", null, null, null)//variable that stores colours
|
||||
var/list/decals = list() // var that stores the decals, NOTE: Not the actual POSSIBLE decals, but the ones currently used
|
||||
var/list/oldcolor = list()//lists for check_change()
|
||||
var/list/olddecals = list()
|
||||
var/list/possibledecals = list( //var that stores all possible decals, here for adminbus I guess? NOTE: LEAVE "done" IN HERE
|
||||
"Low temperature canister" = "cold",
|
||||
"High temperature canister" = "hot",
|
||||
"Plasma containing canister" = "plasma",
|
||||
"Done" = "DONE"
|
||||
)
|
||||
var/list/possiblemaincolor = list( //these lists contain the possible colors of a canister, here for adminbus
|
||||
"\[N2O\]" = "redws",
|
||||
"\[N2\]" = "red",
|
||||
"\[O2\]" = "blue",
|
||||
"\[Toxin (Bio)\]" = "orange",
|
||||
"\[CO2\]" = "black",
|
||||
"\[Air\]" = "grey",
|
||||
"\[CAUTION\]" = "yellow",
|
||||
"\[SPECIAL\]" = "whiters"
|
||||
)
|
||||
var/list/possibleseccolor = list( // no point in having the N2O and "whiters" ones in these lists
|
||||
"\[N2\]" = "red-c",
|
||||
"\[O2\]" = "blue-c",
|
||||
"\[Toxin (Bio)\]" = "orange-c",
|
||||
"\[CO2\]" = "black-c",
|
||||
"\[Air\]" = "grey-c",
|
||||
"\[CAUTION\]" = "yellow-c"
|
||||
)
|
||||
var/list/possibletertcolor = list(
|
||||
"\[N2\]" = "red-c-1",
|
||||
"\[O2\]" = "blue-c-1",
|
||||
"\[Toxin (Bio)\]" = "orange-c-1",
|
||||
"\[CO2\]" = "black-c-1",
|
||||
"\[Air\]" = "grey-c-1",
|
||||
"\[CAUTION\]" = "yellow-c-1"
|
||||
)
|
||||
var/list/possiblequartcolor = list(
|
||||
"\[N2\]" = "red-c-2",
|
||||
"\[O2\]" = "blue-c-2",
|
||||
"\[Toxin (Bio)\]" = "orange-c-2",
|
||||
"\[CO2\]" = "black-c-2",
|
||||
"\[Air\]" = "grey-c-2",
|
||||
"\[CAUTION\]" = "yellow-c-2"
|
||||
)
|
||||
|
||||
|
||||
var/list/_color //variable that stores colours
|
||||
var/list/decals // list that stores the decals
|
||||
var/list/possibledecals
|
||||
var/list/oldcolor//lists for check_change()
|
||||
var/list/olddecals
|
||||
var/list/possiblemaincolor //these lists contain the possible colors of a canister
|
||||
var/list/possibleseccolor
|
||||
var/list/possibletertcolor
|
||||
var/list/possiblequartcolor
|
||||
var/list/colorcontainer //passed to the ui to render the color lists
|
||||
|
||||
var/can_label = 1
|
||||
var/filled = 0.5
|
||||
pressure_resistance = 7*ONE_ATMOSPHERE
|
||||
@@ -63,43 +32,79 @@
|
||||
var/release_log = ""
|
||||
var/busy = 0
|
||||
var/update_flag = 0
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/sleeping_agent
|
||||
name = "Canister: \[N2O\]"
|
||||
icon_state = "redws"
|
||||
_color = list("redws", null, null, null)
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/nitrogen
|
||||
name = "Canister: \[N2\]"
|
||||
icon_state = "red"
|
||||
_color = list("red", null, null, null)
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/oxygen
|
||||
name = "Canister: \[O2\]"
|
||||
icon_state = "blue"
|
||||
_color = list("blue", null, null, null)
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/toxins
|
||||
name = "Canister \[Toxin (Plasma)\]"
|
||||
icon_state = "orange"
|
||||
_color = list("orange", null, null, null)
|
||||
decals = list("plasma")
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/carbon_dioxide
|
||||
name = "Canister \[CO2\]"
|
||||
icon_state = "black"
|
||||
_color = list("black", null, null, null)
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/air
|
||||
name = "Canister \[Air\]"
|
||||
icon_state = "grey"
|
||||
_color = list("grey", null, null, null)
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/custom_mix
|
||||
name = "Canister \[Custom\]"
|
||||
icon_state = "whiters"
|
||||
_color = list("whiters", null, null, null)
|
||||
can_label = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
_color = list(
|
||||
"prim" = "yellow",
|
||||
"sec" = null,
|
||||
"ter" = null,
|
||||
"quart" = null)
|
||||
oldcolor = list()
|
||||
decals = list()
|
||||
olddecals = list()
|
||||
possibledecals = list( //var that stores all possible decals, used by ui
|
||||
list("name" = "Low temperature canister", "icon" = "cold", "active" = 0),
|
||||
list("name" = "High temperature canister", "icon" = "hot", "active" = 0),
|
||||
list("name" = "Plasma containing canister", "icon" = "plasma", "active" = 0)
|
||||
)
|
||||
possiblemaincolor = list( //these lists contain the possible colors of a canister
|
||||
list("name" = "\[N2O\]", "icon" = "redws"),
|
||||
list("name" = "\[N2\]", "icon" = "red"),
|
||||
list("name" = "\[O2\]", "icon" = "blue"),
|
||||
list("name" = "\[Toxin (Bio)\]", "icon" = "orange"),
|
||||
list("name" = "\[CO2\]", "icon" = "black"),
|
||||
list("name" = "\[Air\]", "icon" = "grey"),
|
||||
list("name" = "\[CAUTION\]", "icon" = "yellow"),
|
||||
list("name" = "\[SPECIAL\]", "icon" = "whiters")
|
||||
)
|
||||
possibleseccolor = list( // no point in having the N2O and "whiters" ones in these lists
|
||||
list("name" = "\[N2\]", "icon" = "red-c"),
|
||||
list("name" = "\[O2\]", "icon" = "blue-c"),
|
||||
list("name" = "\[Toxin (Bio)\]", "icon" = "orange-c"),
|
||||
list("name" = "\[CO2\]", "icon" = "black-c"),
|
||||
list("name" = "\[Air\]", "icon" = "grey-c"),
|
||||
list("name" = "\[CAUTION\]", "icon" = "yellow-c")
|
||||
)
|
||||
possibletertcolor = list(
|
||||
list("name" = "\[N2\]", "icon" = "red-c-1"),
|
||||
list("name" = "\[O2\]", "icon" = "blue-c-1"),
|
||||
list("name" = "\[Toxin (Bio)\]", "icon" = "orange-c-1"),
|
||||
list("name" = "\[CO2\]", "icon" = "black-c-1"),
|
||||
list("name" = "\[Air\]", "icon" = "grey-c-1"),
|
||||
list("name" = "\[CAUTION\]", "icon" = "yellow-c-1")
|
||||
)
|
||||
possiblequartcolor = list(
|
||||
list("name" = "\[N2\]", "icon" = "red-c-2"),
|
||||
list("name" = "\[O2\]", "icon" = "blue-c-2"),
|
||||
list("name" = "\[Toxin (Bio)\]", "icon" = "orange-c-2"),
|
||||
list("name" = "\[CO2\]", "icon" = "black-c-2"),
|
||||
list("name" = "\[Air\]", "icon" = "grey-c-2"),
|
||||
list("name" = "\[CAUTION\]", "icon" = "yellow-c-2")
|
||||
)
|
||||
colorcontainer = list(//passed to the ui to render the color lists
|
||||
"prim" = list(
|
||||
"options" = possiblemaincolor,
|
||||
"name" = "Primary color",
|
||||
"anycolor" = -1,//0: no color applied. 1: color selected. Not used for primary color.
|
||||
),
|
||||
"sec" = list(
|
||||
"options" = possibleseccolor,
|
||||
"name" = "Secondary color",
|
||||
"anycolor" = 0,
|
||||
),
|
||||
"ter" = list(
|
||||
"options" = possibletertcolor,
|
||||
"name" = "Tertiary color",
|
||||
"anycolor" = 0,
|
||||
),
|
||||
"quart" = list(
|
||||
"options" = possiblequartcolor,
|
||||
"name" = "Quaternary color",
|
||||
"anycolor" = 0,
|
||||
)
|
||||
)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/proc/check_change()
|
||||
var/old_flag = update_flag
|
||||
@@ -119,16 +124,14 @@
|
||||
else
|
||||
update_flag |= 32
|
||||
|
||||
if(list2params(oldcolor) == list2params(_color))
|
||||
if(list2params(oldcolor) != list2params(_color))
|
||||
update_flag |= 64
|
||||
else
|
||||
oldcolor = _color
|
||||
|
||||
if(list2params(olddecals) == list2params(decals))
|
||||
oldcolor = _color.Copy()
|
||||
|
||||
if(list2params(olddecals) != list2params(decals))
|
||||
update_flag |= 128
|
||||
else
|
||||
olddecals = decals
|
||||
|
||||
olddecals = decals.Copy()
|
||||
|
||||
if(update_flag == old_flag)
|
||||
return 1
|
||||
else
|
||||
@@ -145,29 +148,30 @@ update_flag
|
||||
32 = tank_pressure go boom.
|
||||
64 = colors
|
||||
128 = decals
|
||||
(note: colors and decals has to be applied every icon update)
|
||||
*/
|
||||
|
||||
if (src.destroyed)
|
||||
src.overlays = 0
|
||||
src.icon_state = text("[]-1", src._color[1])//yes, I KNOW the colours don't reflect when the can's borked, whatever.
|
||||
src.icon_state = text("[]-1", src._color["prim"])//yes, I KNOW the colours don't reflect when the can's borked, whatever.
|
||||
|
||||
if(icon_state != src._color[1])
|
||||
icon_state = src._color[1]
|
||||
if(icon_state != src._color["prim"])
|
||||
icon_state = src._color["prim"]
|
||||
|
||||
if(check_change()) //Returns 1 if no change needed to icons.
|
||||
return
|
||||
|
||||
src.overlays = 0
|
||||
|
||||
if (_color["sec"])//COLORS!
|
||||
overlays.Add(_color["sec"])
|
||||
|
||||
if (_color[2])//COLORS!
|
||||
overlays.Add(_color[2])
|
||||
|
||||
if (_color[3])
|
||||
overlays.Add(_color[3])
|
||||
|
||||
if (_color[4])
|
||||
overlays.Add(_color[4])
|
||||
if (_color["ter"])
|
||||
overlays.Add(_color["ter"])
|
||||
|
||||
if (_color["quart"])
|
||||
overlays.Add(_color["quart"])
|
||||
|
||||
for(var/D in decals)
|
||||
overlays.Add("decal-" + D)
|
||||
|
||||
@@ -183,9 +187,36 @@ update_flag
|
||||
overlays += "can-o2"
|
||||
else if(update_flag & 32)
|
||||
overlays += "can-o3"
|
||||
check_change()//call this here to update the bitflag, incase the canister gets relabeled instantly after again
|
||||
|
||||
update_flag &= ~196 //the flags 128 and 64 represent change, not states. As such, we have to reset them to be able to detect a change on the next go.
|
||||
return
|
||||
|
||||
//template modification exploit prevention, used in Topic()
|
||||
/obj/machinery/portable_atmospherics/canister/proc/is_a_color(var/inputVar, var/checkColor = "all")
|
||||
if (checkColor == "prim" || checkColor == "all")
|
||||
for(var/list/L in possiblemaincolor)
|
||||
if (L["icon"] == inputVar)
|
||||
return 1
|
||||
if (checkColor == "sec" || checkColor == "all")
|
||||
for(var/list/L in possibleseccolor)
|
||||
if (L["icon"] == inputVar)
|
||||
return 1
|
||||
if (checkColor == "ter" || checkColor == "all")
|
||||
for(var/list/L in possibletertcolor)
|
||||
if (L["icon"] == inputVar)
|
||||
return 1
|
||||
if (checkColor == "quart" || checkColor == "all")
|
||||
for(var/list/L in possiblequartcolor)
|
||||
if (L["icon"] == inputVar)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/proc/is_a_decal(var/inputVar)
|
||||
for(var/list/L in possibledecals)
|
||||
if (L["icon"] == inputVar)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > temperature_resistance)
|
||||
health -= 5
|
||||
@@ -337,7 +368,11 @@ update_flag
|
||||
// this is the data which will be sent to the ui
|
||||
var/data[0]
|
||||
data["name"] = name
|
||||
data["menu"] = menu ? 1 : 0
|
||||
data["canLabel"] = can_label ? 1 : 0
|
||||
data["_color"] = _color
|
||||
data["colorContainer"] = colorcontainer
|
||||
data["possibleDecals"] = possibledecals
|
||||
data["portConnected"] = connected_port ? 1 : 0
|
||||
data["tankPressure"] = round(air_contents.return_pressure() ? air_contents.return_pressure() : 0)
|
||||
data["releasePressure"] = round(release_pressure ? release_pressure : 0)
|
||||
@@ -372,6 +407,9 @@ update_flag
|
||||
usr << browse(null, "window=canister")
|
||||
onclose(usr, "canister")
|
||||
return
|
||||
|
||||
if (href_list["choice"] == "menu")
|
||||
menu = text2num(href_list["mode_target"])
|
||||
|
||||
if(href_list["toggle"])
|
||||
if (valve_open)
|
||||
@@ -400,54 +438,99 @@ update_flag
|
||||
release_pressure = min(10*ONE_ATMOSPHERE, release_pressure+diff)
|
||||
else
|
||||
release_pressure = max(ONE_ATMOSPHERE/10, release_pressure+diff)
|
||||
|
||||
if (href_list["relabel"])
|
||||
|
||||
if (href_list["rename"])
|
||||
if (can_label)
|
||||
var/T = copytext(sanitize(input("Choose canister label", "Name", name) as text|null),1,MAX_NAME_LEN)
|
||||
if (can_label) //Exploit prevention
|
||||
if (T)
|
||||
name = T
|
||||
else
|
||||
name = "canister"
|
||||
else
|
||||
usr << "\red As you attempted to rename it the pressure rose!"
|
||||
|
||||
var/label1 = input("Choose canister label", "Primary color") as null|anything in possiblemaincolor
|
||||
|
||||
var/label2 = input("Choose canister label", "Secondary color") as null|anything in possibleseccolor
|
||||
|
||||
var/label3 = input("Choose canister label", "Tertiary color") as null|anything in possibletertcolor
|
||||
|
||||
var/label4 = input("Choose canister label", "Quaternary color") as null|anything in possiblequartcolor
|
||||
|
||||
decals = list()
|
||||
|
||||
_color = list(
|
||||
(label1 ? possiblemaincolor[label1] : color[1]),//if the user didn't specify a primary colour, keep the current one.
|
||||
possibleseccolor[label2],
|
||||
possibletertcolor[label3],
|
||||
possiblequartcolor[label4]
|
||||
)
|
||||
|
||||
decals = list()
|
||||
|
||||
var/list/tempposdecals = list()
|
||||
|
||||
for(var/d in possibledecals)//populate the temp list
|
||||
tempposdecals.Add(d)
|
||||
tempposdecals[d] = possibledecals[d]
|
||||
|
||||
while (src && !src.gc_destroyed && usr)//allow the user to select (theoretically) INFINITE DECALS!!!
|
||||
var/newdecal = input("Choose canister label", "Decal") as anything in tempposdecals
|
||||
if (newdecal == "Done")
|
||||
if (href_list["choice"] == "Primary color")
|
||||
if (is_a_color(href_list["icon"],"prim"))
|
||||
_color["prim"] = href_list["icon"]
|
||||
if (href_list["choice"] == "Secondary color")
|
||||
if (href_list["icon"] == "none")
|
||||
_color["sec"] = ""
|
||||
colorcontainer["sec"]["anycolor"] = 0
|
||||
else if (is_a_color(href_list["icon"],"sec"))
|
||||
_color["sec"] = href_list["icon"]
|
||||
colorcontainer["sec"]["anycolor"] = 1
|
||||
if (href_list["choice"] == "Tertiary color")
|
||||
if (href_list["icon"] == "none")
|
||||
_color["ter"] = ""
|
||||
colorcontainer["ter"]["anycolor"] = 0
|
||||
else if (is_a_color(href_list["icon"],"ter"))
|
||||
_color["ter"] = href_list["icon"]
|
||||
colorcontainer["ter"]["anycolor"] = 1
|
||||
if (href_list["choice"] == "Quaternary color")
|
||||
if (href_list["icon"] == "none")
|
||||
_color["quart"] = ""
|
||||
colorcontainer["quart"]["anycolor"] = 0
|
||||
else if (is_a_color(href_list["icon"],"quart"))
|
||||
_color["quart"] = href_list["icon"]
|
||||
colorcontainer["quart"]["anycolor"] = 1
|
||||
|
||||
if (href_list["choice"] == "decals")
|
||||
if (is_a_decal(href_list["icon"]))
|
||||
for (var/list/L in possibledecals)
|
||||
if (L["icon"] == href_list["icon"])
|
||||
L["active"] = (L["active"] == 0)
|
||||
break
|
||||
decals.Add(tempposdecals[newdecal])
|
||||
tempposdecals.Remove(newdecal)
|
||||
|
||||
src.name = (input("Choose canister label", "Name") as text) + " canister"
|
||||
|
||||
|
||||
|
||||
decals = list()
|
||||
|
||||
for (var/list/L in possibledecals)
|
||||
if (L["active"])
|
||||
if (!(L["icon"] in decals))
|
||||
decals.Add(L["icon"])
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
update_icon()
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/toxins
|
||||
name = "Canister \[Toxin (Plasma)\]"
|
||||
icon_state = "orange" //See New()
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/oxygen
|
||||
name = "Canister: \[O2\]"
|
||||
icon_state = "blue" //See New()
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/sleeping_agent
|
||||
name = "Canister: \[N2O\]"
|
||||
icon_state = "redws" //See New()
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/nitrogen
|
||||
name = "Canister: \[N2\]"
|
||||
icon_state = "red" //See New()
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/carbon_dioxide
|
||||
name = "Canister \[CO2\]"
|
||||
icon_state = "black" //See New()
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/air
|
||||
name = "Canister \[Air\]"
|
||||
icon_state = "grey" //See New()
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/custom_mix
|
||||
name = "Canister \[Custom\]"
|
||||
icon_state = "whiters" //See New()
|
||||
can_label = 0
|
||||
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/toxins/New()
|
||||
|
||||
..()
|
||||
|
||||
|
||||
_color["prim"] = "orange"
|
||||
decals = list("plasma")
|
||||
possibledecals[3]["active"] = 1
|
||||
src.air_contents.toxins = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
air_contents.update_values()
|
||||
|
||||
@@ -455,18 +538,18 @@ update_flag
|
||||
return 1
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/oxygen/New()
|
||||
|
||||
..()
|
||||
|
||||
_color["prim"] = "blue"
|
||||
src.air_contents.oxygen = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
air_contents.update_values()
|
||||
src.update_icon()
|
||||
return 1
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/sleeping_agent/New()
|
||||
|
||||
..()
|
||||
|
||||
|
||||
_color["prim"] = "redws"
|
||||
var/datum/gas/sleeping_agent/trace_gas = new
|
||||
air_contents.trace_gases += trace_gas
|
||||
trace_gas.moles = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
@@ -492,9 +575,9 @@ update_flag
|
||||
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/nitrogen/New()
|
||||
|
||||
..()
|
||||
|
||||
_color["prim"] = "red"
|
||||
src.air_contents.nitrogen = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
air_contents.update_values()
|
||||
|
||||
@@ -502,8 +585,9 @@ update_flag
|
||||
return 1
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/carbon_dioxide/New()
|
||||
|
||||
..()
|
||||
|
||||
_color["prim"] = "black"
|
||||
src.air_contents.carbon_dioxide = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
air_contents.update_values()
|
||||
|
||||
@@ -512,8 +596,9 @@ update_flag
|
||||
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/air/New()
|
||||
|
||||
..()
|
||||
|
||||
_color["prim"] = "grey"
|
||||
src.air_contents.oxygen = (O2STANDARD*src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
src.air_contents.nitrogen = (N2STANDARD*src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
air_contents.update_values()
|
||||
@@ -524,6 +609,7 @@ update_flag
|
||||
/obj/machinery/portable_atmospherics/canister/custom_mix/New()
|
||||
..()
|
||||
|
||||
_color["prim"] = "whiters"
|
||||
src.update_icon() // Otherwise new canisters do not have their icon updated with the pressure light, likely want to add this to the canister class constructor, avoiding at current time to refrain from screwing up code for other canisters. --DZD
|
||||
return 1
|
||||
|
||||
|
||||
@@ -221,12 +221,14 @@
|
||||
for(var/datum/reagent/R in beaker.reagents.reagent_list)
|
||||
data["beakerVolume"] += R.volume
|
||||
|
||||
data["autoeject"] = autoeject
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
ui = new(user, src, ui_key, "cryo.tmpl", "Cryo Cell Control System", 520, 410)
|
||||
ui = new(user, src, ui_key, "cryo.tmpl", "Cryo Cell Control System", 520, 420)
|
||||
// when the ui is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
// open the new ui window
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
name = "Emergency Floodlight"
|
||||
icon = 'icons/obj/machines/floodlight.dmi'
|
||||
icon_state = "flood00"
|
||||
anchored = 0
|
||||
density = 1
|
||||
var/on = 0
|
||||
var/obj/item/weapon/stock_parts/cell/high/cell = null
|
||||
@@ -63,6 +64,21 @@
|
||||
|
||||
|
||||
/obj/machinery/floodlight/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if (!anchored && !isinspace())
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user.visible_message( \
|
||||
"[user] tightens \the [src]'s casters.", \
|
||||
"<span class='notice'> You have tightened \the [src]'s casters.</span>", \
|
||||
"You hear ratchet.")
|
||||
anchored = 1
|
||||
else if(anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user.visible_message( \
|
||||
"[user] loosens \the [src]'s casters.", \
|
||||
"<span class='notice'> You have loosened \the [src]'s casters.</span>", \
|
||||
"You hear ratchet.")
|
||||
anchored = 0
|
||||
if (istype(W, /obj/item/weapon/screwdriver))
|
||||
if (!open)
|
||||
if(unlocked)
|
||||
|
||||
@@ -965,7 +965,8 @@
|
||||
/obj/item/seeds/sunflowerseed = 3,/obj/item/seeds/tomatoseed = 3,/obj/item/seeds/towermycelium = 3,/obj/item/seeds/wheatseed = 3,/obj/item/seeds/appleseed = 3,
|
||||
/obj/item/seeds/poppyseed = 3,/obj/item/seeds/ambrosiavulgarisseed = 3,/obj/item/seeds/whitebeetseed = 3,/obj/item/seeds/watermelonseed = 3,/obj/item/seeds/limeseed = 3,
|
||||
/obj/item/seeds/lemonseed = 3,/obj/item/seeds/orangeseed = 3,/obj/item/seeds/grassseed = 3,/obj/item/seeds/cocoapodseed = 3,
|
||||
/obj/item/seeds/cabbageseed = 3,/obj/item/seeds/grapeseed = 3,/obj/item/seeds/pumpkinseed = 3,/obj/item/seeds/cherryseed = 3,/obj/item/seeds/plastiseed = 3,/obj/item/seeds/riceseed = 3)
|
||||
/obj/item/seeds/cabbageseed = 3,/obj/item/seeds/grapeseed = 3,/obj/item/seeds/pumpkinseed = 3,/obj/item/seeds/cherryseed = 3,/obj/item/seeds/plastiseed = 3,/obj/item/seeds/riceseed = 3,
|
||||
/obj/item/seeds/tobaccoseed = 3, /obj/item/seeds/coffeeaseed = 3, /obj/item/seeds/teaasperaseed = 3)
|
||||
|
||||
contraband = list(/obj/item/seeds/amanitamycelium = 2,/obj/item/seeds/glowshroom = 2,/obj/item/seeds/libertymycelium = 2,/obj/item/seeds/nettleseed = 2,
|
||||
/obj/item/seeds/plumpmycelium = 2,/obj/item/seeds/reishimycelium = 2)
|
||||
|
||||
@@ -183,6 +183,20 @@
|
||||
new /obj/item/weapon/grenade/flashbang(src)
|
||||
new /obj/item/weapon/grenade/flashbang(src)
|
||||
|
||||
/obj/item/weapon/storage/box/flashes
|
||||
name = "box of flashbulbs"
|
||||
desc = "<B>WARNING: Flashes can cause serious eye damage, protective eyewear is required.</B>"
|
||||
icon_state = "flashbang"
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/device/flash(src)
|
||||
new /obj/item/device/flash(src)
|
||||
new /obj/item/device/flash(src)
|
||||
new /obj/item/device/flash(src)
|
||||
new /obj/item/device/flash(src)
|
||||
new /obj/item/device/flash(src)
|
||||
|
||||
/obj/item/weapon/storage/box/teargas
|
||||
name = "box of tear gas grenades (WARNING)"
|
||||
desc = "<B>WARNING: These devices are extremely dangerous and can cause blindness and skin irritation.</B>"
|
||||
@@ -242,6 +256,20 @@
|
||||
new /obj/item/weapon/implanter(src)
|
||||
new /obj/item/weapon/implantpad(src)
|
||||
|
||||
/obj/item/weapon/storage/box/exileimp
|
||||
name = "boxed exile implant kit"
|
||||
desc = "Box of exile implants. It has a picture of a clown being booted through the Gateway."
|
||||
icon_state = "implant"
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/weapon/implantcase/exile(src)
|
||||
new /obj/item/weapon/implantcase/exile(src)
|
||||
new /obj/item/weapon/implantcase/exile(src)
|
||||
new /obj/item/weapon/implantcase/exile(src)
|
||||
new /obj/item/weapon/implantcase/exile(src)
|
||||
new /obj/item/weapon/implanter(src)
|
||||
|
||||
/obj/item/weapon/storage/box/deathimp
|
||||
name = "death alarm implant kit"
|
||||
desc = "Box of life sign monitoring implants."
|
||||
|
||||
@@ -381,6 +381,10 @@
|
||||
new /obj/item/clothing/head/soft/grey(src)
|
||||
if(prob(50))
|
||||
new /obj/item/weapon/storage/backpack/duffel(src)
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/under/assistantformal(src)
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/under/assistantformal(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
icon_closed = "critter"
|
||||
var/already_opened = 0
|
||||
var/content_mob = null
|
||||
var/amount = 1
|
||||
|
||||
/obj/structure/closet/critter/can_open()
|
||||
if(welded)
|
||||
@@ -21,19 +22,7 @@
|
||||
return ..()
|
||||
|
||||
if(content_mob != null && already_opened == 0)
|
||||
if(content_mob == /mob/living/simple_animal/chick)
|
||||
var/num = rand(4, 6)
|
||||
for(var/i = 0, i < num, i++)
|
||||
new content_mob(loc)
|
||||
else if(content_mob == /mob/living/simple_animal/corgi)
|
||||
var/num = rand(0, 1)
|
||||
if(num) //No more matriarchy for cargo
|
||||
content_mob = /mob/living/simple_animal/corgi/Lisa
|
||||
new content_mob(loc)
|
||||
else if(content_mob == /mob/living/simple_animal/cat)
|
||||
if(prob(50))
|
||||
content_mob = /mob/living/simple_animal/cat/Proc
|
||||
else
|
||||
for(var/i = 1, i <= amount, i++)
|
||||
new content_mob(loc)
|
||||
already_opened = 1
|
||||
..()
|
||||
@@ -53,7 +42,12 @@
|
||||
|
||||
/obj/structure/closet/critter/corgi
|
||||
name = "corgi crate"
|
||||
content_mob = /mob/living/simple_animal/corgi //This statement is (not) false. See above.
|
||||
content_mob = /mob/living/simple_animal/corgi
|
||||
|
||||
/obj/structure/closet/critter/corgi/New()
|
||||
if(prob(50))
|
||||
content_mob = /mob/living/simple_animal/corgi/Lisa
|
||||
..()
|
||||
|
||||
/obj/structure/closet/critter/cow
|
||||
name = "cow crate"
|
||||
@@ -67,10 +61,28 @@
|
||||
name = "chicken crate"
|
||||
content_mob = /mob/living/simple_animal/chick
|
||||
|
||||
/obj/structure/closet/critter/chick/New()
|
||||
amount = rand(1, 3)
|
||||
..()
|
||||
|
||||
/obj/structure/closet/critter/cat
|
||||
name = "cat crate"
|
||||
content_mob = /mob/living/simple_animal/cat
|
||||
|
||||
/obj/structure/closet/critter/cat/New()
|
||||
if(prob(50))
|
||||
content_mob = /mob/living/simple_animal/cat/Proc
|
||||
..()
|
||||
|
||||
/obj/structure/closet/critter/pug
|
||||
name = "pug crate"
|
||||
content_mob = /mob/living/simple_animal/pug
|
||||
|
||||
/obj/structure/closet/critter/fox
|
||||
name = "fox crate"
|
||||
content_mob = /mob/living/simple_animal/fox
|
||||
content_mob = /mob/living/simple_animal/fox
|
||||
|
||||
/obj/structure/closet/critter/butterfly
|
||||
name = "butterflies crate"
|
||||
content_mob = /mob/living/simple_animal/butterfly
|
||||
amount = 50
|
||||
@@ -6,6 +6,15 @@
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/dresser/proc/convUnM(mund)
|
||||
return underwear_m.Find(mund)
|
||||
|
||||
/obj/structure/dresser/proc/convUnF(fund)
|
||||
return underwear_f.Find(fund)
|
||||
|
||||
/obj/structure/dresser/proc/convUs(us)
|
||||
return undershirt_list.Find(us)
|
||||
|
||||
/obj/structure/dresser/attack_hand(mob/user as mob)
|
||||
if(!Adjacent(user))//no tele-grooming
|
||||
return
|
||||
@@ -18,14 +27,26 @@
|
||||
return
|
||||
switch(choice)
|
||||
if("Underwear")
|
||||
var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in underwear_list
|
||||
if(new_undies)
|
||||
H.underwear = new_undies
|
||||
if(H.gender == FEMALE)
|
||||
var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in underwear_f
|
||||
if(new_undies)
|
||||
H << "\red You selected [new_undies]."
|
||||
var/freturn = convUnF(new_undies)
|
||||
H.underwear = freturn
|
||||
|
||||
else
|
||||
var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in underwear_m
|
||||
if(new_undies)
|
||||
H << "\red You selected [new_undies]."
|
||||
var/mreturn = convUnM(new_undies)
|
||||
H.underwear = mreturn
|
||||
|
||||
if("Undershirt")
|
||||
var/new_undershirt = input(user, "Select your undershirt", "Changing") as null|anything in undershirt_list
|
||||
if(new_undershirt)
|
||||
H.undershirt = new_undershirt
|
||||
H << "\red You selected [new_undershirt]"
|
||||
var/usreturn = convUs(new_undershirt)
|
||||
H.undershirt = usreturn
|
||||
|
||||
add_fingerprint(H)
|
||||
H.update_body()
|
||||
+20
-16
@@ -93,6 +93,7 @@ var/list/mechtoys = list(
|
||||
|
||||
/obj/machinery/computer/supplycomp
|
||||
name = "Supply Shuttle Console"
|
||||
desc = "Used to order supplies."
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "supply"
|
||||
req_access = list(access_cargo)
|
||||
@@ -105,6 +106,7 @@ var/list/mechtoys = list(
|
||||
|
||||
/obj/machinery/computer/ordercomp
|
||||
name = "Supply Ordering Console"
|
||||
desc = "Used to order supplies from cargo staff."
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "request"
|
||||
circuit = "/obj/item/weapon/circuitboard/ordercomp"
|
||||
@@ -271,8 +273,8 @@ var/list/mechtoys = list(
|
||||
A:req_access += text2num(SP.access)
|
||||
|
||||
var/list/contains
|
||||
if(istype(SP,/datum/supply_packs/randomised))
|
||||
var/datum/supply_packs/randomised/SPR = SP
|
||||
if(istype(SP,/datum/supply_packs/misc/randomised))
|
||||
var/datum/supply_packs/misc/randomised/SPR = SP
|
||||
contains = list()
|
||||
if(SPR.contains.len)
|
||||
for(var/j=1,j<=SPR.num_contained,j++)
|
||||
@@ -347,17 +349,18 @@ var/list/mechtoys = list(
|
||||
temp = "<b>Supply points: [supply_controller.points]</b><BR>"
|
||||
temp += "<A href='?src=\ref[src];mainmenu=1'>Main Menu</A><HR><BR><BR>"
|
||||
temp += "<b>Select a category</b><BR><BR>"
|
||||
for(var/supply_group_name in all_supply_groups )
|
||||
temp += "<A href='?src=\ref[src];order=[supply_group_name]'>[supply_group_name]</A><BR>"
|
||||
for(var/cat in all_supply_groups )
|
||||
temp += "<A href='?src=\ref[src];order=[cat]'>[get_supply_group_name(cat)]</A><BR>"
|
||||
else
|
||||
last_viewed_group = href_list["order"]
|
||||
var/cat = text2num(last_viewed_group)
|
||||
temp = "<b>Supply points: [supply_controller.points]</b><BR>"
|
||||
temp += "<A href='?src=\ref[src];order=categories'>Back to all categories</A><HR><BR><BR>"
|
||||
temp += "<b>Request from: [last_viewed_group]</b><BR><BR>"
|
||||
for(var/supply_name in supply_controller.supply_packs )
|
||||
var/datum/supply_packs/N = supply_controller.supply_packs[supply_name]
|
||||
if(N.hidden || N.contraband || N.group != last_viewed_group) continue //Have to send the type instead of a reference to
|
||||
temp += "<A href='?src=\ref[src];doorder=[supply_name]'>[supply_name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
|
||||
temp += "<b>Request from: [get_supply_group_name(cat)]</b><BR><BR>"
|
||||
for(var/supply_type in supply_controller.supply_packs )
|
||||
var/datum/supply_packs/N = supply_controller.supply_packs[supply_type]
|
||||
if(N.hidden || N.contraband || N.group != cat) continue //Have to send the type instead of a reference to
|
||||
temp += "<A href='?src=\ref[src];doorder=[supply_type]'>[N.name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
|
||||
|
||||
else if (href_list["doorder"])
|
||||
if(world.time < reqtime)
|
||||
@@ -542,17 +545,18 @@ var/list/mechtoys = list(
|
||||
temp = "<b>Supply points: [supply_controller.points]</b><BR>"
|
||||
temp += "<A href='?src=\ref[src];mainmenu=1'>Main Menu</A><HR><BR><BR>"
|
||||
temp += "<b>Select a category</b><BR><BR>"
|
||||
for(var/supply_group_name in all_supply_groups )
|
||||
temp += "<A href='?src=\ref[src];order=[supply_group_name]'>[supply_group_name]</A><BR>"
|
||||
for(var/cat in all_supply_groups )
|
||||
temp += "<A href='?src=\ref[src];order=[cat]'>[get_supply_group_name(cat)]</A><BR>"
|
||||
else
|
||||
last_viewed_group = href_list["order"]
|
||||
var/cat = text2num(last_viewed_group)
|
||||
temp = "<b>Supply points: [supply_controller.points]</b><BR>"
|
||||
temp += "<A href='?src=\ref[src];order=categories'>Back to all categories</A><HR><BR><BR>"
|
||||
temp += "<b>Request from: [last_viewed_group]</b><BR><BR>"
|
||||
for(var/supply_name in supply_controller.supply_packs )
|
||||
var/datum/supply_packs/N = supply_controller.supply_packs[supply_name]
|
||||
if((N.hidden && !hacked) || (N.contraband && !can_order_contraband) || N.group != last_viewed_group) continue //Have to send the type instead of a reference to
|
||||
temp += "<A href='?src=\ref[src];doorder=[supply_name]'>[supply_name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
|
||||
temp += "<b>Request from: [get_supply_group_name(cat)]</b><BR><BR>"
|
||||
for(var/supply_type in supply_controller.supply_packs )
|
||||
var/datum/supply_packs/N = supply_controller.supply_packs[supply_type]
|
||||
if((N.hidden && !hacked) || (N.contraband && !can_order_contraband) || N.group != cat) continue //Have to send the type instead of a reference to
|
||||
temp += "<A href='?src=\ref[src];doorder=[supply_type]'>[N.name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
|
||||
|
||||
/*temp = "Supply points: [supply_controller.points]<BR><HR><BR>Request what?<BR><BR>"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user