mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +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:
Executable → Regular
+1091
-1004
File diff suppressed because it is too large
Load Diff
@@ -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>"
|
||||
|
||||
|
||||
@@ -638,6 +638,7 @@ var/list/admin_verbs_mod = list(
|
||||
set category = "Preferences"
|
||||
|
||||
prefs.toggles ^= CHAT_ATTACKLOGS
|
||||
prefs.save_preferences(src)
|
||||
if (prefs.toggles & CHAT_ATTACKLOGS)
|
||||
usr << "You now will get attack log messages"
|
||||
else
|
||||
|
||||
@@ -175,6 +175,14 @@
|
||||
)
|
||||
|
||||
//Lawyer
|
||||
/obj/item/clothing/suit/storage/lawyer/blackjacket
|
||||
name = "Black Suit Jacket"
|
||||
desc = "A snappy dress jacket."
|
||||
icon_state = "suitjacket_black_open"
|
||||
item_state = "suitjacket_black_open"
|
||||
blood_overlay_type = "coat"
|
||||
body_parts_covered = UPPER_TORSO|ARMS
|
||||
|
||||
/obj/item/clothing/suit/storage/lawyer/bluejacket
|
||||
name = "Blue Suit Jacket"
|
||||
desc = "A snappy dress jacket."
|
||||
|
||||
@@ -228,6 +228,27 @@
|
||||
item_state = "navy_suit"
|
||||
_color = "navy_suit"
|
||||
|
||||
/obj/item/clothing/under/suit_jacket/tan
|
||||
name = "tan suit"
|
||||
desc = "A tan suit with a yellow tie. Smart, but casual."
|
||||
icon_state = "tan_suit"
|
||||
item_state = "tan_suit"
|
||||
_color = "tan_suit"
|
||||
|
||||
/obj/item/clothing/under/suit_jacket/burgundy
|
||||
name = "burgundy suit"
|
||||
desc = "A burgundy suit and black tie. Somewhat formal."
|
||||
icon_state = "burgundy_suit"
|
||||
item_state = "burgundy_suit"
|
||||
_color = "burgundy_suit"
|
||||
|
||||
/obj/item/clothing/under/suit_jacket/charcoal
|
||||
name = "charcoal suit"
|
||||
desc = "A charcoal suit and red tie. Very professional."
|
||||
icon_state = "charcoal_suit"
|
||||
item_state = "charcoal_suit"
|
||||
_color = "charcoal_suit"
|
||||
|
||||
/obj/item/clothing/under/blackskirt
|
||||
name = "black skirt"
|
||||
desc = "A black skirt, very fancy!"
|
||||
@@ -587,6 +608,13 @@
|
||||
_color = "pennywise"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO
|
||||
|
||||
/obj/item/clothing/under/assistantformal
|
||||
name = "assistant's formal uniform"
|
||||
desc = "An assistant's formal-wear. Why an assistant needs formal-wear is still unknown."
|
||||
icon_state = "assistant_formal"
|
||||
item_state = "gy_suit"
|
||||
_color = "assistant_formal"
|
||||
|
||||
/obj/item/clothing/under/blacktango
|
||||
name = "black tango dress"
|
||||
desc = "Filled with Latin fire."
|
||||
|
||||
+39
-36
@@ -52,42 +52,42 @@ var/list/karma_spenders = list()
|
||||
set name = "Award Karma"
|
||||
set desc = "Let the gods know whether someone's been nice. Can only be used once per round."
|
||||
set category = "Special Verbs"
|
||||
|
||||
|
||||
if(!ticker || !player_list.len)
|
||||
usr << "\red You can't award karma until the game has started."
|
||||
return
|
||||
|
||||
|
||||
if(ticker.current_state == GAME_STATE_PREGAME)
|
||||
usr << "\red You can't award karma until the game has started."
|
||||
return
|
||||
return
|
||||
|
||||
var/list/karma_list = list("Cancel")
|
||||
for(var/mob/M in player_list) if(M.client && M.mind)
|
||||
for(var/mob/M in player_list) if(M.client && M.mind)
|
||||
var/special_role = M.mind.special_role
|
||||
if (special_role == "Wizard" || special_role == "Ninja" || special_role == "Syndicate" || special_role == "Syndicate Commando" || special_role == "Vox Raider" || special_role == "Alien") // Don't include special roles, because players use it to meta
|
||||
continue
|
||||
karma_list += M
|
||||
|
||||
|
||||
if(!karma_list.len || karma_list.len == 1)
|
||||
usr << "\red There's no-one to spend your karma on."
|
||||
return
|
||||
|
||||
|
||||
var/pickedmob = input("Who would you like to award Karma to?", "Award Karma", "Cancel") as null|mob in karma_list
|
||||
|
||||
|
||||
if(isnull(pickedmob))
|
||||
return
|
||||
|
||||
|
||||
if(!istype(pickedmob, /mob))
|
||||
usr << "\red That's not a mob."
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
spend_karma(pickedmob)
|
||||
|
||||
/mob/verb/spend_karma(var/mob/M)
|
||||
|
||||
/mob/verb/spend_karma(var/mob/M)
|
||||
set name = "Award Karma to Player"
|
||||
set desc = "Let the gods know whether someone's been nice. Can only be used once per round."
|
||||
set category = "Special Verbs"
|
||||
|
||||
|
||||
if(!M)
|
||||
usr << "Please right click a mob to award karma directly, or use the 'Award Karma' verb to select a player from the player listing."
|
||||
return
|
||||
@@ -115,6 +115,9 @@ var/list/karma_spenders = list()
|
||||
if(!choice || choice == "Cancel")
|
||||
return
|
||||
if(choice == "Good" && !(src.client.karma_spent))
|
||||
if(src.client.karma_spent)
|
||||
usr << "\red You've already spent your karma for the round."
|
||||
return
|
||||
M.client.karma += 1
|
||||
usr << "[choice] karma spent on [M.name]."
|
||||
src.client.karma_spent = 1
|
||||
@@ -199,7 +202,7 @@ You've gained <b>[totalkarma]</b> total karma in your time here.<br>"}
|
||||
<a href='?src=\ref[src];karmashop=shop;KarmaBuy2=4'>Unlock Vox -- 45KP</a><br>
|
||||
<a href='?src=\ref[src];karmashop=shop;KarmaBuy2=5'>Unlock Slime People -- 45KP</a><br>
|
||||
"}
|
||||
|
||||
|
||||
if (2) // Karma Refunds
|
||||
var/list/refundable = list()
|
||||
var/list/purchased = checkpurchased()
|
||||
@@ -208,31 +211,31 @@ You've gained <b>[totalkarma]</b> total karma in your time here.<br>"}
|
||||
dat += "<a href='?src=\ref[src];karmashop=shop;KarmaRefund=Tajaran Ambassador;KarmaRefundType=job;KarmaRefundCost=30'>Refund Tajaran Ambassador -- 30KP</a><br>"
|
||||
if("Unathi Ambassador" in purchased)
|
||||
refundable += "Unathi Ambassador"
|
||||
dat += "<a href='?src=\ref[src];karmashop=shop;KarmaRefund=Unathi Ambassador;KarmaRefundType=job;KarmaRefundCost=30'>Refund Unathi Ambassador -- 30KP</a><br>"
|
||||
dat += "<a href='?src=\ref[src];karmashop=shop;KarmaRefund=Unathi Ambassador;KarmaRefundType=job;KarmaRefundCost=30'>Refund Unathi Ambassador -- 30KP</a><br>"
|
||||
if("Skrell Ambassador" in purchased)
|
||||
refundable += "Skrell Ambassador"
|
||||
dat += "<a href='?src=\ref[src];karmashop=shop;KarmaRefund=Skrell Ambassador;KarmaRefundType=job;KarmaRefundCost=30'>Refund Skrell Ambassador -- 30KP</a><br>"
|
||||
dat += "<a href='?src=\ref[src];karmashop=shop;KarmaRefund=Skrell Ambassador;KarmaRefundType=job;KarmaRefundCost=30'>Refund Skrell Ambassador -- 30KP</a><br>"
|
||||
if("Diona Ambassador" in purchased)
|
||||
refundable += "Diona Ambassador"
|
||||
dat += "<a href='?src=\ref[src];karmashop=shop;KarmaRefund=Diona Ambassador;KarmaRefundType=job;KarmaRefundCost=30'>Refund Diona Ambassador -- 30KP</a><br>"
|
||||
dat += "<a href='?src=\ref[src];karmashop=shop;KarmaRefund=Diona Ambassador;KarmaRefundType=job;KarmaRefundCost=30'>Refund Diona Ambassador -- 30KP</a><br>"
|
||||
if("Kidan Ambassador" in purchased)
|
||||
refundable += "Kidan Ambassador"
|
||||
dat += "<a href='?src=\ref[src];karmashop=shop;KarmaRefund=Kidan Ambassador;KarmaRefundType=job;KarmaRefundCost=30'>Refund Kidan Ambassador -- 30KP</a><br>"
|
||||
dat += "<a href='?src=\ref[src];karmashop=shop;KarmaRefund=Kidan Ambassador;KarmaRefundType=job;KarmaRefundCost=30'>Refund Kidan Ambassador -- 30KP</a><br>"
|
||||
if("Slime People Ambassador" in purchased)
|
||||
refundable += "Slime People Ambassador"
|
||||
dat += "<a href='?src=\ref[src];karmashop=shop;KarmaRefund=Slime People Ambassador;KarmaRefundType=job;KarmaRefundCost=30'>Refund Slime People Ambassador -- 30KP</a><br>"
|
||||
dat += "<a href='?src=\ref[src];karmashop=shop;KarmaRefund=Slime People Ambassador;KarmaRefundType=job;KarmaRefundCost=30'>Refund Slime People Ambassador -- 30KP</a><br>"
|
||||
if("Grey Ambassador" in purchased)
|
||||
refundable += "Grey Ambassador"
|
||||
dat += "<a href='?src=\ref[src];karmashop=shop;KarmaRefund=Grey Ambassador;KarmaRefundType=job;KarmaRefundCost=30'>Refund Grey Ambassador -- 30KP</a><br>"
|
||||
dat += "<a href='?src=\ref[src];karmashop=shop;KarmaRefund=Grey Ambassador;KarmaRefundType=job;KarmaRefundCost=30'>Refund Grey Ambassador -- 30KP</a><br>"
|
||||
if("Vox Ambassador" in purchased)
|
||||
refundable += "Vox Ambassador"
|
||||
dat += "<a href='?src=\ref[src];karmashop=shop;KarmaRefund=Vox Ambassador;KarmaRefundType=job;KarmaRefundCost=30'>Refund Vox Ambassador -- 30KP</a><br>"
|
||||
if("Customs Officer" in purchased)
|
||||
refundable += "Customs Officer"
|
||||
dat += "<a href='?src=\ref[src];karmashop=shop;KarmaRefund=Customs Officer;KarmaRefundType=job;KarmaRefundCost=30'>Refund Customs Officer -- 30KP</a><br>"
|
||||
dat += "<a href='?src=\ref[src];karmashop=shop;KarmaRefund=Customs Officer;KarmaRefundType=job;KarmaRefundCost=30'>Refund Customs Officer -- 30KP</a><br>"
|
||||
if("Nanotrasen Recruiter" in purchased)
|
||||
refundable += "Nanotrasen Recruiter"
|
||||
dat += "<a href='?src=\ref[src];karmashop=shop;KarmaRefund=Nanotrasen Recruiter;KarmaRefundType=job;KarmaRefundCost=10'>Refund Nanotrasen Recruiter -- 10KP</a><br>"
|
||||
dat += "<a href='?src=\ref[src];karmashop=shop;KarmaRefund=Nanotrasen Recruiter;KarmaRefundType=job;KarmaRefundCost=10'>Refund Nanotrasen Recruiter -- 10KP</a><br>"
|
||||
|
||||
if(!refundable.len)
|
||||
dat += "You do not have any refundable karma purchases.<br>"
|
||||
@@ -345,7 +348,7 @@ You've gained <b>[totalkarma]</b> total karma in your time here.<br>"}
|
||||
usr << "You have been charged [cost] karma."
|
||||
message_admins("[key_name(usr)] has been charged [cost] karma.")
|
||||
return
|
||||
|
||||
|
||||
/client/proc/karmarefund(var/type,var/name,var/cost)
|
||||
if(name == "Tajaran Ambassador")
|
||||
cost = 30
|
||||
@@ -368,12 +371,12 @@ You've gained <b>[totalkarma]</b> total karma in your time here.<br>"}
|
||||
else if(name == "Nanotrasen Recruiter")
|
||||
cost = 10
|
||||
else
|
||||
usr << "\red That job is not refundable."
|
||||
usr << "\red That job is not refundable."
|
||||
return
|
||||
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT * FROM whitelist WHERE ckey='[usr.key]'")
|
||||
query.Execute()
|
||||
|
||||
|
||||
var/dbjob
|
||||
var/dbspecies
|
||||
var/dbckey
|
||||
@@ -381,7 +384,7 @@ You've gained <b>[totalkarma]</b> total karma in your time here.<br>"}
|
||||
dbckey = query.item[2]
|
||||
dbjob = query.item[3]
|
||||
dbspecies = query.item[4]
|
||||
|
||||
|
||||
if(dbckey)
|
||||
var/list/typelist = list()
|
||||
if(type == "job")
|
||||
@@ -389,8 +392,8 @@ You've gained <b>[totalkarma]</b> total karma in your time here.<br>"}
|
||||
else if(type == "species")
|
||||
typelist = text2list(dbspecies,",")
|
||||
else
|
||||
usr << "\red Type [type] is not a valid column."
|
||||
|
||||
usr << "\red Type [type] is not a valid column."
|
||||
|
||||
if(name in typelist)
|
||||
typelist -= name
|
||||
var/newtypelist = list2text(typelist,",")
|
||||
@@ -406,14 +409,14 @@ You've gained <b>[totalkarma]</b> total karma in your time here.<br>"}
|
||||
karmacharge(text2num(cost),1)
|
||||
else
|
||||
usr << "\red You have not bought [name]."
|
||||
|
||||
|
||||
else
|
||||
usr << "\red Your ckey ([dbckey]) was not found."
|
||||
|
||||
usr << "\red Your ckey ([dbckey]) was not found."
|
||||
|
||||
/client/proc/checkpurchased(var/name = null) // If the first parameter is null, return a full list of purchases
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT * FROM whitelist WHERE ckey='[usr.key]'")
|
||||
query.Execute()
|
||||
|
||||
query.Execute()
|
||||
|
||||
var/dbjob
|
||||
var/dbspecies
|
||||
var/dbckey
|
||||
@@ -421,7 +424,7 @@ You've gained <b>[totalkarma]</b> total karma in your time here.<br>"}
|
||||
dbckey = query.item[2]
|
||||
dbjob = query.item[3]
|
||||
dbspecies = query.item[4]
|
||||
|
||||
|
||||
if(dbckey)
|
||||
var/list/joblist = text2list(dbjob,",")
|
||||
var/list/specieslist = text2list(dbspecies,",")
|
||||
@@ -434,4 +437,4 @@ You've gained <b>[totalkarma]</b> total karma in your time here.<br>"}
|
||||
else
|
||||
return combinedlist
|
||||
else
|
||||
return 0
|
||||
return 0
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/mob/living/simple_animal/butterfly
|
||||
name = "butterfly"
|
||||
desc = "A colorful butterfly, how'd it get up here?"
|
||||
icon_state = "butterfly"
|
||||
icon_living = "butterfly"
|
||||
icon_dead = "butterfly_dead"
|
||||
turns_per_move = 1
|
||||
emote_see = list("flutters")
|
||||
response_help = "shoos"
|
||||
response_disarm = "brushes aside"
|
||||
response_harm = "aquashes"
|
||||
speak_chance = 0
|
||||
maxHealth = 2
|
||||
health = 2
|
||||
harm_intent_damage = 1
|
||||
friendly = "nudges"
|
||||
pass_flags = PASSTABLE
|
||||
|
||||
/mob/living/simple_animal/butterfly/New()
|
||||
..()
|
||||
color = rgb(rand(0, 255), rand(0, 255), rand(0, 255))
|
||||
@@ -0,0 +1,42 @@
|
||||
//Corgi //best comment 2014
|
||||
/mob/living/simple_animal/pug
|
||||
name = "\improper pug"
|
||||
real_name = "pug"
|
||||
desc = "It's a pug."
|
||||
icon_state = "pug"
|
||||
icon_living = "pug"
|
||||
icon_dead = "pug_dead"
|
||||
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU")
|
||||
speak_emote = list("barks", "woofs")
|
||||
emote_hear = list("barks!", "woofs!", "yaps.","pants.")
|
||||
emote_see = list("shakes its head.", "chases its tail.","shivers.")
|
||||
speak_chance = 1
|
||||
turns_per_move = 10
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/pug
|
||||
meat_amount = 3
|
||||
response_help = "pets"
|
||||
response_disarm = "bops"
|
||||
response_harm = "kicks"
|
||||
see_in_dark = 5
|
||||
|
||||
/mob/living/simple_animal/pug/Life()
|
||||
..()
|
||||
|
||||
if(!stat && !resting && !buckled)
|
||||
if(prob(1))
|
||||
emote("me", 1, pick("chases its tail."))
|
||||
spawn(0)
|
||||
for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2))
|
||||
dir = i
|
||||
sleep(1)
|
||||
|
||||
/mob/living/simple_animal/pug/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
|
||||
if(istype(O, /obj/item/weapon/newspaper))
|
||||
if(!stat)
|
||||
user.visible_message("<span class='notice'>[user] baps [name] on the nose with the rolled up [O]</span>")
|
||||
spawn(0)
|
||||
for(var/i in list(1,2,4,8,4,2,1,2))
|
||||
dir = i
|
||||
sleep(1)
|
||||
else
|
||||
..()
|
||||
@@ -35,3 +35,7 @@
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat/corgi
|
||||
name = "Corgi meat"
|
||||
desc = "Tastes like... well you know..."
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat/pug
|
||||
name = "Pug meat"
|
||||
desc = "Tastes like... well you know..."
|
||||
Reference in New Issue
Block a user