Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Ghommie-cit28
This commit is contained in:
@@ -29,69 +29,62 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
/client/proc/callproc()
|
||||
set category = "Debug"
|
||||
set name = "Advanced ProcCall"
|
||||
set waitfor = 0
|
||||
set waitfor = FALSE
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
var/datum/target = null
|
||||
var/targetselected = 0
|
||||
var/targetselected = FALSE
|
||||
var/returnval = null
|
||||
|
||||
switch(alert("Proc owned by something?",,"Yes","No"))
|
||||
if("Yes")
|
||||
targetselected = 1
|
||||
var/list/value = vv_get_value(default_class = VV_ATOM_REFERENCE, classes = list(VV_ATOM_REFERENCE, VV_DATUM_REFERENCE, VV_MOB_REFERENCE, VV_CLIENT))
|
||||
if (!value["class"] || !value["value"])
|
||||
return
|
||||
target = value["value"]
|
||||
if("No")
|
||||
target = null
|
||||
targetselected = 0
|
||||
|
||||
var/procname = input("Proc path, eg: /proc/fake_blood","Path:", null) as text|null
|
||||
if(!procname)
|
||||
return
|
||||
|
||||
//hascall() doesn't support proc paths (eg: /proc/gib(), it only supports "gib")
|
||||
var/testname = procname
|
||||
if(targetselected)
|
||||
//Find one of the 3 possible ways they could have written /proc/PROCNAME
|
||||
if(findtext(procname, "/proc/"))
|
||||
testname = replacetext(procname, "/proc/", "")
|
||||
else if(findtext(procname, "/proc"))
|
||||
testname = replacetext(procname, "/proc", "")
|
||||
else if(findtext(procname, "proc/"))
|
||||
testname = replacetext(procname, "proc/", "")
|
||||
//Clear out any parenthesis if they're a dummy
|
||||
testname = replacetext(testname, "()", "")
|
||||
|
||||
if(targetselected && !hascall(target,testname))
|
||||
to_chat(usr, "<font color='red'>Error: callproc(): type [target.type] has no proc named [procname].</font>")
|
||||
return
|
||||
else
|
||||
var/procpath = text2path(procname)
|
||||
if (!procpath)
|
||||
to_chat(usr, "<font color='red'>Error: callproc(): proc [procname] does not exist. (Did you forget the /proc/ part?)</font>")
|
||||
if(alert("Proc owned by something?",,"Yes","No") == "Yes")
|
||||
targetselected = TRUE
|
||||
var/list/value = vv_get_value(default_class = VV_ATOM_REFERENCE, classes = list(VV_ATOM_REFERENCE, VV_DATUM_REFERENCE, VV_MOB_REFERENCE, VV_CLIENT))
|
||||
if (!value["class"] || !value["value"])
|
||||
return
|
||||
target = value["value"]
|
||||
|
||||
var/procpath = input("Proc path, eg: /proc/fake_blood","Path:", null) as text|null
|
||||
if(!procpath)
|
||||
return
|
||||
|
||||
//strip away everything but the proc name
|
||||
var/list/proclist = splittext(procpath, "/")
|
||||
if (!length(proclist))
|
||||
return
|
||||
|
||||
var/procname = proclist[proclist.len]
|
||||
var/proctype = ("verb" in proclist) ? "verb" :"proc"
|
||||
|
||||
if(targetselected)
|
||||
if(!hascall(target, procname))
|
||||
to_chat(usr, "<span class='warning'>Error: callproc(): type [target.type] has no [proctype] named [procpath].</span>")
|
||||
return
|
||||
else
|
||||
procpath = "/[proctype]/[procname]"
|
||||
if(!text2path(procpath))
|
||||
to_chat(usr, "<span class='warning'>Error: callproc(): [procpath] does not exist.</span>")
|
||||
return
|
||||
|
||||
var/list/lst = get_callproc_args()
|
||||
if(!lst)
|
||||
return
|
||||
|
||||
if(targetselected)
|
||||
if(!target)
|
||||
to_chat(usr, "<font color='red'>Error: callproc(): owner of proc no longer exists.</font>")
|
||||
to_chat(usr, "<span class='warning'>Error: callproc(): owner of proc no longer exists.</span>")
|
||||
return
|
||||
var/msg = "[key_name(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]."
|
||||
var/msg = "[key_name(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no argument"]."
|
||||
log_admin(msg)
|
||||
message_admins(msg)
|
||||
admin_ticket_log(target, msg)
|
||||
returnval = WrapAdminProcCall(target, procname, lst) // Pass the lst as an argument list to the proc
|
||||
returnval = WrapAdminProcCall(target, procname, lst)
|
||||
else
|
||||
//this currently has no hascall protection. wasn't able to get it working.
|
||||
log_admin("[key_name(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
|
||||
message_admins("[key_name(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
|
||||
returnval = WrapAdminProcCall(GLOBAL_PROC, procname, lst) // Pass the lst as an argument list to the proc
|
||||
var/msg = "[key_name(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no argument"]."
|
||||
log_admin(msg)
|
||||
message_admins(msg)
|
||||
returnval = WrapAdminProcCall(GLOBAL_PROC, procpath, lst) //calling globals needs full qualified name (e.g /proc/foo)
|
||||
. = get_callproc_returnval(returnval, procname)
|
||||
if(.)
|
||||
to_chat(usr, .)
|
||||
@@ -111,8 +104,8 @@ GLOBAL_LIST_EMPTY(AdminProcCallSpamPrevention)
|
||||
GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
|
||||
/proc/WrapAdminProcCall(datum/target, procname, list/arguments)
|
||||
if(target && procname == "Del")
|
||||
to_chat(usr, "Calling Del() is not allowed")
|
||||
if(target != GLOBAL_PROC && procname == "Del")
|
||||
to_chat(usr, "<span class='warning'>Calling Del() is not allowed</span>")
|
||||
return
|
||||
|
||||
if(target != GLOBAL_PROC && !target.CanProcCall(procname))
|
||||
@@ -159,7 +152,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
/client/proc/callproc_datum(datum/A as null|area|mob|obj|turf)
|
||||
set category = "Debug"
|
||||
set name = "Atom ProcCall"
|
||||
set waitfor = 0
|
||||
set waitfor = FALSE
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
@@ -168,7 +161,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
if(!procname)
|
||||
return
|
||||
if(!hascall(A,procname))
|
||||
to_chat(usr, "<font color='red'>Error: callproc_datum(): type [A.type] has no proc named [procname].</font>")
|
||||
to_chat(usr, "<span class='warning'>Error: callproc_datum(): type [A.type] has no proc named [procname].</span>")
|
||||
return
|
||||
var/list/lst = get_callproc_args()
|
||||
if(!lst)
|
||||
@@ -177,8 +170,8 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
if(!A || !IsValidSrc(A))
|
||||
to_chat(usr, "<span class='warning'>Error: callproc_datum(): owner of proc no longer exists.</span>")
|
||||
return
|
||||
log_admin("[key_name(src)] called [A]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
|
||||
var/msg = "[key_name(src)] called [A]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]."
|
||||
log_admin(msg)
|
||||
message_admins(msg)
|
||||
admin_ticket_log(A, msg)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Atom ProcCall") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -188,8 +181,6 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
if(.)
|
||||
to_chat(usr, .)
|
||||
|
||||
|
||||
|
||||
/client/proc/get_callproc_args()
|
||||
var/argnum = input("Number of arguments","Number:",0) as num|null
|
||||
if(isnull(argnum))
|
||||
@@ -213,7 +204,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
. = ""
|
||||
if(islist(returnval))
|
||||
var/list/returnedlist = returnval
|
||||
. = "<font color='blue'>"
|
||||
. = "<span class='notice'>"
|
||||
if(returnedlist.len)
|
||||
var/assoc_check = returnedlist[1]
|
||||
if(istext(assoc_check) && (returnedlist[assoc_check] != null))
|
||||
@@ -227,11 +218,10 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
. += "\n[elem]"
|
||||
else
|
||||
. = "[procname] returned an empty list"
|
||||
. += "</font>"
|
||||
. += "</span>"
|
||||
|
||||
else
|
||||
. = "<font color='blue'>[procname] returned: [!isnull(returnval) ? returnval : "null"]</font>"
|
||||
|
||||
. = "<span class='notice'>[procname] returned: [!isnull(returnval) ? returnval : "null"]</span>"
|
||||
|
||||
/client/proc/Cell()
|
||||
set category = "Debug"
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
cross.icon_state = "kingyellow"
|
||||
font_color = "blue"
|
||||
prayer_type = "CHAPLAIN PRAYER"
|
||||
if(SSreligion.deity)
|
||||
deity = SSreligion.deity
|
||||
if(GLOB.deity)
|
||||
deity = GLOB.deity
|
||||
else if(iscultist(usr))
|
||||
cross.icon_state = "tome"
|
||||
font_color = "red"
|
||||
|
||||
@@ -126,8 +126,20 @@
|
||||
if(vest)
|
||||
vest.flip_mode()
|
||||
|
||||
/obj/machinery/abductor/console/proc/SelectDisguise(remote = 0)
|
||||
var/entry_name = input( "Choose Disguise", "Disguise") as null|anything in disguises
|
||||
/obj/machinery/abductor/console/proc/SelectDisguise(remote = FALSE)
|
||||
var/list/disguises2 = list()
|
||||
for(var/name in disguises)
|
||||
var/datum/icon_snapshot/snap = disguises[name]
|
||||
var/image/dummy = image(snap.icon, src, snap.icon_state)
|
||||
dummy.overlays = snap.overlays
|
||||
disguises2[name] = dummy
|
||||
|
||||
var/entry_name
|
||||
if(remote)
|
||||
entry_name = show_radial_menu(usr, camera.eyeobj, disguises2)
|
||||
else
|
||||
entry_name = show_radial_menu(usr, src, disguises2)
|
||||
|
||||
var/datum/icon_snapshot/chosen = disguises[entry_name]
|
||||
if(chosen && vest && (remote || in_range(usr,src)))
|
||||
vest.SetDisguise(chosen)
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/obj/effect/proc_holder/changeling/adrenaline
|
||||
name = "Adrenaline Sacs"
|
||||
desc = "We evolve additional sacs of adrenaline throughout our body."
|
||||
helptext = "Removes all stuns instantly and adds a short-term reduction in further stuns. Can be used while unconscious. Continued use poisons the body."
|
||||
helptext = "Removes all stuns instantly and adds a short-term reduction in further stuns. Can be used while unconscious. Continued use poisons the body. This ability is loud, and might cause our blood to react violently to heat."
|
||||
chemical_cost = 30
|
||||
loudness = 2
|
||||
dna_cost = 2
|
||||
req_human = 1
|
||||
req_stat = UNCONSCIOUS
|
||||
@@ -13,4 +14,4 @@
|
||||
//Recover from stuns.
|
||||
/obj/effect/proc_holder/changeling/adrenaline/sting_action(mob/living/user)
|
||||
user.do_adrenaline(0, FALSE, 70, 0, TRUE, list("epinephrine" = 3, "changelingmeth" = 10, "mannitol" = 10, "regen_jelly" = 10, "changelingadrenaline" = 5), "<span class='notice'>Energy rushes through us.</span>", 0, 0.75, 0)
|
||||
return TRUE
|
||||
return TRUE
|
||||
@@ -29,7 +29,7 @@
|
||||
O.forceMove(get_turf(user))
|
||||
|
||||
user.reagents.add_reagent("mutadone", 10)
|
||||
user.reagents.add_reagent("pen_acid", 20)
|
||||
user.reagents.add_reagent("pen_jelly", 20)
|
||||
user.reagents.add_reagent("antihol", 10)
|
||||
user.reagents.add_reagent("mannitol", 25)
|
||||
|
||||
|
||||
@@ -342,10 +342,7 @@
|
||||
if(cooldown>world.time)
|
||||
to_chat(owner, "<span class='cultbold'>You aren't ready to place another blood mark yet!</span>")
|
||||
return
|
||||
if(owner.orbiting && owner.orbiting.orbiting)
|
||||
target = owner.orbiting.orbiting
|
||||
else
|
||||
target = get_turf(owner)
|
||||
target = owner.orbiting?.parent || get_turf(owner)
|
||||
if(!target)
|
||||
return
|
||||
C.cult_team.blood_target = target
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
visible_message("<span class='warning'>[src] easily breaks out of [p_their()] handcuffs!</span>", \
|
||||
"<span class='notice'>With just a thought your handcuffs fall off.</span>")
|
||||
|
||||
/mob/living/carbon/true_devil/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
|
||||
/mob/living/carbon/true_devil/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
|
||||
if(incapacitated())
|
||||
to_chat(src, "<span class='warning'>You can't do that right now!</span>")
|
||||
return FALSE
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
cached_gases[/datum/gas/oxygen] -= cached_gases[/datum/gas/tritium]
|
||||
|
||||
if(burned_fuel)
|
||||
energy_released += FIRE_HYDROGEN_ENERGY_RELEASED * burned_fuel
|
||||
energy_released += (FIRE_HYDROGEN_ENERGY_RELEASED * burned_fuel)
|
||||
if(location && prob(10) && burned_fuel > TRITIUM_MINIMUM_RADIATION_ENERGY) //woah there let's not crash the server
|
||||
radiation_pulse(location, energy_released/TRITIUM_BURN_RADIOACTIVITY_FACTOR)
|
||||
|
||||
@@ -285,6 +285,7 @@
|
||||
if(do_explosion)
|
||||
explosion(location, 0, 0, 5, power_ratio, TRUE, TRUE) //large shockwave, the actual radius is quite small - people will recognize that you're doing fusion
|
||||
radiation_pulse(location, radiation_power) //You mean causing a super-tier fusion reaction in the halls is a bad idea?
|
||||
SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, 30000)//The science is cool though.
|
||||
playsound(location, 'sound/effects/supermatter.ogg', 100, 0)
|
||||
else
|
||||
playsound(location, 'sound/effects/phasein.ogg', 75, 0)
|
||||
@@ -350,12 +351,20 @@
|
||||
var/old_heat_capacity = air.heat_capacity()
|
||||
var/reaction_efficency = min(1/((pressure/(0.1*ONE_ATMOSPHERE))*(max(cached_gases[/datum/gas/plasma]/cached_gases[/datum/gas/nitrous_oxide],1))),cached_gases[/datum/gas/nitrous_oxide],cached_gases[/datum/gas/plasma]/2)
|
||||
var/energy_released = 2*reaction_efficency*FIRE_CARBON_ENERGY_RELEASED
|
||||
if(cached_gases[/datum/gas/miasma] && cached_gases[/datum/gas/miasma] > 0)
|
||||
energy_released /= cached_gases[/datum/gas/miasma]*0.1
|
||||
if(cached_gases[/datum/gas/bz] && cached_gases[/datum/gas/bz] > 0)
|
||||
energy_released *= cached_gases[/datum/gas/bz]*0.1
|
||||
if ((cached_gases[/datum/gas/nitrous_oxide] - reaction_efficency < 0 )|| (cached_gases[/datum/gas/plasma] - (2*reaction_efficency) < 0)) //Shouldn't produce gas from nothing.
|
||||
return NO_REACTION
|
||||
cached_gases[/datum/gas/bz] += reaction_efficency
|
||||
if(reaction_efficency == cached_gases[/datum/gas/nitrous_oxide])
|
||||
cached_gases[/datum/gas/bz] -= min(pressure,1)
|
||||
cached_gases[/datum/gas/oxygen] += min(pressure,1)
|
||||
cached_gases[/datum/gas/nitrous_oxide] -= reaction_efficency
|
||||
cached_gases[/datum/gas/plasma] -= 2*reaction_efficency
|
||||
|
||||
SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, (reaction_efficency**0.5)*BZ_RESEARCH_AMOUNT)
|
||||
|
||||
if(energy_released > 0)
|
||||
var/new_heat_capacity = air.heat_capacity()
|
||||
@@ -390,6 +399,7 @@
|
||||
cached_gases[/datum/gas/plasma] -= heat_scale
|
||||
cached_gases[/datum/gas/nitryl] -= heat_scale
|
||||
|
||||
SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, STIMULUM_RESEARCH_AMOUNT*max(stim_energy_change,0))
|
||||
if(stim_energy_change)
|
||||
var/new_heat_capacity = air.heat_capacity()
|
||||
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
|
||||
@@ -418,6 +428,7 @@
|
||||
cached_gases[/datum/gas/nitrogen] -= 20*nob_formed
|
||||
cached_gases[/datum/gas/hypernoblium]+= nob_formed
|
||||
|
||||
SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, nob_formed*NOBLIUM_RESEARCH_AMOUNT)
|
||||
|
||||
if (nob_formed)
|
||||
var/new_heat_capacity = air.heat_capacity()
|
||||
@@ -449,3 +460,4 @@
|
||||
|
||||
//Possibly burning a bit of organic matter through maillard reaction, so a *tiny* bit more heat would be understandable
|
||||
air.temperature += cleaned_air * 0.002
|
||||
SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, cleaned_air*MIASMA_RESEARCH_AMOUNT)//Turns out the burning of miasma is kinda interesting to scientists
|
||||
@@ -68,6 +68,7 @@
|
||||
GLOB.poi_list |= src
|
||||
LAZYADD(GLOB.mob_spawners[job_description ? job_description : name], src)
|
||||
|
||||
|
||||
/obj/effect/mob_spawn/Destroy()
|
||||
GLOB.poi_list -= src
|
||||
LAZYREMOVE(GLOB.mob_spawners[job_description ? job_description : name], src)
|
||||
@@ -75,6 +76,9 @@
|
||||
GLOB.mob_spawners -= job_description ? job_description : name
|
||||
return ..()
|
||||
|
||||
/obj/effect/mob_spawn/proc/can_latejoin() //If it can be taken from the lobby.
|
||||
return TRUE
|
||||
|
||||
/obj/effect/mob_spawn/proc/special(mob/M)
|
||||
return
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
var/obj/item/circuitboard/computer/cargo/board = circuit
|
||||
board.contraband = TRUE
|
||||
board.obj_flags |= EMAGGED
|
||||
req_access = list()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/cargo/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
|
||||
@@ -131,6 +131,24 @@
|
||||
unit_name = "security barrier"
|
||||
export_types = list(/obj/item/grenade/barrier, /obj/structure/barricade/security)
|
||||
|
||||
/datum/export/large/gas_canister
|
||||
cost = 10 //Base cost of canister. You get more for nice gases inside.
|
||||
unit_name = "Gas Canister"
|
||||
export_types = list(/obj/machinery/portable_atmospherics/canister)
|
||||
/datum/export/large/gas_canister/get_cost(obj/O)
|
||||
var/obj/machinery/portable_atmospherics/canister/C = O
|
||||
var/worth = 10
|
||||
var/gases = C.air_contents.gases
|
||||
|
||||
worth += gases[/datum/gas/bz]*4
|
||||
worth += gases[/datum/gas/stimulum]*25
|
||||
worth += gases[/datum/gas/hypernoblium]*1000
|
||||
worth += gases[/datum/gas/miasma]*15
|
||||
worth += gases[/datum/gas/tritium]*7
|
||||
worth += gases[/datum/gas/pluoxium]*6
|
||||
worth += gases[/datum/gas/nitryl]*30
|
||||
return worth
|
||||
|
||||
/datum/export/large/odysseus
|
||||
cost = 5500
|
||||
unit_name = "working odysseus"
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
var/obj/item/circuitboard/computer/cargo/board = circuit
|
||||
board.obj_flags |= EMAGGED
|
||||
packin_up()
|
||||
req_access = list()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/cargo/express/proc/packin_up() // oh shit, I'm sorry
|
||||
|
||||
@@ -755,13 +755,24 @@
|
||||
|
||||
/datum/supply_pack/engineering/engihardsuit
|
||||
name = "Engineering Hardsuit"
|
||||
desc = "Poly 'Who stole all the hardsuits!' Well now you can get more hardsuits if needed! NOTE ONE HARDSUIT IS IN THIS CRATE, as well as one air tank and maks!"
|
||||
desc = "Poly 'Who stole all the hardsuits!' Well now you can get more hardsuits if needed! NOTE ONE HARDSUIT IS IN THIS CRATE, as well as one air tank and mask!"
|
||||
cost = 2500
|
||||
contains = list(/obj/item/tank/internals/air,
|
||||
/obj/item/clothing/mask/gas,
|
||||
/obj/item/clothing/suit/space/hardsuit/engine)
|
||||
crate_name = "engineering hardsuit"
|
||||
|
||||
/datum/supply_pack/engineering/atmoshardsuit
|
||||
name = "Atmospherics Hardsuit"
|
||||
desc = "Too many techs and not enough hardsuits? Time to buy some more! Comes with gas mask and air tank. Ask the CE to open."
|
||||
cost = 5000
|
||||
access = ACCESS_CE
|
||||
contains = list(/obj/item/tank/internals/air,
|
||||
/obj/item/clothing/mask/gas,
|
||||
/obj/item/clothing/suit/space/hardsuit/engine/atmos)
|
||||
crate_name = "atmospherics hardsuit"
|
||||
crate_type = /obj/structure/closet/crate/secure/engineering
|
||||
|
||||
/datum/supply_pack/engineering/industrialrcd
|
||||
name = "Industrial RCD"
|
||||
desc = "A industrial RCD in case the station has gone through more then one meteor storm and the CE needs to bring out the somthing a bit more reliable. Dose not contain spare ammo for the industrial RCD or any other RCD modles."
|
||||
@@ -1146,7 +1157,7 @@
|
||||
/datum/supply_pack/materials/bz
|
||||
name = "BZ Canister Crate"
|
||||
desc = "Contains a canister of BZ. Requires Toxins access to open."
|
||||
cost = 5000
|
||||
cost = 7500 // Costs 3 credits more than what you can get for selling it.
|
||||
access = ACCESS_TOX_STORAGE
|
||||
contains = list(/obj/machinery/portable_atmospherics/canister/bz)
|
||||
crate_name = "BZ canister crate"
|
||||
@@ -1949,6 +1960,17 @@
|
||||
crate_name = "hydroponics backpack crate"
|
||||
crate_type = /obj/structure/closet/crate/secure
|
||||
|
||||
/datum/supply_pack/organic/mre
|
||||
name = "MRE supply kit (emergency rations)"
|
||||
desc = "The lights are out. Oxygen's running low. You've run out of food except space weevils. Don't let this be you! Order our NT branded MRE kits today! This pack contains 5 MRE packs with a randomized menu and an oxygen tank."
|
||||
cost = 2000
|
||||
contains = list(/obj/item/storage/box/mre/menu1/safe,
|
||||
/obj/item/storage/box/mre/menu1/safe,
|
||||
/obj/item/storage/box/mre/menu2/safe,
|
||||
/obj/item/storage/box/mre/menu2/safe,
|
||||
/obj/item/storage/box/mre/menu3)
|
||||
crate_name = "MRE crate (emergency rations)"
|
||||
|
||||
/datum/supply_pack/organic/pizza
|
||||
name = "Pizza Crate"
|
||||
desc = "Best prices on this side of the galaxy. All deliveries are guaranteed to be 99% anomaly-free!"
|
||||
@@ -2241,7 +2263,8 @@
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_shadyjims,
|
||||
/obj/item/clothing/mask/gas/syndicate,
|
||||
/obj/item/clothing/neck/necklace/dope,
|
||||
/obj/item/vending_refill/donksoft)
|
||||
/obj/item/vending_refill/donksoft,
|
||||
/obj/item/circuitboard/computer/arcade/amputation)
|
||||
crate_name = "crate"
|
||||
|
||||
/datum/supply_pack/costumes_toys/foamforce
|
||||
|
||||
@@ -467,6 +467,24 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
"stamp-law" = 'icons/stamp_icons/large_stamp-law.png'
|
||||
)
|
||||
|
||||
/datum/asset/spritesheet/simple/minesweeper
|
||||
name = "minesweeper"
|
||||
assets = list(
|
||||
"1" = 'icons/misc/minesweeper_tiles/one.png',
|
||||
"2" = 'icons/misc/minesweeper_tiles/two.png',
|
||||
"3" = 'icons/misc/minesweeper_tiles/three.png',
|
||||
"4" = 'icons/misc/minesweeper_tiles/four.png',
|
||||
"5" = 'icons/misc/minesweeper_tiles/five.png',
|
||||
"6" = 'icons/misc/minesweeper_tiles/six.png',
|
||||
"7" = 'icons/misc/minesweeper_tiles/seven.png',
|
||||
"8" = 'icons/misc/minesweeper_tiles/eight.png',
|
||||
"empty" = 'icons/misc/minesweeper_tiles/empty.png',
|
||||
"flag" = 'icons/misc/minesweeper_tiles/flag.png',
|
||||
"hidden" = 'icons/misc/minesweeper_tiles/hidden.png',
|
||||
"mine" = 'icons/misc/minesweeper_tiles/mine.png',
|
||||
"minehit" = 'icons/misc/minesweeper_tiles/minehit.png'
|
||||
)
|
||||
|
||||
/datum/asset/simple/IRV
|
||||
assets = list(
|
||||
"jquery-ui.custom-core-widgit-mouse-sortable-min.js" = 'html/IRV/jquery-ui.custom-core-widgit-mouse-sortable-min.js',
|
||||
|
||||
@@ -59,6 +59,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/preferred_map = null
|
||||
var/pda_style = MONO
|
||||
var/pda_color = "#808000"
|
||||
var/pda_skin = PDA_SKIN_ALT
|
||||
|
||||
var/uses_glasses_colour = 0
|
||||
|
||||
@@ -685,48 +686,48 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
else
|
||||
if(pref_species.use_skintones)
|
||||
dat += "<b>Genitals use skintone:</b><a href='?_src_=prefs;preference=genital_colour'>[features["genitals_use_skintone"] == TRUE ? "Yes" : "No"]</a>"
|
||||
dat += "<b>Has Penis:</b>"
|
||||
dat += "<h3>Penis</h3>"
|
||||
dat += "<a style='display:block;width:50px' href='?_src_=prefs;preference=has_cock'>[features["has_cock"] == TRUE ? "Yes" : "No"]</a>"
|
||||
if(features["has_cock"] == TRUE)
|
||||
if(features["has_cock"])
|
||||
if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE)
|
||||
dat += "<b>Penis Color:</b>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[skintone2hex(skin_tone)];'> </span>(Skin tone overriding)<br>"
|
||||
dat += "<b>Penis Color:</b></a><BR>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[skintone2hex(skin_tone)];'> </span>(Skin tone overriding)</a><br>"
|
||||
else
|
||||
dat += "<b>Penis Color:</b>"
|
||||
dat += "<b>Penis Color:</b></a><BR>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[features["cock_color"]];'> </span> <a href='?_src_=prefs;preference=cock_color;task=input'>Change</a><br>"
|
||||
dat += "<b>Penis Shape:</b> <a style='display:block;width:120px' href='?_src_=prefs;preference=cock_shape;task=input'>[features["cock_shape"]]</a>"
|
||||
dat += "<b>Penis Length:</b> <a style='display:block;width:120px' href='?_src_=prefs;preference=cock_length;task=input'>[features["cock_length"]] inch(es)</a>"
|
||||
dat += "<b>Has Testicles:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=has_balls'>[features["has_balls"] == TRUE ? "Yes" : "No"]</a>"
|
||||
if(features["has_balls"] == TRUE)
|
||||
if(features["has_balls"])
|
||||
if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE)
|
||||
dat += "<b>Testicles Color:</b>"
|
||||
dat += "<b>Testicles Color:</b></a><BR>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[skintone2hex(skin_tone)];'> </span>(Skin tone overriding)<br>"
|
||||
else
|
||||
dat += "<b>Testicles Color:</b>"
|
||||
dat += "<b>Testicles Color:</b></a><BR>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[features["balls_color"]];'> </span> <a href='?_src_=prefs;preference=balls_color;task=input'>Change</a><br>"
|
||||
dat += "<b>Testicles showing:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=balls_shape;task=input'>[features["balls_shape"]]</a>"
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
dat += "<b>Has Vagina:</b>"
|
||||
dat += "<h3>Vagina</h3>"
|
||||
dat += "<a style='display:block;width:50px' href='?_src_=prefs;preference=has_vag'>[features["has_vag"] == TRUE ? "Yes" : "No"]</a>"
|
||||
if(features["has_vag"])
|
||||
dat += "<b>Vagina Type:</b> <a style='display:block;width:100px' href='?_src_=prefs;preference=vag_shape;task=input'>[features["vag_shape"]]</a>"
|
||||
if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE)
|
||||
dat += "<b>Vagina Color:</b>"
|
||||
dat += "<b>Vagina Color:</b></a><BR>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[skintone2hex(skin_tone)];'> </span>(Skin tone overriding)<br>"
|
||||
else
|
||||
dat += "<b>Vagina Color:</b>"
|
||||
dat += "<b>Vagina Color:</b></a><BR>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[features["vag_color"]];'> </span> <a href='?_src_=prefs;preference=vag_color;task=input'>Change</a><br>"
|
||||
dat += "<b>Has Womb:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=has_womb'>[features["has_womb"] == TRUE ? "Yes" : "No"]</a>"
|
||||
dat += "</td>"
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
dat += "<b>Has Breasts:</b>"
|
||||
dat += "<h3>Breasts</h3>"
|
||||
dat += "<a style='display:block;width:50px' href='?_src_=prefs;preference=has_breasts'>[features["has_breasts"] == TRUE ? "Yes" : "No"]</a>"
|
||||
if(features["has_breasts"])
|
||||
if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE)
|
||||
dat += "<b>Color:</b>"
|
||||
dat += "<b>Color:</b></a><BR>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[skintone2hex(skin_tone)];'> </span>(Skin tone overriding)<br>"
|
||||
else
|
||||
dat += "<b>Color:</b>"
|
||||
dat += "<b>Color:</b></a><BR>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[features["breasts_color"]];'> </span> <a href='?_src_=prefs;preference=breasts_color;task=input'>Change</a><br>"
|
||||
dat += "<b>Cup Size:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=breasts_size;task=input'>[features["breasts_size"]]</a>"
|
||||
dat += "<b>Breast Shape:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=breasts_shape;task=input'>[features["breasts_shape"]]</a>"
|
||||
@@ -746,6 +747,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<br>"
|
||||
dat += "<b>PDA Color:</b> <span style='border:1px solid #161616; background-color: [pda_color];'> </span> <a href='?_src_=prefs;preference=pda_color;task=input'>Change</a><BR>"
|
||||
dat += "<b>PDA Style:</b> <a href='?_src_=prefs;task=input;preference=pda_style'>[pda_style]</a><br>"
|
||||
dat += "<b>PDA Reskin:</b> <a href='?_src_=prefs;task=input;preference=pda_skin'>[pda_skin]</a><br>"
|
||||
dat += "<br>"
|
||||
dat += "<b>Ghost Ears:</b> <a href='?_src_=prefs;preference=ghost_ears'>[(chat_toggles & CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]</a><br>"
|
||||
dat += "<b>Ghost Radio:</b> <a href='?_src_=prefs;preference=ghost_radio'>[(chat_toggles & CHAT_GHOSTRADIO) ? "All Messages":"No Messages"]</a><br>"
|
||||
@@ -1986,6 +1988,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/pickedPDAColor = input(user, "Choose your PDA Interface color.", "Character Preference",pda_color) as color|null
|
||||
if(pickedPDAColor)
|
||||
pda_color = pickedPDAColor
|
||||
if("pda_skin")
|
||||
var/pickedPDASkin = input(user, "Choose your PDA reskin.", "Character Preference", pda_skin) as null|anything in GLOB.pda_reskins
|
||||
if(pickedPDASkin)
|
||||
pda_skin = pickedPDASkin
|
||||
|
||||
else
|
||||
switch(href_list["preference"])
|
||||
@@ -1996,6 +2002,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
arousable = !arousable
|
||||
if("has_cock")
|
||||
features["has_cock"] = !features["has_cock"]
|
||||
if(features["has_cock"] == FALSE)
|
||||
features["has_balls"] = FALSE
|
||||
if("has_balls")
|
||||
features["has_balls"] = !features["has_balls"]
|
||||
if("has_ovi")
|
||||
@@ -2010,6 +2018,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
features["has_breasts"] = !features["has_breasts"]
|
||||
if("has_vag")
|
||||
features["has_vag"] = !features["has_vag"]
|
||||
if(features["has_vag"] == FALSE)
|
||||
features["has_womb"] = FALSE
|
||||
if("has_womb")
|
||||
features["has_womb"] = !features["has_womb"]
|
||||
if("exhibitionist")
|
||||
@@ -2236,8 +2246,11 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
character.hair_style = hair_style
|
||||
character.facial_hair_style = facial_hair_style
|
||||
character.underwear = underwear
|
||||
character.saved_underwear = underwear
|
||||
character.undershirt = undershirt
|
||||
character.saved_undershirt = undershirt
|
||||
character.socks = socks
|
||||
character.saved_socks = socks
|
||||
|
||||
character.backbag = backbag
|
||||
|
||||
|
||||
@@ -108,6 +108,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["tip_delay"] >> tip_delay
|
||||
S["pda_style"] >> pda_style
|
||||
S["pda_color"] >> pda_color
|
||||
S["pda_skin"] >> pda_skin
|
||||
|
||||
//citadel code
|
||||
S["arousable"] >> arousable
|
||||
@@ -144,6 +145,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
be_special = SANITIZE_LIST(be_special)
|
||||
pda_style = sanitize_inlist(pda_style, GLOB.pda_styles, initial(pda_style))
|
||||
pda_color = sanitize_hexcolor(pda_color, 6, 1, initial(pda_color))
|
||||
pda_skin = sanitize_inlist(pda_skin, GLOB.pda_reskins, PDA_SKIN_ALT)
|
||||
|
||||
screenshake = sanitize_integer(screenshake, 0, 800, initial(screenshake))
|
||||
damagescreenshake = sanitize_integer(damagescreenshake, 0, 2, initial(damagescreenshake))
|
||||
|
||||
@@ -226,6 +226,19 @@
|
||||
CL.flags_cover = initial(PCL.flags_cover)
|
||||
target.icon = initial(picked_item.icon)
|
||||
|
||||
/datum/action/item_action/chameleon/change/pda/update_item(obj/item/pda/picked_item)
|
||||
if(!istype(target, /obj/item/pda))
|
||||
return ..()
|
||||
var/obj/item/pda/P = target
|
||||
P.name = initial(picked_item.name)
|
||||
P.desc = initial(picked_item.desc)
|
||||
P.icon_state = initial(picked_item.icon_state)
|
||||
P.item_state = initial(picked_item.item_state)
|
||||
P.item_color = initial(picked_item.item_color)
|
||||
P.overlays_offsets = initial(picked_item.overlays_offsets)
|
||||
P.set_new_overlays()
|
||||
P.update_icon()
|
||||
|
||||
/datum/action/item_action/chameleon/change/Trigger()
|
||||
if(!IsAvailable())
|
||||
return
|
||||
@@ -584,7 +597,7 @@
|
||||
|
||||
/obj/item/pda/chameleon
|
||||
name = "PDA"
|
||||
var/datum/action/item_action/chameleon/change/chameleon_action
|
||||
var/datum/action/item_action/chameleon/change/pda/chameleon_action
|
||||
|
||||
/obj/item/pda/chameleon/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -216,6 +216,34 @@ BLIND // can't see anything
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/clothing/under/CtrlClick(mob/user)
|
||||
. = ..()
|
||||
|
||||
if (!(item_flags & IN_INVENTORY))
|
||||
return
|
||||
|
||||
if(!isliving(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
|
||||
if(has_sensor == LOCKED_SENSORS)
|
||||
to_chat(user, "The controls are locked.")
|
||||
return
|
||||
if(has_sensor == BROKEN_SENSORS)
|
||||
to_chat(user, "The sensors have shorted out!")
|
||||
return
|
||||
if(has_sensor <= NO_SENSORS)
|
||||
to_chat(user, "This suit does not have any sensors.")
|
||||
return
|
||||
|
||||
sensor_mode = SENSOR_COORDS
|
||||
|
||||
to_chat(user, "<span class='notice'>Your suit will now report your exact vital lifesigns as well as your coordinate position.</span>")
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.w_uniform == src)
|
||||
H.update_suit_sensors()
|
||||
|
||||
/obj/item/clothing/under/AltClick(mob/user)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
desc = "A pair of snazzy goggles used to protect against chemical spills. Fitted with an analyzer for scanning items and reagents."
|
||||
icon_state = "purple"
|
||||
item_state = "glasses"
|
||||
scan_reagents = 1 //You can see reagents while wearing science goggles
|
||||
scan_reagents = TRUE //You can see reagents while wearing science goggles
|
||||
actions_types = list(/datum/action/item_action/toggle_research_scanner)
|
||||
glass_colour_type = /datum/client_colour/glass_colour/purple
|
||||
resistance_flags = ACID_PROOF
|
||||
@@ -202,7 +202,7 @@
|
||||
/obj/item/clothing/glasses/sunglasses/reagent
|
||||
name = "beer goggles"
|
||||
desc = "A pair of sunglasses outfitted with apparatus to scan reagents."
|
||||
scan_reagents = 1
|
||||
scan_reagents = TRUE
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/garb
|
||||
name = "black gar glasses"
|
||||
@@ -377,7 +377,7 @@
|
||||
item_state = "godeye"
|
||||
vision_flags = SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
darkness_view = 8
|
||||
scan_reagents = 1
|
||||
scan_reagents = TRUE
|
||||
item_flags = NODROP
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
resistance_flags = LAVA_PROOF | FIRE_PROOF
|
||||
|
||||
@@ -445,7 +445,7 @@
|
||||
flash_protect = 0
|
||||
armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 10, "bio" = 100, "rad" = 60, "fire" = 60, "acid" = 75)
|
||||
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR
|
||||
scan_reagents = 1
|
||||
scan_reagents = TRUE
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/medical
|
||||
icon_state = "hardsuit-medical"
|
||||
@@ -467,7 +467,7 @@
|
||||
max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT
|
||||
armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 100, "bio" = 100, "rad" = 60, "fire" = 60, "acid" = 80)
|
||||
var/obj/machinery/doppler_array/integrated/bomb_radar
|
||||
scan_reagents = 1
|
||||
scan_reagents = TRUE
|
||||
actions_types = list(/datum/action/item_action/toggle_helmet_light, /datum/action/item_action/toggle_research_scanner)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/rd/Initialize()
|
||||
@@ -626,7 +626,7 @@
|
||||
item_state = "anc_hardsuit"
|
||||
armor = list("melee" = 10, "bullet" = 5, "laser" = 5, "energy" = 500, "bomb" = 500, "bio" = 500, "rad" = 500, "fire" = 500, "acid" = 500)
|
||||
slowdown = 6 //Slow
|
||||
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/storage, /obj/item/construction/rcd, /obj/item/pipe_dispenser)
|
||||
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/storage, /obj/item/construction/rcd, /obj/item/pipe_dispenser)
|
||||
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/ancient/mason
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
@@ -639,7 +639,7 @@
|
||||
armor = list("melee" = 10, "bullet" = 5, "laser" = 5, "energy" = 500, "bomb" = 500, "bio" = 500, "rad" = 500, "fire" = 500, "acid" = 500)
|
||||
item_color = "ancient"
|
||||
brightness_on = 16
|
||||
scan_reagents = 1
|
||||
scan_reagents = TRUE
|
||||
flash_protect = 5 //We will not be flash by bombs
|
||||
tint = 1
|
||||
var/obj/machinery/doppler_array/integrated/bomb_radar
|
||||
|
||||
@@ -58,7 +58,8 @@
|
||||
item_state = "hostrench"
|
||||
flags_inv = 0
|
||||
strip_delay = 80
|
||||
|
||||
unique_reskin = list("Coat" = "hostrench", "Cloak" = "trenchcloak")
|
||||
|
||||
/obj/item/clothing/suit/armor/vest/warden
|
||||
name = "warden's jacket"
|
||||
desc = "A navy-blue armored jacket with blue shoulder designations and '/Warden/' stitched into one of the chest pockets."
|
||||
|
||||
@@ -124,6 +124,9 @@
|
||||
icon_state = "suitjacket_black"
|
||||
item_state = "ro_suit"
|
||||
|
||||
/obj/item/clothing/suit/toggle/lawyer/black/syndie
|
||||
desc = "A snappy dress jacket. Suspiciously has no tags or branding."
|
||||
armor = list("melee" = 10, "bullet" = 10, "laser" = 10, "energy" = 10, "bomb" = 10, "bio" = 10, "rad" = 10, "fire" = 40, "acid" = 40)
|
||||
|
||||
//Mime
|
||||
/obj/item/clothing/suit/suspenders
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -21,7 +21,7 @@
|
||||
CAT_BURGER,
|
||||
CAT_CAKE,
|
||||
CAT_EGG,
|
||||
CAT_SUSHI, //Called Fish
|
||||
CAT_FISH,
|
||||
CAT_ICE, //Called Frozen
|
||||
CAT_MEAT,
|
||||
CAT_MISCFOOD,
|
||||
|
||||
@@ -365,28 +365,6 @@
|
||||
parts = list(/obj/item/camera = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/lizardhat
|
||||
name = "Lizard Cloche Hat"
|
||||
result = /obj/item/clothing/head/lizard
|
||||
time = 10
|
||||
reqs = list(/obj/item/organ/tail/lizard = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/lizardhat_alternate
|
||||
name = "Lizard Cloche Hat"
|
||||
result = /obj/item/clothing/head/lizard
|
||||
time = 10
|
||||
reqs = list(/obj/item/stack/sheet/animalhide/lizard = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/kittyears
|
||||
name = "Kitty Ears"
|
||||
result = /obj/item/clothing/head/kitty/genuine
|
||||
time = 10
|
||||
reqs = list(/obj/item/organ/tail/cat = 1,
|
||||
/obj/item/organ/ears/cat = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/skateboard
|
||||
name = "Skateboard"
|
||||
result = /obj/vehicle/ridden/scooter/skateboard
|
||||
@@ -641,6 +619,15 @@
|
||||
/obj/item/assembly/igniter = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
|
||||
/datum/crafting_recipe/wheelchair
|
||||
name = "Wheelchair"
|
||||
result = /obj/vehicle/ridden/wheelchair
|
||||
reqs = list(/obj/item/stack/sheet/plasteel = 2,
|
||||
/obj/item/stack/rods = 8)
|
||||
time = 100
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/rcl
|
||||
name = "Makeshift Rapid Cable Layer"
|
||||
result = /obj/item/twohanded/rcl/ghetto
|
||||
@@ -672,6 +659,28 @@
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WRENCH, TOOL_WELDER)
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/lizardhat
|
||||
name = "Lizard Cloche Hat"
|
||||
result = /obj/item/clothing/head/lizard
|
||||
time = 10
|
||||
reqs = list(/obj/item/organ/tail/lizard = 1)
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/lizardhat_alternate
|
||||
name = "Lizard Cloche Hat"
|
||||
result = /obj/item/clothing/head/lizard
|
||||
time = 10
|
||||
reqs = list(/obj/item/stack/sheet/animalhide/lizard = 1)
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/kittyears
|
||||
name = "Kitty Ears"
|
||||
result = /obj/item/clothing/head/kitty/genuine
|
||||
time = 10
|
||||
reqs = list(/obj/item/organ/tail/cat = 1,
|
||||
/obj/item/organ/ears/cat = 1)
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/hudsunsec
|
||||
name = "Security HUDsunglasses"
|
||||
result = /obj/item/clothing/glasses/hud/security/sunglasses
|
||||
@@ -781,3 +790,36 @@
|
||||
/datum/reagent/water = 15)
|
||||
time = 40
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/smartdart
|
||||
name = "Medical smartdart"
|
||||
result = /obj/item/reagent_containers/syringe/dart
|
||||
reqs = list(/obj/item/stack/sheet/metal = 1,
|
||||
/obj/item/stack/sheet/glass = 1,
|
||||
/obj/item/stack/sheet/plastic = 1)
|
||||
time = 10
|
||||
category = CAT_WEAPONRY
|
||||
subcategory = CAT_AMMO
|
||||
|
||||
/datum/crafting_recipe/medolier
|
||||
name = "Medolier"
|
||||
result = /obj/item/storage/belt/medolier
|
||||
reqs = list(/obj/item/stack/sheet/metal = 2,
|
||||
/obj/item/stack/sheet/cloth = 3,
|
||||
/obj/item/stack/sheet/plastic = 4)
|
||||
time = 30
|
||||
category = CAT_WEAPONRY
|
||||
subcategory = CAT_AMMO
|
||||
|
||||
/datum/crafting_recipe/smartdartgun
|
||||
name = "Smart dartgun"
|
||||
result = /obj/item/gun/syringe/dart
|
||||
reqs = list(/obj/item/stack/sheet/metal = 15,
|
||||
/obj/item/stack/sheet/glass = 10,
|
||||
/obj/item/tank/internals = 1,
|
||||
/obj/item/reagent_containers/glass/beaker = 1,
|
||||
/obj/item/stack/sheet/plastic = 10,
|
||||
/obj/item/stack/cable_coil = 2)
|
||||
time = 150 //It's a gun
|
||||
category = CAT_WEAPONRY
|
||||
subcategory = CAT_WEAPON
|
||||
|
||||
@@ -204,6 +204,14 @@
|
||||
resistance_flags = FREEZE_PROOF
|
||||
isGlass = FALSE
|
||||
|
||||
//Used by MREs
|
||||
/obj/item/reagent_containers/food/drinks/coffee/type2
|
||||
name = "\improper Coffee, instant (type 2)"
|
||||
desc = "Coffee that's been blow dried into a granulated powder. This packet includes self heating water for your nutritional pleasure."
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "condi_cornoil"
|
||||
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/ice
|
||||
name = "ice cup"
|
||||
desc = "Careful, cold ice, do not chew."
|
||||
|
||||
@@ -291,19 +291,23 @@ All foods are distributed among various categories. Use common sense.
|
||||
S.reagents.add_reagent(r_id, amount)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/microwave_act(obj/machinery/microwave/M)
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/item/result
|
||||
if(cooked_type)
|
||||
var/obj/item/reagent_containers/food/snacks/S = new cooked_type(get_turf(src))
|
||||
if(M)
|
||||
initialize_cooked_food(S, M.efficiency)
|
||||
result = new cooked_type(T)
|
||||
if(istype(M))
|
||||
initialize_cooked_food(result, M.efficiency)
|
||||
else
|
||||
initialize_cooked_food(S, 1)
|
||||
SSblackbox.record_feedback("tally", "food_made", 1, type)
|
||||
initialize_cooked_food(result, 1)
|
||||
SSblackbox.record_feedback("tally", "food_made", 1, result.type)
|
||||
else
|
||||
new /obj/item/reagent_containers/food/snacks/badrecipe(src)
|
||||
if(M && M.dirty < 100)
|
||||
result = new /obj/item/reagent_containers/food/snacks/badrecipe(T)
|
||||
if(istype(M) && M.dirty < 100)
|
||||
M.dirty++
|
||||
qdel(src)
|
||||
|
||||
return result
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/Destroy()
|
||||
if(contents)
|
||||
for(var/atom/movable/something in contents)
|
||||
|
||||
@@ -225,3 +225,12 @@
|
||||
filling_color = "#FFFFFF"
|
||||
foodtype = GRAIN | VEGETABLES
|
||||
|
||||
|
||||
// Used by MREs
|
||||
/obj/item/reagent_containers/food/snacks/pizzaslice/pepperoni
|
||||
name = "\improper MRE pepperoni pizza slice"
|
||||
desc = "A freeze dried, dehydrated slice of bread with tomato sauce, pepperoni and cheese."
|
||||
icon_state = "meatpizzaslice"
|
||||
filling_color = "#A52A2A"
|
||||
tastes = list("cardboard" = 1, "tomato" = 1, "cheese" = 1, "pepperoni" = 2)
|
||||
foodtype = GRAIN | VEGETABLES | DAIRY | MEAT
|
||||
@@ -12,322 +12,343 @@
|
||||
pass_flags = PASSTABLE
|
||||
light_color = LIGHT_COLOR_YELLOW
|
||||
light_power = 0.9
|
||||
var/wire_disabled = FALSE // is its internal wire cut?
|
||||
var/operating = FALSE // Is it on?
|
||||
var/dirty = 0 // = {0..100} Does it need cleaning?
|
||||
var/broken = 0 // ={0,1,2} How broken is it???
|
||||
var/max_n_of_items = 10 // whatever fat fuck made this a global var needs to look at themselves in the mirror sometime
|
||||
var/dirty = 0 // 0 to 100 // Does it need cleaning?
|
||||
var/dirty_anim_playing = FALSE
|
||||
var/broken = 0 // 0, 1 or 2 // How broken is it???
|
||||
var/max_n_of_items = 10
|
||||
var/efficiency = 0
|
||||
var/datum/looping_sound/microwave/soundloop
|
||||
var/list/ingredients = list() // may only contain /atom/movables
|
||||
|
||||
//Microwaving doesn't use recipes, instead it calls the microwave_act of the objects. For food, this creates something based on the food's cooked_type
|
||||
var/static/radial_examine = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_examine")
|
||||
var/static/radial_eject = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_eject")
|
||||
var/static/radial_use = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_use")
|
||||
|
||||
/*******************
|
||||
* Initialising
|
||||
********************/
|
||||
// we show the button even if the proc will not work
|
||||
var/static/list/radial_options = list("eject" = radial_eject, "use" = radial_use)
|
||||
var/static/list/ai_radial_options = list("eject" = radial_eject, "use" = radial_use, "examine" = radial_examine)
|
||||
|
||||
/obj/machinery/microwave/Initialize()
|
||||
. = ..()
|
||||
wires = new /datum/wires/microwave(src)
|
||||
create_reagents(100)
|
||||
soundloop = new(list(src), FALSE)
|
||||
|
||||
/obj/machinery/microwave/Destroy()
|
||||
eject()
|
||||
if(wires)
|
||||
QDEL_NULL(wires)
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/microwave/RefreshParts()
|
||||
var/E
|
||||
var/max_items = 10
|
||||
efficiency = 0
|
||||
for(var/obj/item/stock_parts/micro_laser/M in component_parts)
|
||||
E += M.rating
|
||||
efficiency += M.rating
|
||||
for(var/obj/item/stock_parts/matter_bin/M in component_parts)
|
||||
max_items = 10 * M.rating
|
||||
efficiency = E
|
||||
max_n_of_items = max_items
|
||||
max_n_of_items = 10 * M.rating
|
||||
break
|
||||
|
||||
/obj/machinery/microwave/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(!operating)
|
||||
to_chat(user, "<span class='notice'>Alt-click [src] to turn it on.</span>")
|
||||
|
||||
/*******************
|
||||
* Item Adding
|
||||
********************/
|
||||
if(!in_range(user, src) && !issilicon(user) && !isobserver(user))
|
||||
to_chat(user, "<span class='warning'>You're too far away to examine [src]'s contents and display!</span>")
|
||||
return
|
||||
if(operating)
|
||||
to_chat(user, "<span class='notice'>\The [src] is operating.</span>")
|
||||
return
|
||||
|
||||
if(length(ingredients))
|
||||
if(issilicon(user))
|
||||
to_chat(user, "<span class='notice'>\The [src] camera shows:</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>\The [src] contains:</span>")
|
||||
var/list/items_counts = new
|
||||
for(var/i in ingredients)
|
||||
if(istype(i, /obj/item/stack))
|
||||
var/obj/item/stack/S = i
|
||||
items_counts[S.name] += S.amount
|
||||
else
|
||||
var/atom/movable/AM = i
|
||||
items_counts[AM.name]++
|
||||
for(var/O in items_counts)
|
||||
to_chat(user, "<span class='notice'>- [items_counts[O]]x [O].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>\The [src] is empty.</span>")
|
||||
|
||||
if(!(stat & (NOPOWER|BROKEN)))
|
||||
to_chat(user, "<span class='notice'>The status display reads:</span>")
|
||||
to_chat(user, "<span class='notice'>- Capacity: <b>[max_n_of_items]</b> items.<span>")
|
||||
to_chat(user, "<span class='notice'>- Cook time reduced by <b>[(efficiency - 1) * 25]%</b>.<span>")
|
||||
|
||||
/obj/machinery/microwave/update_icon()
|
||||
if(broken)
|
||||
icon_state = "mwb"
|
||||
else if(dirty_anim_playing)
|
||||
icon_state = "mwbloody1"
|
||||
else if(dirty == 100)
|
||||
icon_state = "mwbloody"
|
||||
else if(operating)
|
||||
icon_state = "mw1"
|
||||
else if(panel_open)
|
||||
icon_state = "mw-o"
|
||||
else
|
||||
icon_state = "mw"
|
||||
|
||||
/obj/machinery/microwave/attackby(obj/item/O, mob/user, params)
|
||||
if(operating)
|
||||
return
|
||||
if(!broken && dirty<100)
|
||||
if(default_deconstruction_screwdriver(user, "mw-o", "mw", O))
|
||||
return
|
||||
if(default_unfasten_wrench(user, O))
|
||||
return
|
||||
|
||||
if(default_deconstruction_crowbar(O))
|
||||
return
|
||||
|
||||
if(src.broken > 0)
|
||||
if(src.broken == 2 && istype(O, /obj/item/wirecutters)) // If it's broken and they're using a screwdriver
|
||||
user.visible_message( \
|
||||
"[user] starts to fix part of the microwave.", \
|
||||
"<span class='notice'>You start to fix part of the microwave...</span>" \
|
||||
)
|
||||
if (O.use_tool(src, user, 20))
|
||||
user.visible_message( \
|
||||
"[user] fixes part of the microwave.", \
|
||||
"<span class='notice'>You fix part of the microwave.</span>" \
|
||||
)
|
||||
src.broken = 1 // Fix it a bit
|
||||
else if(src.broken == 1 && istype(O, /obj/item/weldingtool)) // If it's broken and they're doing the wrench
|
||||
user.visible_message( \
|
||||
"[user] starts to fix part of the microwave.", \
|
||||
"<span class='notice'>You start to fix part of the microwave...</span>" \
|
||||
)
|
||||
if (O.use_tool(src, user, 20))
|
||||
user.visible_message( \
|
||||
"[user] fixes the microwave.", \
|
||||
"<span class='notice'>You fix the microwave.</span>" \
|
||||
)
|
||||
src.icon_state = "mw"
|
||||
src.broken = 0 // Fix it!
|
||||
src.dirty = 0 // just to be sure
|
||||
return 0 //to use some fuel
|
||||
if(dirty < 100)
|
||||
if(default_deconstruction_screwdriver(user, icon_state, icon_state, O) || default_unfasten_wrench(user, O))
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(panel_open && is_wire_tool(O))
|
||||
wires.interact(user)
|
||||
return TRUE
|
||||
|
||||
if(broken > 0)
|
||||
if(broken == 2 && O.tool_behaviour == TOOL_WIRECUTTER) // If it's broken and they're using a screwdriver
|
||||
user.visible_message("[user] starts to fix part of \the [src].", "<span class='notice'>You start to fix part of \the [src]...</span>")
|
||||
if(O.use_tool(src, user, 20))
|
||||
user.visible_message("[user] fixes part of \the [src].", "<span class='notice'>You fix part of \the [src].</span>")
|
||||
broken = 1 // Fix it a bit
|
||||
else if(broken == 1 && O.tool_behaviour == TOOL_WELDER) // If it's broken and they're doing the wrench
|
||||
user.visible_message("[user] starts to fix part of \the [src].", "<span class='notice'>You start to fix part of \the [src]...</span>")
|
||||
if(O.use_tool(src, user, 20))
|
||||
user.visible_message("[user] fixes \the [src].", "<span class='notice'>You fix \the [src].</span>")
|
||||
broken = 0
|
||||
update_icon()
|
||||
return FALSE //to use some fuel
|
||||
else
|
||||
to_chat(user, "<span class='warning'>It's broken!</span>")
|
||||
return 1
|
||||
else if(istype(O, /obj/item/reagent_containers/spray/))
|
||||
return TRUE
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/reagent_containers/spray))
|
||||
var/obj/item/reagent_containers/spray/clean_spray = O
|
||||
if(clean_spray.reagents.has_reagent("cleaner",clean_spray.amount_per_transfer_from_this))
|
||||
clean_spray.reagents.remove_reagent("cleaner",clean_spray.amount_per_transfer_from_this,1)
|
||||
if(clean_spray.reagents.has_reagent("cleaner", clean_spray.amount_per_transfer_from_this))
|
||||
clean_spray.reagents.remove_reagent("cleaner", clean_spray.amount_per_transfer_from_this,1)
|
||||
playsound(loc, 'sound/effects/spray3.ogg', 50, 1, -6)
|
||||
user.visible_message( \
|
||||
"[user] has cleaned the microwave.", \
|
||||
"<span class='notice'>You clean the microwave.</span>" \
|
||||
)
|
||||
src.dirty = 0 // It's clean!
|
||||
src.broken = 0 // just to be sure
|
||||
src.icon_state = "mw"
|
||||
src.updateUsrDialog()
|
||||
return 1 // Disables the after-attack so we don't spray the floor/user.
|
||||
user.visible_message("[user] has cleaned \the [src].", "<span class='notice'>You clean \the [src].</span>")
|
||||
dirty = 0
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need more space cleaner!</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
else if(istype(O, /obj/item/soap/)) // If they're trying to clean it then let them
|
||||
if(istype(O, /obj/item/soap))
|
||||
var/obj/item/soap/P = O
|
||||
user.visible_message( \
|
||||
"[user] starts to clean the microwave.", \
|
||||
"<span class='notice'>You start to clean the microwave...</span>" \
|
||||
)
|
||||
if (do_after(user, P.cleanspeed, target = src))
|
||||
user.visible_message( \
|
||||
"[user] has cleaned the microwave.", \
|
||||
"<span class='notice'>You clean the microwave.</span>" \
|
||||
)
|
||||
src.dirty = 0 // It's clean!
|
||||
src.broken = 0 // just to be sure
|
||||
src.icon_state = "mw"
|
||||
user.visible_message("[user] starts to clean \the [src].", "<span class='notice'>You start to clean \the [src]...</span>")
|
||||
if(do_after(user, P.cleanspeed, target = src))
|
||||
user.visible_message("[user] has cleaned \the [src].", "<span class='notice'>You clean \the [src].</span>")
|
||||
dirty = 0
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
else if(src.dirty==100) // The microwave is all dirty so can't be used!
|
||||
to_chat(user, "<span class='warning'>It's dirty!</span>")
|
||||
return 1
|
||||
if(dirty == 100) // The microwave is all dirty so can't be used!
|
||||
to_chat(user, "<span class='warning'>\The [src] is dirty!</span>")
|
||||
return TRUE
|
||||
|
||||
else if(istype(O, /obj/item/storage/bag/tray))
|
||||
if(istype(O, /obj/item/storage/bag/tray))
|
||||
var/obj/item/storage/T = O
|
||||
var/loaded = 0
|
||||
for(var/obj/item/reagent_containers/food/snacks/S in T.contents)
|
||||
if (contents.len>=max_n_of_items)
|
||||
to_chat(user, "<span class='warning'>[src] is full, you can't put anything in!</span>")
|
||||
return 1
|
||||
if(ingredients.len >= max_n_of_items)
|
||||
to_chat(user, "<span class='warning'>\The [src] is full, you can't put anything in!</span>")
|
||||
return TRUE
|
||||
if(SEND_SIGNAL(T, COMSIG_TRY_STORAGE_TAKE, S, src))
|
||||
loaded++
|
||||
|
||||
ingredients += S
|
||||
if(loaded)
|
||||
to_chat(user, "<span class='notice'>You insert [loaded] items into [src].</span>")
|
||||
to_chat(user, "<span class='notice'>You insert [loaded] items into \the [src].</span>")
|
||||
return
|
||||
|
||||
if(O.w_class <= WEIGHT_CLASS_NORMAL && !istype(O, /obj/item/storage) && user.a_intent == INTENT_HELP)
|
||||
if(ingredients.len >= max_n_of_items)
|
||||
to_chat(user, "<span class='warning'>\The [src] is full, you can't put anything in!</span>")
|
||||
return TRUE
|
||||
if(!user.transferItemToLoc(O, src))
|
||||
to_chat(user, "<span class='warning'>\The [O] is stuck to your hand!</span>")
|
||||
return FALSE
|
||||
|
||||
else if(O.w_class <= WEIGHT_CLASS_NORMAL && !istype(O, /obj/item/storage) && user.a_intent == INTENT_HELP)
|
||||
if (contents.len>=max_n_of_items)
|
||||
to_chat(user, "<span class='warning'>[src] is full, you can't put anything in!</span>")
|
||||
return 1
|
||||
else
|
||||
if(!user.transferItemToLoc(O, src))
|
||||
to_chat(user, "<span class='warning'>\the [O] is stuck to your hand, you cannot put it in \the [src]!</span>")
|
||||
return 0
|
||||
ingredients += O
|
||||
user.visible_message("[user] has added \a [O] to \the [src].", "<span class='notice'>You add [O] to \the [src].</span>")
|
||||
return
|
||||
|
||||
user.visible_message( \
|
||||
"[user] has added \the [O] to \the [src].", \
|
||||
"<span class='notice'>You add \the [O] to \the [src].</span>")
|
||||
|
||||
else
|
||||
..()
|
||||
updateUsrDialog()
|
||||
..()
|
||||
|
||||
/obj/machinery/microwave/AltClick(mob/user)
|
||||
if(user.canUseTopic(src, BE_CLOSE) && !(operating || broken > 0 || panel_open || !anchored || dirty == 100))
|
||||
if(user.canUseTopic(src, !issilicon(usr)))
|
||||
cook()
|
||||
|
||||
/*******************
|
||||
* Microwave Menu
|
||||
********************/
|
||||
|
||||
/obj/machinery/microwave/ui_interact(mob/user) // The microwave Menu
|
||||
/obj/machinery/microwave/ui_interact(mob/user)
|
||||
. = ..()
|
||||
if(panel_open || !anchored)
|
||||
|
||||
if(operating || panel_open || !anchored || !user.canUseTopic(src, !issilicon(user)))
|
||||
return
|
||||
if(isAI(user) && (stat & NOPOWER))
|
||||
return
|
||||
var/dat = "<div class='statusDisplay'>"
|
||||
if(broken > 0)
|
||||
dat += "ERROR: 09734014-A2379-D18746 --Bad memory<BR>Contact your operator or use command line to rebase memory ///git checkout {HEAD} -a commit pull --rebase push {*NEW HEAD*}</div>" //Thats how all the git fiddling looks to me
|
||||
else if(operating)
|
||||
dat += "Microwaving in progress!<BR>Please wait...!</div>"
|
||||
else if(dirty==100)
|
||||
dat += "ERROR: >> 0 --Response input zero<BR>Contact your operator of the device manifactor support.</div>"
|
||||
else
|
||||
var/list/items_counts = new
|
||||
for (var/obj/O in contents)
|
||||
if(istype(O, /obj/item/stack/))
|
||||
var/obj/item/stack/S = O
|
||||
items_counts[O.name] += S.amount
|
||||
else
|
||||
items_counts[O.name]++
|
||||
|
||||
for (var/O in items_counts)
|
||||
var/N = items_counts[O]
|
||||
dat += "[capitalize(O)]: [N]<BR>"
|
||||
|
||||
if (items_counts.len==0)
|
||||
dat += "The microwave is empty.</div>"
|
||||
if(!length(ingredients))
|
||||
if(isAI(user))
|
||||
examine(user)
|
||||
else
|
||||
dat = "<h3>Ingredients:</h3>[dat]</div>"
|
||||
dat += "<A href='?src=[REF(src)];action=cook'>Turn on</A>"
|
||||
dat += "<A href='?src=[REF(src)];action=dispose'>Eject ingredients</A><BR>"
|
||||
to_chat(user, "<span class='warning'>\The [src] is empty.</span>")
|
||||
return
|
||||
|
||||
var/datum/browser/popup = new(user, "microwave", name, 300, 300)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
var/choice = show_radial_menu(user, src, isAI(user) ? ai_radial_options : radial_options, require_near = !issilicon(user))
|
||||
|
||||
/***********************************
|
||||
* Microwave Menu Handling/Cooking
|
||||
************************************/
|
||||
// post choice verification
|
||||
if(operating || panel_open || !anchored || !user.canUseTopic(src, !issilicon(user)))
|
||||
return
|
||||
if(isAI(user) && (stat & NOPOWER))
|
||||
return
|
||||
|
||||
usr.set_machine(src)
|
||||
switch(choice)
|
||||
if("eject")
|
||||
eject()
|
||||
if("use")
|
||||
cook()
|
||||
if("examine")
|
||||
examine(user)
|
||||
|
||||
/obj/machinery/microwave/proc/eject()
|
||||
for(var/i in ingredients)
|
||||
var/atom/movable/AM = i
|
||||
AM.forceMove(drop_location())
|
||||
ingredients.Cut()
|
||||
|
||||
/obj/machinery/microwave/proc/cook()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(operating || broken > 0 || panel_open || !anchored || dirty == 100)
|
||||
return
|
||||
|
||||
if(wire_disabled)
|
||||
audible_message("[src] buzzes.")
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
|
||||
return
|
||||
|
||||
if(prob(max((5 / efficiency) - 5, dirty * 5))) //a clean unupgraded microwave has no risk of failure
|
||||
muck()
|
||||
return
|
||||
for(var/obj/O in ingredients)
|
||||
if(istype(O, /obj/item/reagent_containers/food) || istype(O, /obj/item/grown))
|
||||
continue
|
||||
if(prob(min(dirty * 5, 100)))
|
||||
start_can_fail()
|
||||
return
|
||||
break
|
||||
start()
|
||||
|
||||
if (prob(max(5/efficiency-5,dirty*5))) //a clean unupgraded microwave has no risk of failure
|
||||
muck_start()
|
||||
if (!microwaving(4))
|
||||
muck_finish()
|
||||
return
|
||||
muck_finish()
|
||||
return
|
||||
/obj/machinery/microwave/proc/turn_on()
|
||||
visible_message("\The [src] turns on.", "<span class='italics'>You hear a microwave humming.</span>")
|
||||
operating = TRUE
|
||||
|
||||
else
|
||||
if(has_extra_item() && prob(min(dirty*5,100)) && !microwaving(4))
|
||||
broke()
|
||||
return
|
||||
set_light(1.5)
|
||||
soundloop.start()
|
||||
update_icon()
|
||||
|
||||
if(!microwaving(10))
|
||||
abort()
|
||||
return
|
||||
stop()
|
||||
/obj/machinery/microwave/proc/spark()
|
||||
visible_message("<span class='warning'>Sparks fly around [src]!</span>")
|
||||
var/datum/effect_system/spark_spread/s = new
|
||||
s.set_up(2, 1, src)
|
||||
s.start()
|
||||
|
||||
var/metal = 0
|
||||
for(var/obj/item/O in contents)
|
||||
O.microwave_act(src)
|
||||
if(O.materials[MAT_METAL])
|
||||
metal += O.materials[MAT_METAL]
|
||||
|
||||
if(metal)
|
||||
visible_message("<span class='warning'>Sparks fly around [src]!</span>")
|
||||
if(prob(max(metal/2, 33)))
|
||||
explosion(loc,0,1,2)
|
||||
broke()
|
||||
return
|
||||
|
||||
dropContents()
|
||||
return
|
||||
|
||||
/obj/machinery/microwave/proc/microwaving(seconds as num)
|
||||
for (var/i=1 to seconds)
|
||||
if (stat & (NOPOWER|BROKEN))
|
||||
return 0
|
||||
use_power(500)
|
||||
sleep(max(12-2*efficiency,2)) // standard microwave means sleep(10). The better the efficiency, the faster the cooking
|
||||
return 1
|
||||
|
||||
/obj/machinery/microwave/proc/has_extra_item()
|
||||
for (var/obj/O in contents)
|
||||
if ( \
|
||||
!istype(O, /obj/item/reagent_containers/food) && \
|
||||
!istype(O, /obj/item/grown) \
|
||||
)
|
||||
return 1
|
||||
return 0
|
||||
#define MICROWAVE_NORMAL 0
|
||||
#define MICROWAVE_MUCK 1
|
||||
#define MICROWAVE_PRE 2
|
||||
|
||||
/obj/machinery/microwave/proc/start()
|
||||
visible_message("The microwave turns on.", "<span class='italics'>You hear a microwave humming.</span>")
|
||||
soundloop.start()
|
||||
operating = TRUE
|
||||
icon_state = "mw1"
|
||||
set_light(1.5)
|
||||
updateUsrDialog()
|
||||
turn_on()
|
||||
loop(MICROWAVE_NORMAL, 10)
|
||||
|
||||
/obj/machinery/microwave/proc/abort()
|
||||
operating = FALSE // Turn it off again aferwards
|
||||
icon_state = "mw"
|
||||
updateUsrDialog()
|
||||
set_light(0)
|
||||
soundloop.stop()
|
||||
/obj/machinery/microwave/proc/start_can_fail()
|
||||
turn_on()
|
||||
loop(MICROWAVE_PRE, 4)
|
||||
|
||||
/obj/machinery/microwave/proc/stop()
|
||||
abort()
|
||||
/obj/machinery/microwave/proc/muck()
|
||||
turn_on()
|
||||
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1)
|
||||
dirty_anim_playing = TRUE
|
||||
update_icon()
|
||||
loop(MICROWAVE_MUCK, 4)
|
||||
|
||||
/obj/machinery/microwave/proc/dispose()
|
||||
for (var/obj/O in contents)
|
||||
O.forceMove(drop_location())
|
||||
to_chat(usr, "<span class='notice'>You dispose of the microwave contents.</span>")
|
||||
updateUsrDialog()
|
||||
/obj/machinery/microwave/proc/loop(type, time, wait = max(12 - 2 * efficiency, 2)) // standard wait is 10
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(MICROWAVE_PRE)
|
||||
pre_fail()
|
||||
return
|
||||
if(!time)
|
||||
switch(type)
|
||||
if(MICROWAVE_NORMAL)
|
||||
loop_finish()
|
||||
if(MICROWAVE_MUCK)
|
||||
muck_finish()
|
||||
if(MICROWAVE_PRE)
|
||||
pre_success()
|
||||
return
|
||||
time--
|
||||
use_power(500)
|
||||
addtimer(CALLBACK(src, .proc/loop, type, time, wait), wait)
|
||||
|
||||
/obj/machinery/microwave/proc/muck_start()
|
||||
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) // Play a splat sound
|
||||
icon_state = "mwbloody1" // Make it look dirty!!
|
||||
/obj/machinery/microwave/proc/loop_finish()
|
||||
operating = FALSE
|
||||
|
||||
var/metal = 0
|
||||
for(var/obj/item/O in ingredients)
|
||||
O.microwave_act(src)
|
||||
if(O.materials[MAT_METAL])
|
||||
metal += O.materials[MAT_METAL]
|
||||
|
||||
if(metal)
|
||||
spark()
|
||||
broken = 2
|
||||
if(prob(max(metal / 2, 33)))
|
||||
explosion(loc, 0, 1, 2)
|
||||
else
|
||||
dropContents(ingredients)
|
||||
ingredients.Cut()
|
||||
|
||||
after_finish_loop()
|
||||
|
||||
/obj/machinery/microwave/proc/pre_fail()
|
||||
broken = 2
|
||||
operating = FALSE
|
||||
spark()
|
||||
after_finish_loop()
|
||||
|
||||
/obj/machinery/microwave/proc/pre_success()
|
||||
loop(MICROWAVE_NORMAL, 10)
|
||||
|
||||
/obj/machinery/microwave/proc/muck_finish()
|
||||
visible_message("<span class='warning'>The microwave gets covered in muck!</span>")
|
||||
dirty = 100 // Make it dirty so it can't be used util cleaned
|
||||
icon_state = "mwbloody" // Make it look dirty too
|
||||
operating = FALSE // Turn it off again aferwards
|
||||
updateUsrDialog()
|
||||
visible_message("<span class='warning'>\The [src] gets covered in muck!</span>")
|
||||
|
||||
dirty = 100
|
||||
dirty_anim_playing = FALSE
|
||||
operating = FALSE
|
||||
|
||||
for(var/obj/item/reagent_containers/food/snacks/S in src)
|
||||
if(prob(50))
|
||||
new /obj/item/reagent_containers/food/snacks/badrecipe(src)
|
||||
qdel(S)
|
||||
|
||||
after_finish_loop()
|
||||
|
||||
/obj/machinery/microwave/proc/after_finish_loop()
|
||||
set_light(0)
|
||||
soundloop.stop()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/microwave/proc/broke()
|
||||
var/datum/effect_system/spark_spread/s = new
|
||||
s.set_up(2, 1, src)
|
||||
s.start()
|
||||
icon_state = "mwb" // Make it look all busted up and shit
|
||||
visible_message("<span class='warning'>The microwave breaks!</span>") //Let them know they're stupid
|
||||
broken = 2 // Make it broken so it can't be used util fixed
|
||||
flags_1 = null //So you can't add condiments
|
||||
operating = FALSE // Turn it off again aferwards
|
||||
updateUsrDialog()
|
||||
set_light(0)
|
||||
soundloop.stop()
|
||||
|
||||
/obj/machinery/microwave/Topic(href, href_list)
|
||||
if(..() || panel_open)
|
||||
return
|
||||
|
||||
usr.set_machine(src)
|
||||
if(operating)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
switch(href_list["action"])
|
||||
if ("cook")
|
||||
cook()
|
||||
|
||||
if ("dispose")
|
||||
dispose()
|
||||
updateUsrDialog()
|
||||
#undef MICROWAVE_NORMAL
|
||||
#undef MICROWAVE_MUCK
|
||||
#undef MICROWAVE_PRE
|
||||
@@ -15,6 +15,7 @@
|
||||
var/max_n_of_items = 1500
|
||||
var/allow_ai_retrieve = FALSE
|
||||
var/list/initial_contents
|
||||
var/visible_contents = TRUE
|
||||
|
||||
/obj/machinery/smartfridge/Initialize()
|
||||
. = ..()
|
||||
@@ -37,11 +38,21 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/smartfridge/update_icon()
|
||||
var/startstate = initial(icon_state)
|
||||
if(!stat)
|
||||
icon_state = startstate
|
||||
if(visible_contents)
|
||||
switch(contents.len)
|
||||
if(0)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
if(1 to 25)
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
if(26 to 75)
|
||||
icon_state = "[initial(icon_state)]2"
|
||||
if(76 to INFINITY)
|
||||
icon_state = "[initial(icon_state)]3"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else
|
||||
icon_state = "[startstate]-off"
|
||||
icon_state = "[initial(icon_state)]-off"
|
||||
|
||||
|
||||
|
||||
@@ -50,7 +61,14 @@
|
||||
********************/
|
||||
|
||||
/obj/machinery/smartfridge/attackby(obj/item/O, mob/user, params)
|
||||
if(default_deconstruction_screwdriver(user, "smartfridge_open", "smartfridge", O))
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
|
||||
if(default_deconstruction_screwdriver(user, icon_state, icon_state, O))
|
||||
cut_overlays()
|
||||
if(panel_open)
|
||||
add_overlay("[initial(icon_state)]-panel")
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
if(default_pry_open(O))
|
||||
@@ -64,49 +82,46 @@
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
if(!stat)
|
||||
|
||||
if(contents.len >= max_n_of_items)
|
||||
to_chat(user, "<span class='warning'>\The [src] is full!</span>")
|
||||
return FALSE
|
||||
|
||||
if(accept_check(O))
|
||||
load(O)
|
||||
user.visible_message("[user] has added \the [O] to \the [src].", "<span class='notice'>You add \the [O] to \the [src].</span>")
|
||||
updateUsrDialog()
|
||||
return TRUE
|
||||
|
||||
if(istype(O, /obj/item/storage/bag))
|
||||
var/obj/item/storage/P = O
|
||||
var/loaded = 0
|
||||
for(var/obj/G in P.contents)
|
||||
if(contents.len >= max_n_of_items)
|
||||
break
|
||||
if(accept_check(G))
|
||||
load(G)
|
||||
loaded++
|
||||
updateUsrDialog()
|
||||
|
||||
if(loaded)
|
||||
if(contents.len >= max_n_of_items)
|
||||
user.visible_message("[user] loads \the [src] with \the [O].", \
|
||||
"<span class='notice'>You fill \the [src] with \the [O].</span>")
|
||||
else
|
||||
user.visible_message("[user] loads \the [src] with \the [O].", \
|
||||
"<span class='notice'>You load \the [src] with \the [O].</span>")
|
||||
if(O.contents.len > 0)
|
||||
to_chat(user, "<span class='warning'>Some items are refused.</span>")
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>There is nothing in [O] to put in [src]!</span>")
|
||||
return FALSE
|
||||
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
to_chat(user, "<span class='warning'>\The [src] smartly refuses [O].</span>")
|
||||
if(stat)
|
||||
updateUsrDialog()
|
||||
return FALSE
|
||||
else
|
||||
return ..()
|
||||
|
||||
if(contents.len >= max_n_of_items)
|
||||
to_chat(user, "<span class='warning'>\The [src] is full!</span>")
|
||||
return FALSE
|
||||
|
||||
if(accept_check(O))
|
||||
load(O)
|
||||
user.visible_message("[user] has added \the [O] to \the [src].", "<span class='notice'>You add \the [O] to \the [src].</span>")
|
||||
updateUsrDialog()
|
||||
if (visible_contents)
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
if(istype(O, /obj/item/storage/bag))
|
||||
var/obj/item/storage/P = O
|
||||
var/loaded = 0
|
||||
for(var/obj/G in P.contents)
|
||||
if(contents.len >= max_n_of_items)
|
||||
break
|
||||
if(accept_check(G))
|
||||
load(G)
|
||||
loaded++
|
||||
updateUsrDialog()
|
||||
|
||||
if(loaded)
|
||||
user.visible_message("[user] loads \the [src] with \the [O].", \
|
||||
"<span class='notice'>You [contents.len >= max_n_of_items ? "fill" : "load"] \the [src] with \the [O].</span>")
|
||||
if(O.contents.len > 0)
|
||||
to_chat(user, "<span class='warning'>Some items are refused.</span>")
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>There is nothing in [O] to put in [src]!</span>")
|
||||
return FALSE
|
||||
|
||||
to_chat(user, "<span class='warning'>\The [src] smartly refuses [O].</span>")
|
||||
updateUsrDialog()
|
||||
return FALSE
|
||||
|
||||
|
||||
|
||||
@@ -186,6 +201,8 @@
|
||||
O.forceMove(drop_location())
|
||||
adjust_item_drop_location(O)
|
||||
break
|
||||
if (visible_contents)
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
for(var/obj/item/O in src)
|
||||
@@ -195,6 +212,8 @@
|
||||
O.forceMove(drop_location())
|
||||
adjust_item_drop_location(O)
|
||||
desired--
|
||||
if (visible_contents)
|
||||
update_icon()
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -210,6 +229,7 @@
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 200
|
||||
visible_contents = FALSE
|
||||
var/drying = FALSE
|
||||
|
||||
/obj/machinery/smartfridge/drying_rack/Initialize()
|
||||
@@ -414,6 +434,7 @@
|
||||
name = "disk compartmentalizer"
|
||||
desc = "A machine capable of storing a variety of disks. Denoted by most as the DSU (disk storage unit)."
|
||||
icon_state = "disktoaster"
|
||||
visible_contents = FALSE
|
||||
pass_flags = PASSTABLE
|
||||
|
||||
/obj/machinery/smartfridge/disks/accept_check(obj/item/O)
|
||||
|
||||
@@ -332,6 +332,12 @@
|
||||
/obj/item/pizzabox/infinite/proc/attune_pizza(mob/living/carbon/human/noms) //tonight on "proc names I never thought I'd type"
|
||||
if(!pizza_preferences[noms.ckey])
|
||||
pizza_preferences[noms.ckey] = pickweight(pizza_types)
|
||||
if(noms.has_quirk(/datum/quirk/pineapple_liker))
|
||||
pizza_preferences[noms.ckey] = /obj/item/reagent_containers/food/snacks/pizza/pineapple
|
||||
else if(noms.has_quirk(/datum/quirk/pineapple_hater))
|
||||
var/list/pineapple_pizza_liker = pizza_types.Copy()
|
||||
pineapple_pizza_liker -= /obj/item/reagent_containers/food/snacks/pizza/pineapple
|
||||
pizza_preferences[noms.ckey] = pickweight(pineapple_pizza_liker)
|
||||
if(noms.mind && noms.mind.assigned_role == "Botanist")
|
||||
pizza_preferences[noms.ckey] = /obj/item/reagent_containers/food/snacks/pizza/dank
|
||||
|
||||
|
||||
@@ -38,37 +38,6 @@
|
||||
|
||||
// see code/module/crafting/table.dm
|
||||
|
||||
////////////////////////////////////////////////FISH////////////////////////////////////////////////
|
||||
|
||||
/datum/crafting_recipe/food/cubancarp
|
||||
name = "Cuban carp"
|
||||
reqs = list(
|
||||
/datum/reagent/consumable/flour = 5,
|
||||
/obj/item/reagent_containers/food/snacks/grown/chili = 1,
|
||||
/obj/item/reagent_containers/food/snacks/carpmeat = 1
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/cubancarp
|
||||
subcategory = CAT_MEAT
|
||||
|
||||
/datum/crafting_recipe/food/fishandchips
|
||||
name = "Fish and chips"
|
||||
reqs = list(
|
||||
/obj/item/reagent_containers/food/snacks/fries = 1,
|
||||
/obj/item/reagent_containers/food/snacks/carpmeat = 1
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/fishandchips
|
||||
subcategory = CAT_MEAT
|
||||
|
||||
/datum/crafting_recipe/food/fishfingers
|
||||
name = "Fish fingers"
|
||||
reqs = list(
|
||||
/datum/reagent/consumable/flour = 5,
|
||||
/obj/item/reagent_containers/food/snacks/bun = 1,
|
||||
/obj/item/reagent_containers/food/snacks/carpmeat = 1
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/fishfingers
|
||||
subcategory = CAT_MEAT
|
||||
|
||||
////////////////////////////////////////////////MR SPIDER////////////////////////////////////////////////
|
||||
|
||||
/datum/crafting_recipe/food/spidereggsham
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/donut
|
||||
subcategory = CAT_PASTRY
|
||||
|
||||
|
||||
/datum/crafting_recipe/food/donut
|
||||
time = 15
|
||||
name = "Semen donut"
|
||||
@@ -104,7 +104,7 @@ datum/crafting_recipe/food/donut/meat
|
||||
/datum/crafting_recipe/food/rofflewaffles
|
||||
name = "Roffle waffles"
|
||||
reqs = list(
|
||||
/datum/reagent/mushroomhallucinogen = 5,
|
||||
/datum/reagent/drug/mushroomhallucinogen = 5,
|
||||
/obj/item/reagent_containers/food/snacks/pastrybase = 2
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/rofflewaffles
|
||||
@@ -205,16 +205,6 @@ datum/crafting_recipe/food/donut/meat
|
||||
|
||||
////////////////////////////////////////////OTHER////////////////////////////////////////////
|
||||
|
||||
/datum/crafting_recipe/food/hotdog
|
||||
name = "Hot dog"
|
||||
reqs = list(
|
||||
/datum/reagent/consumable/ketchup = 5,
|
||||
/obj/item/reagent_containers/food/snacks/bun = 1,
|
||||
/obj/item/reagent_containers/food/snacks/sausage = 1
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/hotdog
|
||||
subcategory = CAT_PASTRY
|
||||
|
||||
/datum/crafting_recipe/food/meatbun
|
||||
name = "Meat bun"
|
||||
reqs = list(
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
result = /obj/item/reagent_containers/food/snacks/notasandwich
|
||||
subcategory = CAT_SANDWICH
|
||||
|
||||
/datum/crafting_recipe/food/notasandwich
|
||||
/datum/crafting_recipe/food/tunasandwich
|
||||
name = "Tuna sandwich"
|
||||
reqs = list(
|
||||
/obj/item/reagent_containers/food/snacks/breadslice/plain = 2,
|
||||
@@ -62,3 +62,13 @@
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/tuna_sandwich
|
||||
subcategory = CAT_SANDWICH
|
||||
|
||||
/datum/crafting_recipe/food/hotdog
|
||||
name = "Hot dog"
|
||||
reqs = list(
|
||||
/datum/reagent/consumable/ketchup = 5,
|
||||
/obj/item/reagent_containers/food/snacks/bun = 1,
|
||||
/obj/item/reagent_containers/food/snacks/sausage = 1
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/hotdog
|
||||
subcategory = CAT_SANDWICH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
/datum/reagent/consumable/rice = 10
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/sushi_rice
|
||||
subcategory = CAT_SUSHI
|
||||
subcategory = CAT_FISH
|
||||
|
||||
/datum/crafting_recipe/food/sea_weed
|
||||
name = "Sea Weed Sheet"
|
||||
@@ -17,7 +17,7 @@
|
||||
/obj/item/reagent_containers/food/snacks/grown/kudzupod = 1,
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/sea_weed
|
||||
subcategory = CAT_SUSHI
|
||||
subcategory = CAT_FISH
|
||||
|
||||
/datum/crafting_recipe/food/tuna_can
|
||||
name = "Can of Tuna"
|
||||
@@ -27,7 +27,7 @@
|
||||
/obj/item/reagent_containers/food/snacks/carpmeat = 1,
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/tuna
|
||||
subcategory = CAT_SUSHI
|
||||
subcategory = CAT_FISH
|
||||
|
||||
//////////////////////////Sushi/////////////////////////////////
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
/obj/item/reagent_containers/food/snacks/carpmeat = 1
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/sashimi
|
||||
subcategory = CAT_SUSHI
|
||||
subcategory = CAT_FISH
|
||||
|
||||
/datum/crafting_recipe/food/riceball
|
||||
name = "Onigiri"
|
||||
@@ -49,7 +49,7 @@
|
||||
/obj/item/reagent_containers/food/snacks/sushi_rice = 1
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/riceball
|
||||
subcategory = CAT_SUSHI
|
||||
subcategory = CAT_FISH
|
||||
|
||||
/datum/crafting_recipe/food/sushie_egg
|
||||
name = "Tobiko"
|
||||
@@ -59,7 +59,7 @@
|
||||
/obj/item/reagent_containers/food/snacks/sea_weed = 2,
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/tobiko
|
||||
subcategory = CAT_SUSHI
|
||||
subcategory = CAT_FISH
|
||||
|
||||
/datum/crafting_recipe/food/sushie_basic
|
||||
name = "Funa Hosomaki"
|
||||
@@ -70,7 +70,7 @@
|
||||
/obj/item/reagent_containers/food/snacks/sea_weed = 3,
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/sushie_basic
|
||||
subcategory = CAT_SUSHI
|
||||
subcategory = CAT_FISH
|
||||
|
||||
/datum/crafting_recipe/food/sushie_adv
|
||||
name = "Funa Nigiri"
|
||||
@@ -80,7 +80,7 @@
|
||||
/obj/item/reagent_containers/food/snacks/carpmeat = 1
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/sushie_adv
|
||||
subcategory = CAT_SUSHI
|
||||
subcategory = CAT_FISH
|
||||
|
||||
/datum/crafting_recipe/food/sushie_pro
|
||||
name = "Well made Funa Nigiri"
|
||||
@@ -91,4 +91,35 @@
|
||||
/obj/item/reagent_containers/food/snacks/sea_weed = 1
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/sushie_pro
|
||||
subcategory = CAT_SUSHI
|
||||
subcategory = CAT_FISH
|
||||
|
||||
///////////////Gaijin junk/////////////////////////////////////
|
||||
|
||||
/datum/crafting_recipe/food/fishfingers
|
||||
name = "Fish fingers"
|
||||
reqs = list(
|
||||
/datum/reagent/consumable/flour = 5,
|
||||
/obj/item/reagent_containers/food/snacks/bun = 1,
|
||||
/obj/item/reagent_containers/food/snacks/carpmeat = 1
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/fishfingers
|
||||
subcategory = CAT_FISH
|
||||
|
||||
/datum/crafting_recipe/food/cubancarp
|
||||
name = "Cuban carp"
|
||||
reqs = list(
|
||||
/datum/reagent/consumable/flour = 5,
|
||||
/obj/item/reagent_containers/food/snacks/grown/chili = 1,
|
||||
/obj/item/reagent_containers/food/snacks/carpmeat = 1
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/cubancarp
|
||||
subcategory = CAT_FISH
|
||||
|
||||
/datum/crafting_recipe/food/fishandchips
|
||||
name = "Fish and chips"
|
||||
reqs = list(
|
||||
/obj/item/reagent_containers/food/snacks/fries = 1,
|
||||
/obj/item/reagent_containers/food/snacks/carpmeat = 1
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/fishandchips
|
||||
subcategory = CAT_FISH
|
||||
@@ -31,18 +31,17 @@
|
||||
decksize = 50
|
||||
card_text_file = "strings/cas_black.txt"
|
||||
|
||||
/obj/item/toy/cards/deck/cas/Initialize()
|
||||
. = ..()
|
||||
/obj/item/toy/cards/deck/cas/populate_deck()
|
||||
var/static/list/cards_against_space = list("cas_white" = world.file2list("strings/cas_white.txt"),"cas_black" = world.file2list("strings/cas_black.txt"))
|
||||
allcards = cards_against_space[card_face]
|
||||
var/list/possiblecards = allcards.Copy()
|
||||
if(possiblecards.len < decksize) // sanity check
|
||||
decksize = (possiblecards.len - 1)
|
||||
var/list/randomcards = list()
|
||||
while (randomcards.len < decksize)
|
||||
for(var/x in 1 to decksize)
|
||||
randomcards += pick_n_take(possiblecards)
|
||||
for(var/i=1 to randomcards.len)
|
||||
var/cardtext = randomcards[i]
|
||||
for(var/x in 1 to randomcards.len)
|
||||
var/cardtext = randomcards[x]
|
||||
var/datum/playingcard/P
|
||||
P = new()
|
||||
P.name = "[cardtext]"
|
||||
@@ -50,7 +49,7 @@
|
||||
cards += P
|
||||
if(!blanks)
|
||||
return
|
||||
for(var/x=1 to blanks)
|
||||
for(var/x in 1 to blanks)
|
||||
var/datum/playingcard/P
|
||||
P = new()
|
||||
P.name = "Blank Card"
|
||||
@@ -58,10 +57,7 @@
|
||||
cards += P
|
||||
shuffle_inplace(cards) // distribute blank cards throughout deck
|
||||
|
||||
/obj/item/toy/cards/deck/cas/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/item/toy/cards/deck/cas/draw_card(mob/user)
|
||||
if(user.lying)
|
||||
return
|
||||
if(cards.len == 0)
|
||||
|
||||
@@ -471,15 +471,6 @@ function ehjaxCallback(data) {
|
||||
handleClientData(data.clientData.ckey, data.clientData.ip, data.clientData.compid);
|
||||
}
|
||||
sendVolumeUpdate();
|
||||
} else if (data.firebug) {
|
||||
if (data.trigger) {
|
||||
internalOutput('<span class="internal boldnshit">Loading firebug console, triggered by '+data.trigger+'...</span>', 'internal');
|
||||
} else {
|
||||
internalOutput('<span class="internal boldnshit">Loading firebug console...</span>', 'internal');
|
||||
}
|
||||
var firebugEl = document.createElement('script');
|
||||
firebugEl.src = 'https://getfirebug.com/firebug-lite-debug.js';
|
||||
document.body.appendChild(firebugEl);
|
||||
} else if (data.adminMusic) {
|
||||
if (typeof data.adminMusic === 'string') {
|
||||
var adminMusic = byondDecode(data.adminMusic);
|
||||
|
||||
@@ -24,14 +24,14 @@ Chaplain
|
||||
|
||||
var/obj/item/storage/book/bible/booze/B = new
|
||||
|
||||
if(SSreligion.religion)
|
||||
B.deity_name = SSreligion.deity
|
||||
B.name = SSreligion.bible_name
|
||||
B.icon_state = SSreligion.bible_icon_state
|
||||
B.item_state = SSreligion.bible_item_state
|
||||
to_chat(H, "There is already an established religion onboard the station. You are an acolyte of [SSreligion.deity]. Defer to the Chaplain.")
|
||||
if(GLOB.religion)
|
||||
B.deity_name = GLOB.deity
|
||||
B.name = GLOB.bible_name
|
||||
B.icon_state = GLOB.bible_icon_state
|
||||
B.item_state = GLOB.bible_item_state
|
||||
to_chat(H, "There is already an established religion onboard the station. You are an acolyte of [GLOB.deity]. Defer to the Chaplain.")
|
||||
H.equip_to_slot_or_del(B, SLOT_IN_BACKPACK)
|
||||
var/nrt = SSreligion.holy_weapon_type || /obj/item/nullrod
|
||||
var/nrt = GLOB.holy_weapon_type || /obj/item/nullrod
|
||||
var/obj/item/nullrod/N = new nrt(H)
|
||||
H.put_in_hands(N)
|
||||
return
|
||||
@@ -74,9 +74,9 @@ Chaplain
|
||||
else
|
||||
B.name = "The Holy Book of [new_religion]"
|
||||
|
||||
SSreligion.religion = new_religion
|
||||
SSreligion.bible_name = B.name
|
||||
SSreligion.deity = B.deity_name
|
||||
GLOB.religion = new_religion
|
||||
GLOB.bible_name = B.name
|
||||
GLOB.deity = B.deity_name
|
||||
|
||||
H.equip_to_slot_or_del(B, SLOT_IN_BACKPACK)
|
||||
|
||||
|
||||
@@ -488,11 +488,11 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums
|
||||
if(href_list["printbible"])
|
||||
if(cooldown < world.time)
|
||||
var/obj/item/storage/book/bible/B = new /obj/item/storage/book/bible(src.loc)
|
||||
if(SSreligion.bible_icon_state && SSreligion.bible_item_state)
|
||||
B.icon_state = SSreligion.bible_icon_state
|
||||
B.item_state = SSreligion.bible_item_state
|
||||
B.name = SSreligion.bible_name
|
||||
B.deity_name = SSreligion.deity
|
||||
if(GLOB.bible_icon_state && GLOB.bible_item_state)
|
||||
B.icon_state = GLOB.bible_icon_state
|
||||
B.item_state = GLOB.bible_item_state
|
||||
B.name = GLOB.bible_name
|
||||
B.deity_name = GLOB.deity
|
||||
cooldown = world.time + PRINTER_COOLDOWN
|
||||
else
|
||||
say("Printer currently unavailable, please wait a moment.")
|
||||
|
||||
@@ -273,23 +273,12 @@
|
||||
to_chat(user, "<span class='notice'>You release the wisp. It begins to bob around your head.</span>")
|
||||
icon_state = "lantern"
|
||||
wisp.orbit(user, 20)
|
||||
user.update_sight()
|
||||
SSblackbox.record_feedback("tally", "wisp_lantern", 1, "Freed")
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You return the wisp to the lantern.</span>")
|
||||
|
||||
var/mob/target
|
||||
if(wisp.orbiting)
|
||||
target = wisp.orbiting.orbiting
|
||||
wisp.stop_orbit()
|
||||
wisp.forceMove(src)
|
||||
|
||||
if (istype(target))
|
||||
target.update_sight()
|
||||
to_chat(target, "<span class='notice'>Your vision returns to normal.</span>")
|
||||
|
||||
icon_state = "lantern-blue"
|
||||
wisp.forceMove(src)
|
||||
SSblackbox.record_feedback("tally", "wisp_lantern", 1, "Returned")
|
||||
|
||||
/obj/item/wisp_lantern/Initialize()
|
||||
@@ -302,7 +291,7 @@
|
||||
qdel(wisp)
|
||||
else
|
||||
wisp.visible_message("<span class='notice'>[wisp] has a sad feeling for a moment, then it passes.</span>")
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/effect/wisp
|
||||
name = "friendly wisp"
|
||||
@@ -314,6 +303,25 @@
|
||||
var/sight_flags = SEE_MOBS
|
||||
var/lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
|
||||
|
||||
/obj/effect/wisp/orbit(atom/thing, radius, clockwise, rotation_speed, rotation_segments, pre_rotation, lockinorbit)
|
||||
. = ..()
|
||||
if(ismob(thing))
|
||||
RegisterSignal(thing, COMSIG_MOB_UPDATE_SIGHT, .proc/update_user_sight)
|
||||
var/mob/being = thing
|
||||
being.update_sight()
|
||||
to_chat(thing, "<span class='notice'>The wisp enhances your vision.</span>")
|
||||
|
||||
/obj/effect/wisp/stop_orbit(datum/component/orbiter/orbits)
|
||||
. = ..()
|
||||
if(ismob(orbits.parent))
|
||||
UnregisterSignal(orbits.parent, COMSIG_MOB_UPDATE_SIGHT)
|
||||
to_chat(orbits.parent, "<span class='notice'>Your vision returns to normal.</span>")
|
||||
|
||||
/obj/effect/wisp/proc/update_user_sight(mob/user)
|
||||
user.sight |= sight_flags
|
||||
if(!isnull(lighting_alpha))
|
||||
user.lighting_alpha = min(user.lighting_alpha, lighting_alpha)
|
||||
|
||||
//Red/Blue Cubes
|
||||
/obj/item/warp_cube
|
||||
name = "blue cube"
|
||||
@@ -781,19 +789,17 @@
|
||||
var/turf/T = get_turf(src)
|
||||
var/list/contents = T.GetAllContents()
|
||||
var/mob/dead/observer/current_spirits = list()
|
||||
var/list/orbiters = list()
|
||||
for(var/thing in contents)
|
||||
var/atom/A = thing
|
||||
if (A.orbiters)
|
||||
orbiters += A.orbiters
|
||||
A.transfer_observers_to(src)
|
||||
|
||||
for(var/thing in orbiters)
|
||||
var/datum/orbit/O = thing
|
||||
if (isobserver(O.orbiter))
|
||||
var/mob/dead/observer/G = O.orbiter
|
||||
ghost_counter++
|
||||
G.invisibility = 0
|
||||
current_spirits |= G
|
||||
for(var/i in orbiters?.orbiters)
|
||||
if(!isobserver(i))
|
||||
continue
|
||||
var/mob/dead/observer/G = i
|
||||
ghost_counter++
|
||||
G.invisibility = 0
|
||||
current_spirits |= G
|
||||
|
||||
for(var/mob/dead/observer/G in spirits - current_spirits)
|
||||
G.invisibility = GLOB.observer_default_invisibility
|
||||
|
||||
@@ -26,7 +26,9 @@
|
||||
return
|
||||
|
||||
/mob/camera/forceMove(atom/destination)
|
||||
var/oldloc = loc
|
||||
loc = destination
|
||||
Moved(oldloc, NONE, TRUE)
|
||||
|
||||
/mob/camera/emote(act, m_type=1, message = null, intentional = FALSE)
|
||||
return
|
||||
|
||||
@@ -34,7 +34,9 @@ INITIALIZE_IMMEDIATE(/mob/dead)
|
||||
var/turf/new_turf = get_turf(destination)
|
||||
if (old_turf?.z != new_turf?.z)
|
||||
onTransitZ(old_turf?.z, new_turf?.z)
|
||||
var/oldloc = loc
|
||||
loc = destination
|
||||
Moved(oldloc, NONE, TRUE)
|
||||
|
||||
/mob/dead/Stat()
|
||||
..()
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
return
|
||||
|
||||
var/obj/effect/mob_spawn/MS = pick(GLOB.mob_spawners[href_list["JoinAsGhostRole"]])
|
||||
if(istype(MS) && MS.attack_ghost(src, latejoinercalling = TRUE))
|
||||
if(MS?.attack_ghost(src, latejoinercalling = TRUE))
|
||||
SSticker.queued_players -= src
|
||||
SSticker.queue_delay = 4
|
||||
qdel(src)
|
||||
@@ -443,9 +443,10 @@
|
||||
for(var/datum/job/job in SSjob.occupations)
|
||||
if(job && IsJobUnavailable(job.title, TRUE) == JOB_AVAILABLE)
|
||||
available_job_count++
|
||||
for(var/spawner in GLOB.mob_spawners)
|
||||
available_job_count++
|
||||
break
|
||||
for(var/obj/effect/mob_spawn/spawner in GLOB.mob_spawners)
|
||||
if(spawner.can_latejoin())
|
||||
available_job_count++
|
||||
break
|
||||
|
||||
if(!available_job_count)
|
||||
dat += "<div class='notice red'>There are currently no open positions!</div>"
|
||||
@@ -464,8 +465,9 @@
|
||||
"Science" = list(jobs = list(), titles = GLOB.science_positions, color = "#e6b3e6"),
|
||||
"Security" = list(jobs = list(), titles = GLOB.security_positions, color = "#ff9999"),
|
||||
)
|
||||
for(var/spawner in GLOB.mob_spawners)
|
||||
categorizedJobs["Ghost Role"]["jobs"] += spawner
|
||||
for(var/obj/effect/mob_spawn/spawner in GLOB.mob_spawners)
|
||||
if(spawner.can_latejoin())
|
||||
categorizedJobs["Ghost Role"]["jobs"] += spawner
|
||||
|
||||
for(var/datum/job/job in SSjob.occupations)
|
||||
if(job && IsJobUnavailable(job.title, TRUE) == JOB_AVAILABLE)
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
// please make sure they're sorted alphabetically and categorized
|
||||
|
||||
/datum/sprite_accessory/socks/bee_knee
|
||||
name = "Knee-high (Bee)"
|
||||
icon_state = "bee_knee"
|
||||
|
||||
/datum/sprite_accessory/socks/black_knee
|
||||
name = "Knee-high (Black)"
|
||||
icon_state = "black_knee"
|
||||
@@ -63,6 +67,42 @@
|
||||
name = "Short (White)"
|
||||
icon_state = "white_short"
|
||||
|
||||
/datum/sprite_accessory/socks/stockings_blue
|
||||
name = "Stockings (Blue)"
|
||||
icon_state = "stockings_blue"
|
||||
|
||||
/datum/sprite_accessory/socks/stockings_cyan
|
||||
name = "Stockings (Cyan)"
|
||||
icon_state = "stockings_cyan"
|
||||
|
||||
/datum/sprite_accessory/socks/stockings_dpink
|
||||
name = "Stockings (Dark Pink)"
|
||||
icon_state = "stockings_dpink"
|
||||
|
||||
/datum/sprite_accessory/socks/stockings_green
|
||||
name = "Stockings (Green)"
|
||||
icon_state = "stockings_black"
|
||||
|
||||
/datum/sprite_accessory/socks/stockings_orange
|
||||
name = "Stockings (Orange)"
|
||||
icon_state = "stockings_orange"
|
||||
|
||||
/datum/sprite_accessory/socks/stockings_programmer
|
||||
name = "Stockings (Programmer)"
|
||||
icon_state = "stockings_lpink"
|
||||
|
||||
/datum/sprite_accessory/socks/stockings_purple
|
||||
name = "Stockings (Purple)"
|
||||
icon_state = "stockings_purple"
|
||||
|
||||
/datum/sprite_accessory/socks/stockings_yellow
|
||||
name = "Stockings (Yellow)"
|
||||
icon_state = "stockings_yellow"
|
||||
|
||||
/datum/sprite_accessory/socks/bee_thigh
|
||||
name = "Thigh-high (Bee)"
|
||||
icon_state = "bee_thigh"
|
||||
|
||||
/datum/sprite_accessory/socks/black_thigh
|
||||
name = "Thigh-high (Black)"
|
||||
icon_state = "black_thigh"
|
||||
@@ -93,4 +133,4 @@
|
||||
|
||||
/datum/sprite_accessory/socks/white_thigh
|
||||
name = "Thigh-high (White)"
|
||||
icon_state = "white_thigh"
|
||||
icon_state = "white_thigh"
|
||||
|
||||
@@ -248,9 +248,13 @@
|
||||
icon_state = "bra_commie"
|
||||
|
||||
/datum/sprite_accessory/undershirt/female_babyblue
|
||||
name = "Bra, Baby Blue"
|
||||
name = "Bra - Baby Blue"
|
||||
icon_state = "bra_babyblue"
|
||||
|
||||
/datum/sprite_accessory/undershirt/female_beekini
|
||||
name = "Bra - Bee-kini"
|
||||
icon_state = "bra_bee-kini"
|
||||
|
||||
/datum/sprite_accessory/undershirt/female_black
|
||||
name = "Bra - Black"
|
||||
icon_state = "bra_black"
|
||||
|
||||
@@ -90,6 +90,9 @@
|
||||
name = "Boxer Briefs - Yellow"
|
||||
icon_state = "boxer_briefs_yellow"
|
||||
|
||||
/datum/sprite_accessory/underwear/female_beekini
|
||||
name = "Panties - Bee-kini"
|
||||
icon_state = "panties_bee-kini"
|
||||
|
||||
/datum/sprite_accessory/underwear/female_black
|
||||
name = "Panties - Black"
|
||||
|
||||
@@ -429,9 +429,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
var/orbitsize = (I.Width()+I.Height())*0.5
|
||||
orbitsize -= (orbitsize/world.icon_size)*(world.icon_size*0.25)
|
||||
|
||||
if(orbiting && orbiting.orbiting != target)
|
||||
to_chat(src, "<span class='notice'>Now orbiting [target].</span>")
|
||||
|
||||
var/rot_seg
|
||||
|
||||
switch(ghost_orbit)
|
||||
@@ -450,10 +447,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
/mob/dead/observer/orbit()
|
||||
setDir(2)//reset dir so the right directional sprites show up
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/dead/observer/stop_orbit()
|
||||
..()
|
||||
/mob/dead/observer/stop_orbit(datum/component/orbiter/orbits)
|
||||
. = ..()
|
||||
//restart our floating animation after orbit is done.
|
||||
pixel_y = 0
|
||||
animate(src, pixel_y = 2, time = 10, loop = -1)
|
||||
@@ -753,7 +750,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
update_icon()
|
||||
|
||||
/mob/dead/observer/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
|
||||
/mob/dead/observer/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
|
||||
return IsAdminGhost(usr)
|
||||
|
||||
/mob/dead/observer/is_literate()
|
||||
|
||||
@@ -895,6 +895,11 @@
|
||||
var/obj/item/organ/I = X
|
||||
I.Insert(src)
|
||||
|
||||
/mob/living/carbon/proc/update_disabled_bodyparts()
|
||||
for(var/B in bodyparts)
|
||||
var/obj/item/bodypart/BP = B
|
||||
BP.update_disabled()
|
||||
|
||||
/mob/living/carbon/vv_get_dropdown()
|
||||
. = ..()
|
||||
. += "---"
|
||||
|
||||
@@ -294,7 +294,7 @@
|
||||
if(mood.sanity <= SANITY_DISTURBED)
|
||||
msg += "[t_He] seem[p_s()] distressed.\n"
|
||||
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "empath", /datum/mood_event/sad_empath, src)
|
||||
if(mood.mood >= 5) //So roundstart people aren't all "happy"
|
||||
if(mood.shown_mood >= 6) //So roundstart people aren't all "happy" and that antags don't show their true happiness.
|
||||
msg += "[t_He] seem[p_s()] to have had something nice happen to them recently.\n"
|
||||
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "empathH", /datum/mood_event/happy_empath, src)
|
||||
if (HAS_TRAIT(src, TRAIT_BLIND))
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
/mob/living/carbon/human/Initialize()
|
||||
verbs += /mob/living/proc/mob_sleep
|
||||
verbs += /mob/living/proc/lay_down
|
||||
verbs += /mob/living/carbon/human/proc/underwear_toggle //fwee
|
||||
|
||||
//initialize limbs first
|
||||
create_bodyparts()
|
||||
@@ -724,12 +725,12 @@
|
||||
remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, "#000000")
|
||||
cut_overlay(MA)
|
||||
|
||||
/mob/living/carbon/human/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
|
||||
/mob/living/carbon/human/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
|
||||
if(incapacitated() || lying )
|
||||
to_chat(src, "<span class='warning'>You can't do that right now!</span>")
|
||||
return FALSE
|
||||
if(!Adjacent(M) && (M.loc != src))
|
||||
if((be_close == 0) || (dna.check_mutation(TK) && tkMaxRangeCheck(src, M)))
|
||||
if((be_close == 0) || (!no_tk && (dna.check_mutation(TK) && tkMaxRangeCheck(src, M))))
|
||||
return TRUE
|
||||
to_chat(src, "<span class='warning'>You are too far away!</span>")
|
||||
return FALSE
|
||||
@@ -855,13 +856,16 @@
|
||||
buckle_mob(target,TRUE,TRUE)
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/human/proc/piggyback_instant(mob/living/M)
|
||||
return buckle_mob(M, TRUE, TRUE, FALSE, TRUE)
|
||||
|
||||
//Can C try to piggyback at all.
|
||||
/mob/living/carbon/human/proc/can_piggyback(mob/living/carbon/C)
|
||||
if(istype(C) && C.stat == CONSCIOUS)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/human/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE, bypass_piggybacking = FALSE)
|
||||
/mob/living/carbon/human/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE, bypass_piggybacking = FALSE, no_delay = FALSE)
|
||||
if(!force)//humans are only meant to be ridden through piggybacking and special cases
|
||||
return
|
||||
if(bypass_piggybacking)
|
||||
@@ -878,7 +882,7 @@
|
||||
if(can_piggyback(M))
|
||||
riding_datum.ride_check_ridden_incapacitated = TRUE
|
||||
visible_message("<span class='notice'>[M] starts to climb onto [src]...</span>")
|
||||
if(force || do_after(M, 15, target = src))
|
||||
if(no_delay || do_after(M, 15, target = src))
|
||||
if(can_piggyback(M))
|
||||
if(M.incapacitated(FALSE, TRUE) || incapacitated(FALSE, TRUE))
|
||||
M.visible_message("<span class='warning'>[M] can't hang onto [src]!</span>")
|
||||
|
||||
@@ -54,7 +54,12 @@
|
||||
else
|
||||
visible_message("<span class='danger'>[src] deflects the projectile!</span>", "<span class='userdanger'>You deflect the projectile!</span>")
|
||||
playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1)
|
||||
return 0
|
||||
if(!mind.martial_art.reroute_deflection)
|
||||
return FALSE
|
||||
else
|
||||
P.firer = src
|
||||
P.setAngle(rand(0, 360))//SHING
|
||||
return FALSE
|
||||
|
||||
if(!(P.original == src && P.firer == src)) //can't block or reflect when shooting yourself
|
||||
if(P.is_reflectable)
|
||||
|
||||
@@ -44,6 +44,8 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
var/siemens_coeff = 1 //base electrocution coefficient
|
||||
var/damage_overlay_type = "human" //what kind of damage overlays (if any) appear on our species when wounded?
|
||||
var/fixed_mut_color = "" //to use MUTCOLOR with a fixed color that's independent of dna.feature["mcolor"]
|
||||
var/list/special_step_sounds //Sounds to override barefeet walkng
|
||||
var/grab_sound //Special sound for grabbing
|
||||
|
||||
// species-only traits. Can be found in DNA.dm
|
||||
var/list/species_traits = list()
|
||||
@@ -490,11 +492,19 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
//Underwear, Undershirts & Socks
|
||||
if(!(NO_UNDERWEAR in species_traits))
|
||||
if(H.underwear)
|
||||
if(H.hidden_underwear)
|
||||
H.underwear = "Nude"
|
||||
else
|
||||
H.underwear = H.saved_underwear
|
||||
var/datum/sprite_accessory/underwear/underwear = GLOB.underwear_list[H.underwear]
|
||||
if(underwear)
|
||||
standing += mutable_appearance(underwear.icon, underwear.icon_state, -BODY_LAYER)
|
||||
|
||||
if(H.undershirt)
|
||||
if(H.hidden_undershirt)
|
||||
H.undershirt = "Nude"
|
||||
else
|
||||
H.undershirt = H.saved_undershirt
|
||||
var/datum/sprite_accessory/undershirt/undershirt = GLOB.undershirt_list[H.undershirt]
|
||||
if(undershirt)
|
||||
if(H.dna.species.sexes && H.gender == FEMALE)
|
||||
@@ -503,6 +513,10 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
standing += mutable_appearance(undershirt.icon, undershirt.icon_state, -BODY_LAYER)
|
||||
|
||||
if(H.socks && H.get_num_legs(FALSE) >= 2)
|
||||
if(H.hidden_socks)
|
||||
H.socks = "Nude"
|
||||
else
|
||||
H.socks = H.saved_socks
|
||||
var/datum/sprite_accessory/socks/socks = GLOB.socks_list[H.socks]
|
||||
if(socks)
|
||||
if(DIGITIGRADE in species_traits)
|
||||
@@ -1288,7 +1302,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
. += H.physiology.speed_mod
|
||||
|
||||
if (H.m_intent == MOVE_INTENT_WALK && HAS_TRAIT(H, TRAIT_SPEEDY_STEP))
|
||||
. -= 1
|
||||
. -= 1.5
|
||||
|
||||
if(HAS_TRAIT(H, TRAIT_IGNORESLOWDOWN))
|
||||
ignoreslow = 1
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
var/list/special_names = list("Tarkus")
|
||||
var/human_surname_chance = 3
|
||||
var/special_name_chance = 5
|
||||
var/owner //dobby is a free golem
|
||||
|
||||
/datum/species/golem/random_name(gender,unique,lastname)
|
||||
var/golem_surname = pick(GLOB.golem_names)
|
||||
@@ -807,3 +808,196 @@
|
||||
/datum/species/golem/plastic/on_species_loss(mob/living/carbon/C)
|
||||
. = ..()
|
||||
C.ventcrawler = initial(C.ventcrawler)
|
||||
|
||||
/datum/species/golem/bronze
|
||||
name = "Bronze Golem"
|
||||
id = "bronze golem"
|
||||
prefix = "Bronze"
|
||||
special_names = list("Bell")
|
||||
fixed_mut_color = "cd7f32"
|
||||
info_text = "As a <span class='danger'>Bronze Golem</span>, you are very resistant to loud noises, and make loud noises if something hard hits you, however this ability does hurt your hearing."
|
||||
special_step_sounds = list('sound/machines/clockcult/integration_cog_install.ogg', 'sound/magic/clockwork/fellowship_armory.ogg' )
|
||||
attack_verb = "bonk"
|
||||
mutantears = /obj/item/organ/ears/bronze
|
||||
var/last_gong_time = 0
|
||||
var/gong_cooldown = 150
|
||||
|
||||
/datum/species/golem/bronze/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H)
|
||||
if(!(world.time > last_gong_time + gong_cooldown))
|
||||
return ..()
|
||||
if(P.flag == "bullet" || P.flag == "bomb")
|
||||
gong(H)
|
||||
return ..()
|
||||
|
||||
/datum/species/golem/bronze/spec_hitby(atom/movable/AM, mob/living/carbon/human/H)
|
||||
..()
|
||||
if(world.time > last_gong_time + gong_cooldown)
|
||||
gong(H)
|
||||
|
||||
/datum/species/golem/bronze/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style)
|
||||
..()
|
||||
if(world.time > last_gong_time + gong_cooldown && M.a_intent != INTENT_HELP)
|
||||
gong(H)
|
||||
|
||||
/datum/species/golem/bronze/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H)
|
||||
..()
|
||||
if(world.time > last_gong_time + gong_cooldown)
|
||||
gong(H)
|
||||
|
||||
/datum/species/golem/bronze/on_hit(obj/item/projectile/P, mob/living/carbon/human/H)
|
||||
..()
|
||||
if(world.time > last_gong_time + gong_cooldown)
|
||||
gong(H)
|
||||
|
||||
/datum/species/golem/bronze/proc/gong(mob/living/carbon/human/H)
|
||||
last_gong_time = world.time
|
||||
for(var/mob/living/M in get_hearers_in_view(7,H))
|
||||
if(M.stat == DEAD) //F
|
||||
return
|
||||
if(M == H)
|
||||
H.show_message("<span class='narsiesmall'>You cringe with pain as your body rings around you!</span>", 2)
|
||||
H.playsound_local(H, 'sound/effects/gong.ogg', 100, TRUE)
|
||||
H.soundbang_act(2, 0, 100, 1)
|
||||
H.jitteriness += 7
|
||||
var/distance = max(0,get_dist(get_turf(H),get_turf(M)))
|
||||
switch(distance)
|
||||
if(0 to 1)
|
||||
M.show_message("<span class='narsiesmall'>GONG!</span>", 2)
|
||||
M.playsound_local(H, 'sound/effects/gong.ogg', 100, TRUE)
|
||||
M.soundbang_act(1, 0, 30, 3)
|
||||
M.confused += 10
|
||||
M.jitteriness += 4
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "gonged", /datum/mood_event/loud_gong)
|
||||
if(2 to 3)
|
||||
M.show_message("<span class='cult'>GONG!</span>", 2)
|
||||
M.playsound_local(H, 'sound/effects/gong.ogg', 75, TRUE)
|
||||
M.soundbang_act(1, 0, 15, 2)
|
||||
M.jitteriness += 3
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "gonged", /datum/mood_event/loud_gong)
|
||||
else
|
||||
M.show_message("<span class='warning'>GONG!</span>", 2)
|
||||
M.playsound_local(H, 'sound/effects/gong.ogg', 50, TRUE)
|
||||
|
||||
|
||||
/datum/species/golem/cardboard //Faster but weaker, can also make new shells on its own
|
||||
name = "Cardboard Golem"
|
||||
id = "cardboard golem"
|
||||
prefix = "Cardboard"
|
||||
special_names = list("Box")
|
||||
info_text = "As a <span class='danger'>Cardboard Golem</span>, you aren't very strong, but you are a bit quicker and can easily create more brethren by using cardboard on yourself."
|
||||
species_traits = list(NOBLOOD,NO_UNDERWEAR,NOGENITALS,NOAROUSAL,MUTCOLORS)
|
||||
inherent_traits = list(TRAIT_NOBREATH, TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_NOGUNS,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NODISMEMBER)
|
||||
fixed_mut_color = "ffffff"
|
||||
limbs_id = "c_golem" //special sprites
|
||||
attack_verb = "bash"
|
||||
armor = 25
|
||||
burnmod = 1.25
|
||||
heatmod = 2
|
||||
speedmod = 1.5
|
||||
punchdamagelow = 4
|
||||
punchstunthreshold = 7
|
||||
punchdamagehigh = 8
|
||||
var/last_creation = 0
|
||||
var/brother_creation_cooldown = 300
|
||||
|
||||
/datum/species/golem/cardboard/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
if(user != H)
|
||||
return FALSE //forced reproduction is rape.
|
||||
if(istype(I, /obj/item/stack/sheet/cardboard))
|
||||
var/obj/item/stack/sheet/cardboard/C = I
|
||||
if(last_creation + brother_creation_cooldown > world.time) //no cheesing dork
|
||||
return
|
||||
if(C.amount < 10)
|
||||
to_chat(H, "<span class='warning'>You do not have enough cardboard!</span>")
|
||||
return FALSE
|
||||
to_chat(H, "<span class='notice'>You attempt to create a new cardboard brother.</span>")
|
||||
if(do_after(user, 30, target = user))
|
||||
if(last_creation + brother_creation_cooldown > world.time) //no cheesing dork
|
||||
return
|
||||
if(!C.use(10))
|
||||
to_chat(H, "<span class='warning'>You do not have enough cardboard!</span>")
|
||||
return FALSE
|
||||
to_chat(H, "<span class='notice'>You create a new cardboard golem shell.</span>")
|
||||
create_brother(H.loc)
|
||||
|
||||
/datum/species/golem/cardboard/proc/create_brother(var/location)
|
||||
new /obj/effect/mob_spawn/human/golem/servant(location, /datum/species/golem/cardboard, owner)
|
||||
last_creation = world.time
|
||||
|
||||
/datum/species/golem/leather
|
||||
name = "Leather Golem"
|
||||
id = "leather golem"
|
||||
special_names = list("Face", "Man", "Belt") //Ah dude 4 strength 4 stam leather belt AHHH
|
||||
inherent_traits = list(TRAIT_NOBREATH, TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_NOGUNS,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NODISMEMBER, TRAIT_STRONG_GRABBER)
|
||||
prefix = "Leather"
|
||||
fixed_mut_color = "624a2e"
|
||||
info_text = "As a <span class='danger'>Leather Golem</span>, you are flammable, but you can grab things with incredible ease, allowing all your grabs to start at a strong level."
|
||||
attack_verb = "whipp"
|
||||
grab_sound = 'sound/weapons/whipgrab.ogg'
|
||||
attack_sound = 'sound/weapons/whip.ogg'
|
||||
|
||||
/datum/species/golem/bone
|
||||
name = "Bone Golem"
|
||||
id = "bone golem"
|
||||
say_mod = "rattles"
|
||||
prefix = "Bone"
|
||||
limbs_id = "b_golem"
|
||||
special_names = list("Head", "Broth", "Fracture", "Rattler", "Appetit")
|
||||
liked_food = GROSS | MEAT | RAW
|
||||
toxic_food = null
|
||||
inherent_biotypes = list(MOB_UNDEAD, MOB_HUMANOID)
|
||||
mutanttongue = /obj/item/organ/tongue/bone
|
||||
sexes = FALSE
|
||||
fixed_mut_color = "ffffff"
|
||||
attack_verb = "rattl"
|
||||
species_traits = list(NOBLOOD,NO_UNDERWEAR,NOGENITALS,NOAROUSAL,MUTCOLORS)
|
||||
inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_NOFIRE,TRAIT_NOGUNS,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NODISMEMBER,TRAIT_FAKEDEATH,TRAIT_CALCIUM_HEALER)
|
||||
info_text = "As a <span class='danger'>Bone Golem</span>, You have a powerful spell that lets you chill your enemies with fear, and milk heals you! Just make sure to watch our for bone-hurting juice."
|
||||
var/datum/action/innate/bonechill/bonechill
|
||||
|
||||
/datum/species/golem/bone/on_species_gain(mob/living/carbon/C, datum/species/old_species)
|
||||
..()
|
||||
if(ishuman(C))
|
||||
bonechill = new
|
||||
bonechill.Grant(C)
|
||||
|
||||
/datum/species/golem/bone/on_species_loss(mob/living/carbon/C)
|
||||
if(bonechill)
|
||||
bonechill.Remove(C)
|
||||
..()
|
||||
|
||||
/datum/action/innate/bonechill
|
||||
name = "Bone Chill"
|
||||
desc = "Rattle your bones and strike fear into your enemies!"
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
icon_icon = 'icons/mob/actions/actions_spells.dmi'
|
||||
button_icon_state = "bonechill"
|
||||
var/cooldown = 600
|
||||
var/last_use
|
||||
var/snas_chance = 3
|
||||
|
||||
/datum/action/innate/bonechill/Activate()
|
||||
if(world.time < last_use + cooldown)
|
||||
to_chat("<span class='notice'>You aren't ready yet to rattle your bones again</span>")
|
||||
return
|
||||
owner.visible_message("<span class='warning'>[owner] rattles [owner.p_their()] bones harrowingly.</span>", "<span class='notice'>You rattle your bones</span>")
|
||||
last_use = world.time
|
||||
if(prob(snas_chance))
|
||||
playsound(get_turf(owner),'sound/magic/RATTLEMEBONES2.ogg', 100)
|
||||
if(ishuman(owner))
|
||||
var/mob/living/carbon/human/H = owner
|
||||
var/mutable_appearance/badtime = mutable_appearance('icons/mob/human_parts.dmi', "b_golem_eyes", -FIRE_LAYER-0.5)
|
||||
badtime.appearance_flags = RESET_COLOR
|
||||
H.overlays_standing[FIRE_LAYER+0.5] = badtime
|
||||
H.apply_overlay(FIRE_LAYER+0.5)
|
||||
addtimer(CALLBACK(H, /mob/living/carbon/.proc/remove_overlay, FIRE_LAYER+0.5), 25)
|
||||
else
|
||||
playsound(get_turf(owner),'sound/magic/RATTLEMEBONES.ogg', 100)
|
||||
for(var/mob/living/L in orange(7, get_turf(owner)))
|
||||
if((MOB_UNDEAD in L.mob_biotypes) || isgolem(L) || HAS_TRAIT(L, TRAIT_RESISTCOLD))
|
||||
return //Do not affect our brothers
|
||||
|
||||
to_chat(L, "<span class='cultlarge'>A spine-chilling sound chills you to the bone!</span>")
|
||||
L.apply_status_effect(/datum/status_effect/bonechill)
|
||||
SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "spooked", /datum/mood_event/spooked)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
sexes = 0
|
||||
meat = /obj/item/stack/sheet/mineral/plasma
|
||||
species_traits = list(NOBLOOD,NOTRANSSTING,NOGENITALS)
|
||||
inherent_traits = list(TRAIT_RESISTCOLD,TRAIT_RADIMMUNE,TRAIT_NOHUNGER)
|
||||
inherent_traits = list(TRAIT_RESISTCOLD,TRAIT_RADIMMUNE,TRAIT_NOHUNGER,TRAIT_CALCIUM_HEALER)
|
||||
inherent_biotypes = list(MOB_INORGANIC, MOB_HUMANOID)
|
||||
mutantlungs = /obj/item/organ/lungs/plasmaman
|
||||
mutanttongue = /obj/item/organ/tongue/bone/plasmaman
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
sexes = 0
|
||||
meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/skeleton
|
||||
species_traits = list(NOBLOOD,NOGENITALS,NOAROUSAL)
|
||||
inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NOHUNGER,TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_FAKEDEATH)
|
||||
inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NOHUNGER,TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_FAKEDEATH, TRAIT_CALCIUM_HEALER)
|
||||
inherent_biotypes = list(MOB_UNDEAD, MOB_HUMANOID)
|
||||
mutanttongue = /obj/item/organ/tongue/bone
|
||||
damage_overlay_type = ""//let's not show bloody wounds or burns over bones.
|
||||
@@ -21,4 +21,4 @@
|
||||
|
||||
/datum/species/skeleton/pirate
|
||||
name = "Space Queen's Skeleton"
|
||||
inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NOHUNGER,TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_FAKEDEATH)
|
||||
inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NOHUNGER,TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_FAKEDEATH, TRAIT_CALCIUM_HEALER)
|
||||
|
||||
@@ -654,6 +654,7 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put
|
||||
L.damage += d
|
||||
|
||||
/mob/living/carbon/proc/liver_failure()
|
||||
reagents.end_metabolization(src, keep_liverless = TRUE) //Stops trait-based effects on reagents, to prevent permanent buffs
|
||||
reagents.metabolize(src, can_overdose=FALSE, liverless = TRUE)
|
||||
if(HAS_TRAIT(src, TRAIT_STABLEHEART))
|
||||
return
|
||||
|
||||
@@ -73,39 +73,21 @@
|
||||
if(I.loc == src)
|
||||
return TRUE
|
||||
|
||||
if(I.anchored)
|
||||
if(I.anchored || !put_in_hands(I))
|
||||
blacklistItems[I] ++
|
||||
return FALSE
|
||||
|
||||
// WEAPONS
|
||||
if(istype(I, /obj/item))
|
||||
var/obj/item/W = I
|
||||
if(W.force >= best_force)
|
||||
put_in_hands(W)
|
||||
best_force = W.force
|
||||
return TRUE
|
||||
|
||||
// CLOTHING
|
||||
else if(istype(I, /obj/item/clothing))
|
||||
var/obj/item/clothing/C = I
|
||||
monkeyDrop(C)
|
||||
addtimer(CALLBACK(src, .proc/pickup_and_wear, C), 5)
|
||||
return TRUE
|
||||
|
||||
// EVERYTHING ELSE
|
||||
if(I.force >= best_force)
|
||||
best_force = I.force
|
||||
else
|
||||
if(!get_item_for_held_index(1) || !get_item_for_held_index(2))
|
||||
put_in_hands(I)
|
||||
return TRUE
|
||||
addtimer(CALLBACK(src, .proc/pickup_and_wear, I), 5)
|
||||
|
||||
blacklistItems[I] ++
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/monkey/proc/pickup_and_wear(var/obj/item/clothing/C)
|
||||
if(!equip_to_appropriate_slot(C))
|
||||
monkeyDrop(get_item_by_slot(C)) // remove the existing item if worn
|
||||
sleep(5)
|
||||
equip_to_appropriate_slot(C)
|
||||
/mob/living/carbon/monkey/proc/pickup_and_wear(obj/item/I)
|
||||
if(QDELETED(I) || I.loc != src)
|
||||
return
|
||||
equip_to_appropriate_slot(I)
|
||||
|
||||
/mob/living/carbon/monkey/resist_restraints()
|
||||
var/obj/item/I = null
|
||||
@@ -311,7 +293,8 @@
|
||||
if(I == pickupTarget)
|
||||
M.visible_message("<span class='danger'>[src] snatches [pickupTarget] from [M].</span>", "<span class='userdanger'>[src] snatched [pickupTarget]!</span>")
|
||||
if(M.temporarilyRemoveItemFromInventory(pickupTarget) && !QDELETED(pickupTarget))
|
||||
equip_item(pickupTarget)
|
||||
if(!equip_item(pickupTarget))
|
||||
dropItemToGround(pickupTarget)
|
||||
else
|
||||
M.visible_message("<span class='danger'>[src] tried to snatch [pickupTarget] from [M], but failed!</span>", "<span class='userdanger'>[src] tried to grab [pickupTarget]!</span>")
|
||||
pickpocketing = FALSE
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
var/mob/M = AM
|
||||
|
||||
log_combat(src, M, "grabbed", addition="passive grab")
|
||||
if(!supress_message)
|
||||
if(!supress_message && !(iscarbon(AM) && HAS_TRAIT(src, TRAIT_STRONG_GRABBER)))
|
||||
visible_message("<span class='warning'>[src] has grabbed [M][(zone_selected == "l_arm" || zone_selected == "r_arm")? " by their hands":" passively"]!</span>") //Cit change - And they thought ERP was bad.
|
||||
if(!iscarbon(src))
|
||||
M.LAssailant = null
|
||||
@@ -281,6 +281,11 @@
|
||||
var/datum/disease/D = thing
|
||||
if(D.spread_flags & DISEASE_SPREAD_CONTACT_SKIN)
|
||||
ContactContractDisease(D)
|
||||
|
||||
if(iscarbon(L))
|
||||
var/mob/living/carbon/C = L
|
||||
if(HAS_TRAIT(src, TRAIT_STRONG_GRABBER))
|
||||
C.grippedby(src)
|
||||
|
||||
//mob verbs are a lot faster than object verbs
|
||||
//for more info on why this is not atom/pull, see examinate() in mob.dm
|
||||
@@ -814,7 +819,7 @@
|
||||
/mob/living/proc/harvest(mob/living/user) //used for extra objects etc. in butchering
|
||||
return
|
||||
|
||||
/mob/living/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
|
||||
/mob/living/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
|
||||
if(incapacitated())
|
||||
to_chat(src, "<span class='warning'>You can't do that right now!</span>")
|
||||
return FALSE
|
||||
|
||||
@@ -288,8 +288,17 @@
|
||||
|
||||
/mob/living/silicon/ai/can_interact_with(atom/A)
|
||||
. = ..()
|
||||
var/turf/ai = get_turf(src)
|
||||
var/turf/target = get_turf(A)
|
||||
if (.)
|
||||
return
|
||||
|
||||
if(!target)
|
||||
return
|
||||
|
||||
if ((ai.z != target.z) && !is_station_level(ai.z))
|
||||
return FALSE
|
||||
|
||||
if (istype(loc, /obj/item/aicard))
|
||||
var/turf/T0 = get_turf(src)
|
||||
var/turf/T1 = get_turf(A)
|
||||
@@ -779,7 +788,7 @@
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/ai/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
|
||||
/mob/living/silicon/ai/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
|
||||
if(control_disabled || incapacitated())
|
||||
to_chat(src, "<span class='warning'>You can't do that right now!</span>")
|
||||
return FALSE
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
|
||||
// See software.dm for Topic()
|
||||
|
||||
/mob/living/silicon/pai/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
|
||||
/mob/living/silicon/pai/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
|
||||
if(be_close && !in_range(M, src))
|
||||
to_chat(src, "<span class='warning'>You are too far away!</span>")
|
||||
return FALSE
|
||||
|
||||
@@ -910,7 +910,7 @@
|
||||
if(DISCONNECT) //Tampering with the wires
|
||||
to_chat(connected_ai, "<br><br><span class='notice'>NOTICE - Remote telemetry lost with [name].</span><br>")
|
||||
|
||||
/mob/living/silicon/robot/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
|
||||
/mob/living/silicon/robot/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
|
||||
if(stat || lockcharge || low_power_mode)
|
||||
to_chat(src, "<span class='warning'>You can't do that right now!</span>")
|
||||
return FALSE
|
||||
|
||||
@@ -131,7 +131,6 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
|
||||
. = ..()
|
||||
if(emagged == 2)
|
||||
if(user)
|
||||
user << "<span class='danger'>You short out [src]'s sound control system. It gives out an evil laugh!!</span>"
|
||||
oldtarget_name = user.name
|
||||
audible_message("<span class='danger'>[src] gives out an evil laugh!</span>")
|
||||
playsound(src, 'sound/machines/honkbot_evil_laugh.ogg', 75, 1, -1) // evil laughter
|
||||
|
||||
20
code/modules/mob/living/simple_animal/friendly/panda.dm
Normal file
20
code/modules/mob/living/simple_animal/friendly/panda.dm
Normal file
@@ -0,0 +1,20 @@
|
||||
/mob/living/simple_animal/pet/redpanda
|
||||
name = "Red panda"
|
||||
desc = "Wah't a dork."
|
||||
icon = 'icons/mob/pets.dmi'
|
||||
icon_state = "red_panda"
|
||||
icon_living = "red_panda"
|
||||
icon_dead = "dead_panda"
|
||||
speak = list("Churip","Chuuriip","Cheep-cheep","Chiteurp","squueeaacipt")
|
||||
speak_emote = list("chirps", "huff-quacks")
|
||||
emote_hear = list("squeak-chrips.", "huff-squacks.")
|
||||
emote_see = list("shakes its head.", "rolls about.")
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
see_in_dark = 6
|
||||
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab = 3)
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "kicks"
|
||||
gold_core_spawnable = FRIENDLY_SPAWN
|
||||
do_footstep = TRUE
|
||||
@@ -596,6 +596,9 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
|
||||
/obj/item/guardiancreator/tech/choose/traitor
|
||||
possible_guardians = list("Assassin", "Chaos", "Charger", "Explosive", "Lightning", "Protector", "Ranged", "Standard", "Support")
|
||||
|
||||
/obj/item/guardiancreator/tech/choose/traitor/check_uplink_validity()
|
||||
return !used
|
||||
|
||||
/obj/item/guardiancreator/tech/choose
|
||||
random = FALSE
|
||||
|
||||
|
||||
@@ -392,7 +392,7 @@
|
||||
if(target)
|
||||
return new childspawn(target)
|
||||
|
||||
/mob/living/simple_animal/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
|
||||
/mob/living/simple_animal/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
|
||||
if(incapacitated())
|
||||
to_chat(src, "<span class='warning'>You can't do that right now!</span>")
|
||||
return FALSE
|
||||
|
||||
@@ -784,7 +784,7 @@
|
||||
return 0
|
||||
|
||||
//Can the mob use Topic to interact with machines
|
||||
/mob/proc/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
|
||||
/mob/proc/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
|
||||
return
|
||||
|
||||
/mob/proc/faction_check_mob(mob/target, exact_match)
|
||||
@@ -871,13 +871,7 @@
|
||||
return
|
||||
|
||||
/mob/proc/update_sight()
|
||||
for(var/O in orbiters)
|
||||
var/datum/orbit/orbit = O
|
||||
var/obj/effect/wisp/wisp = orbit.orbiter
|
||||
if (istype(wisp))
|
||||
sight |= wisp.sight_flags
|
||||
if(!isnull(wisp.lighting_alpha))
|
||||
lighting_alpha = min(lighting_alpha, wisp.lighting_alpha)
|
||||
SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT)
|
||||
|
||||
sync_lighting_plane_alpha()
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
if(INCORPOREAL_MOVE_BASIC)
|
||||
var/T = get_step(L,direct)
|
||||
if(T)
|
||||
L.loc = T
|
||||
L.forceMove(T)
|
||||
L.setDir(direct)
|
||||
if(INCORPOREAL_MOVE_SHADOW)
|
||||
if(prob(50))
|
||||
@@ -190,7 +190,7 @@
|
||||
new /obj/effect/temp_visual/dir_setting/ninja/shadow(mobloc, L.dir)
|
||||
var/T = get_step(L,direct)
|
||||
if(T)
|
||||
L.loc = T
|
||||
L.forceMove(T)
|
||||
L.setDir(direct)
|
||||
if(INCORPOREAL_MOVE_JAUNT) //Incorporeal move, but blocked by holy-watered tiles and salt piles.
|
||||
var/turf/open/floor/stepTurf = get_step(L, direct)
|
||||
@@ -209,7 +209,7 @@
|
||||
to_chat(L, "<span class='warning'>Holy energies block your path!</span>")
|
||||
return
|
||||
|
||||
L.loc = get_step(L, direct)
|
||||
L.forceMove(stepTurf)
|
||||
L.setDir(direct)
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
return machinery_computer.update_icon()
|
||||
|
||||
// This thing is not meant to be used on it's own, get topic data from our machinery owner.
|
||||
//obj/item/modular_computer/processor/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
|
||||
//obj/item/modular_computer/processor/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
|
||||
// if(!machinery_computer)
|
||||
// return 0
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
/obj/machinery/modular_computer/emag_act(mob/user)
|
||||
. = ..()
|
||||
if(cpu)
|
||||
return cpu.emag_act(user)
|
||||
. |= cpu.emag_act(user)
|
||||
|
||||
/obj/machinery/modular_computer/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
/datum/orbit
|
||||
var/atom/movable/orbiter
|
||||
var/atom/orbiting
|
||||
var/lock = TRUE
|
||||
var/turf/lastloc
|
||||
var/lastprocess
|
||||
|
||||
/datum/orbit/New(_orbiter, _orbiting, _lock)
|
||||
orbiter = _orbiter
|
||||
orbiting = _orbiting
|
||||
SSorbit.processing += src
|
||||
if (!orbiting.orbiters)
|
||||
orbiting.orbiters = list()
|
||||
orbiting.orbiters += src
|
||||
|
||||
if (orbiter.orbiting)
|
||||
orbiter.stop_orbit()
|
||||
orbiter.orbiting = src
|
||||
Check()
|
||||
lock = _lock
|
||||
|
||||
//do not qdel directly, use stop_orbit on the orbiter. (This way the orbiter can bind to the orbit stopping)
|
||||
/datum/orbit/Destroy(force = FALSE)
|
||||
SSorbit.processing -= src
|
||||
if (orbiter)
|
||||
orbiter.orbiting = null
|
||||
orbiter = null
|
||||
if (orbiting)
|
||||
if (orbiting.orbiters)
|
||||
orbiting.orbiters -= src
|
||||
if (!orbiting.orbiters.len)//we are the last orbit, delete the list
|
||||
orbiting.orbiters = null
|
||||
orbiting = null
|
||||
return ..()
|
||||
|
||||
/datum/orbit/proc/Check(turf/targetloc, list/checked_already = list())
|
||||
//Avoid infinite loops for people who end up orbiting themself through another orbiter
|
||||
checked_already[src] = TRUE
|
||||
if (!orbiter)
|
||||
qdel(src)
|
||||
return
|
||||
if (!orbiting)
|
||||
orbiter.stop_orbit()
|
||||
return
|
||||
if (!orbiter.orbiting) //admin wants to stop the orbit.
|
||||
orbiter.orbiting = src //set it back to us first
|
||||
orbiter.stop_orbit()
|
||||
var/atom/movable/AM = orbiting
|
||||
if(istype(AM) && AM.orbiting && AM.orbiting.orbiting == orbiter)
|
||||
orbiter.stop_orbit()
|
||||
return
|
||||
lastprocess = world.time
|
||||
if (!targetloc)
|
||||
targetloc = get_turf(orbiting)
|
||||
if (!targetloc || (!lock && orbiter.loc != lastloc && orbiter.loc != targetloc))
|
||||
orbiter.stop_orbit()
|
||||
return
|
||||
var/turf/old_turf = get_turf(orbiter)
|
||||
var/turf/new_turf = get_turf(targetloc)
|
||||
if (old_turf?.z != new_turf?.z)
|
||||
orbiter.onTransitZ(old_turf?.z, new_turf?.z)
|
||||
// DO NOT PORT TO FORCEMOVE - MEMECODE WILL KILL MC
|
||||
orbiter.loc = targetloc
|
||||
orbiter.update_parallax_contents()
|
||||
orbiter.update_light()
|
||||
lastloc = orbiter.loc
|
||||
for(var/other_orbit in orbiter.orbiters)
|
||||
var/datum/orbit/OO = other_orbit
|
||||
//Skip if checked already
|
||||
if(checked_already[OO])
|
||||
continue
|
||||
OO.Check(targetloc, checked_already)
|
||||
|
||||
/atom/movable/var/datum/orbit/orbiting = null
|
||||
/atom/var/list/orbiters = null
|
||||
|
||||
//A: atom to orbit
|
||||
//radius: range to orbit at, radius of the circle formed by orbiting (in pixels)
|
||||
//clockwise: whether you orbit clockwise or anti clockwise
|
||||
//rotation_speed: how fast to rotate (how many ds should it take for a rotation to complete)
|
||||
//rotation_segments: the resolution of the orbit circle, less = a more block circle, this can be used to produce hexagons (6 segments) triangles (3 segments), and so on, 36 is the best default.
|
||||
//pre_rotation: Chooses to rotate src 90 degress towards the orbit dir (clockwise/anticlockwise), useful for things to go "head first" like ghosts
|
||||
//lockinorbit: Forces src to always be on A's turf, otherwise the orbit cancels when src gets too far away (eg: ghosts)
|
||||
|
||||
/atom/movable/proc/orbit(atom/A, radius = 10, clockwise = FALSE, rotation_speed = 20, rotation_segments = 36, pre_rotation = TRUE, lockinorbit = FALSE)
|
||||
if (!istype(A))
|
||||
return
|
||||
|
||||
new/datum/orbit(src, A, lockinorbit)
|
||||
if (!orbiting) //something failed, and our orbit datum deleted itself
|
||||
return
|
||||
var/matrix/initial_transform = matrix(transform)
|
||||
|
||||
//Head first!
|
||||
if (pre_rotation)
|
||||
var/matrix/M = matrix(transform)
|
||||
var/pre_rot = 90
|
||||
if(!clockwise)
|
||||
pre_rot = -90
|
||||
M.Turn(pre_rot)
|
||||
transform = M
|
||||
|
||||
var/matrix/shift = matrix(transform)
|
||||
shift.Translate(0,radius)
|
||||
transform = shift
|
||||
|
||||
SpinAnimation(rotation_speed, -1, clockwise, rotation_segments)
|
||||
|
||||
//we stack the orbits up client side, so we can assign this back to normal server side without it breaking the orbit
|
||||
transform = initial_transform
|
||||
|
||||
/atom/movable/proc/stop_orbit()
|
||||
SpinAnimation(0,0)
|
||||
qdel(orbiting)
|
||||
|
||||
/atom/Destroy(force = FALSE)
|
||||
. = ..()
|
||||
if (orbiters)
|
||||
for (var/thing in orbiters)
|
||||
var/datum/orbit/O = thing
|
||||
if (O.orbiter)
|
||||
O.orbiter.stop_orbit()
|
||||
|
||||
/atom/movable/Destroy(force = FALSE)
|
||||
. = ..()
|
||||
if (orbiting)
|
||||
stop_orbit()
|
||||
|
||||
/atom/movable/proc/transfer_observers_to(atom/movable/target)
|
||||
if(orbiters)
|
||||
for(var/thing in orbiters)
|
||||
var/datum/orbit/O = thing
|
||||
if(O.orbiter && isobserver(O.orbiter))
|
||||
var/mob/dead/observer/D = O.orbiter
|
||||
D.ManualFollow(target)
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
/obj/item/paperplane
|
||||
name = "paper plane"
|
||||
desc = "Paper, folded in the shape of a plane."
|
||||
@@ -122,7 +122,7 @@
|
||||
to_chat(user, "<span class='notice'>Alt-click [src] to fold it into a paper plane.</span>")
|
||||
|
||||
/obj/item/paper/AltClick(mob/living/carbon/user, obj/item/I)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user), NO_TK))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You fold [src] into the shape of a plane!</span>")
|
||||
user.temporarilyRemoveItemFromInventory(src)
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
return
|
||||
|
||||
/obj/singularity/energy_ball/Destroy()
|
||||
if(orbiting && istype(orbiting.orbiting, /obj/singularity/energy_ball))
|
||||
var/obj/singularity/energy_ball/EB = orbiting.orbiting
|
||||
if(orbiting && istype(orbiting.parent, /obj/singularity/energy_ball))
|
||||
var/obj/singularity/energy_ball/EB = orbiting.parent
|
||||
EB.orbiting_balls -= src
|
||||
|
||||
for(var/ball in orbiting_balls)
|
||||
@@ -146,12 +146,12 @@
|
||||
|
||||
. = ..()
|
||||
/obj/singularity/energy_ball/stop_orbit()
|
||||
if (orbiting && istype(orbiting.orbiting, /obj/singularity/energy_ball))
|
||||
var/obj/singularity/energy_ball/orbitingball = orbiting.orbiting
|
||||
if (orbiting && istype(orbiting.parent, /obj/singularity/energy_ball))
|
||||
var/obj/singularity/energy_ball/orbitingball = orbiting.parent
|
||||
orbitingball.orbiting_balls -= src
|
||||
orbitingball.dissipate_strength = orbitingball.orbiting_balls.len
|
||||
..()
|
||||
if (!loc && !QDELETED(src))
|
||||
. = ..()
|
||||
if (!QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
@@ -59,3 +59,20 @@
|
||||
S.forceMove(D)
|
||||
D.injector = S
|
||||
..()
|
||||
|
||||
/obj/item/ammo_casing/syringegun/dart
|
||||
name = "used air canister"
|
||||
desc = "A small canister of compressed gas."
|
||||
projectile_type = /obj/item/projectile/bullet/dart/syringe/dart
|
||||
firing_effect_type = null
|
||||
harmful = FALSE
|
||||
|
||||
/obj/item/ammo_casing/syringegun/dart/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
|
||||
..()
|
||||
var/obj/item/gun/syringe/SG = loc
|
||||
if(!SG.syringes.len)
|
||||
return
|
||||
var/obj/item/reagent_containers/syringe/dart/S = SG.syringes[1]
|
||||
if(S.emptrig == TRUE)
|
||||
var/obj/item/projectile/bullet/dart/syringe/dart/D = BB
|
||||
D.emptrig = TRUE
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
new /obj/effect/temp_visual/heal(get_turf(target), "#80F5FF")
|
||||
target.adjustBruteLoss(-4)
|
||||
target.adjustFireLoss(-4)
|
||||
target.adjustToxLoss(-1)
|
||||
target.adjustToxLoss(-1, forced = TRUE)
|
||||
target.adjustOxyLoss(-1)
|
||||
return
|
||||
|
||||
|
||||
@@ -102,3 +102,23 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] cannot hold more syringes!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/syringe/dart
|
||||
name = "dart gun"
|
||||
desc = "A compressed air gun, designed to fit medicinal darts for application of medicine for those patients just out of reach."
|
||||
icon_state = "dartgun"
|
||||
item_state = "dartgun"
|
||||
materials = list(MAT_METAL=2000, MAT_GLASS=500)
|
||||
suppressed = TRUE //Softer fire sound
|
||||
can_unsuppress = FALSE
|
||||
|
||||
/obj/item/gun/syringe/dart/Initialize()
|
||||
..()
|
||||
chambered = new /obj/item/ammo_casing/syringegun/dart(src)
|
||||
|
||||
/obj/item/gun/syringe/dart/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
|
||||
if(istype(A, /obj/item/reagent_containers/syringe/dart))
|
||||
..()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You can't put the [A] into \the [src]!</span>")
|
||||
return FALSE
|
||||
|
||||
@@ -8,12 +8,14 @@
|
||||
. = ..()
|
||||
create_reagents(50, NO_REACT)
|
||||
|
||||
/obj/item/projectile/bullet/dart/on_hit(atom/target, blocked = FALSE)
|
||||
/obj/item/projectile/bullet/dart/on_hit(atom/target, blocked = FALSE, skip = FALSE)
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/M = target
|
||||
if(blocked != 100) // not completely blocked
|
||||
if(M.can_inject(null, FALSE, def_zone, piercing)) // Pass the hit zone to see if it can inject by whether it hit the head or the body.
|
||||
..()
|
||||
if(skip == TRUE)
|
||||
return
|
||||
reagents.reaction(M, INJECT)
|
||||
reagents.trans_to(M, reagents.total_volume)
|
||||
return TRUE
|
||||
@@ -36,3 +38,44 @@
|
||||
/obj/item/projectile/bullet/dart/syringe
|
||||
name = "syringe"
|
||||
icon_state = "syringeproj"
|
||||
|
||||
//I am in a mess of my own making
|
||||
/obj/item/projectile/bullet/dart/syringe/dart
|
||||
name = "Smartdart"
|
||||
icon_state = "dartproj"
|
||||
damage = 0
|
||||
var/emptrig = FALSE
|
||||
|
||||
/obj/item/projectile/bullet/dart/syringe/dart/on_hit(atom/target, blocked = FALSE)
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/M = target
|
||||
if(blocked != 100)
|
||||
if(M.can_inject(null, FALSE, def_zone, piercing)) // Pass the hit zone to see if it can inject by whether it hit the head or the body.
|
||||
..(target, blocked, TRUE)
|
||||
for(var/datum/reagent/R in reagents.reagent_list) //OD prevention time!
|
||||
if(istype(R, /datum/reagent/medicine)) //Is this a medicine?
|
||||
if(M.reagents.has_reagent(R.id))
|
||||
if(R.overdose_threshold == 0 || emptrig == TRUE) //Is there a possible OD?
|
||||
M.reagents.add_reagent(R.id, R.volume)
|
||||
else
|
||||
var/transVol = CLAMP(R.volume, 0, (R.overdose_threshold - M.reagents.get_reagent_amount(R.id)) -1)
|
||||
M.reagents.add_reagent(R.id, transVol)
|
||||
else
|
||||
if(!R.overdose_threshold == 0)
|
||||
var/transVol = CLAMP(R.volume, 0, R.overdose_threshold-1)
|
||||
M.reagents.add_reagent(R.id, transVol)
|
||||
else
|
||||
M.reagents.add_reagent(R.id, R.volume)
|
||||
|
||||
|
||||
|
||||
target.visible_message("<span class='notice'>\The [src] beeps!</span>")
|
||||
to_chat("<span class='notice'><i>You feel a tiny prick as a smartdart embeds itself in you with a beep.</i></span>")
|
||||
return TRUE
|
||||
else
|
||||
blocked = 100
|
||||
target.visible_message("<span class='danger'>\The [src] was deflected!</span>", \
|
||||
"<span class='userdanger'>You see a [src] bounce off you, booping sadly!</span>")
|
||||
|
||||
target.visible_message("<span class='danger'>\The [src] fails to land on target!</span>")
|
||||
return TRUE
|
||||
|
||||
@@ -21,7 +21,9 @@
|
||||
if(GLOB.chemical_reactions_list)
|
||||
return
|
||||
|
||||
var/paths = subtypesof(/datum/chemical_reaction)
|
||||
|
||||
//Randomized need to go last since they need to check against conflicts with normal recipes
|
||||
var/paths = subtypesof(/datum/chemical_reaction) - typesof(/datum/chemical_reaction/randomized) + subtypesof(/datum/chemical_reaction/randomized)
|
||||
GLOB.chemical_reactions_list = list()
|
||||
|
||||
for(var/path in paths)
|
||||
@@ -29,6 +31,9 @@
|
||||
var/datum/chemical_reaction/D = new path()
|
||||
var/list/reaction_ids = list()
|
||||
|
||||
if(!D.id)
|
||||
continue
|
||||
|
||||
if(D.required_reagents && D.required_reagents.len)
|
||||
for(var/reaction in D.required_reagents)
|
||||
reaction_ids += reaction
|
||||
@@ -267,6 +272,9 @@
|
||||
continue
|
||||
if(!C)
|
||||
C = R.holder.my_atom
|
||||
if(!R.metabolizing)
|
||||
R.metabolizing = TRUE
|
||||
R.on_mob_metabolize(C)
|
||||
if(C && R)
|
||||
if(C.reagent_check(R) != 1)
|
||||
if(can_overdose)
|
||||
@@ -313,6 +321,21 @@
|
||||
C.update_stamina()
|
||||
update_total()
|
||||
|
||||
//Signals that metabolization has stopped, triggering the end of trait-based effects
|
||||
/datum/reagents/proc/end_metabolization(mob/living/carbon/C, keep_liverless = TRUE)
|
||||
var/list/cached_reagents = reagent_list
|
||||
for(var/reagent in cached_reagents)
|
||||
var/datum/reagent/R = reagent
|
||||
if(QDELETED(R.holder))
|
||||
continue
|
||||
if(keep_liverless && R.self_consuming) //Will keep working without a liver
|
||||
continue
|
||||
if(!C)
|
||||
C = R.holder.my_atom
|
||||
if(R.metabolizing)
|
||||
R.metabolizing = FALSE
|
||||
R.on_mob_end_metabolize(C)
|
||||
|
||||
/datum/reagents/proc/conditional_update_move(atom/A, Running = 0)
|
||||
var/list/cached_reagents = reagent_list
|
||||
for(var/reagent in cached_reagents)
|
||||
@@ -466,6 +489,9 @@
|
||||
if(R.id == reagent)
|
||||
if(my_atom && isliving(my_atom))
|
||||
var/mob/living/M = my_atom
|
||||
if(R.metabolizing)
|
||||
R.metabolizing = FALSE
|
||||
R.on_mob_end_metabolize(M)
|
||||
R.on_mob_delete(M)
|
||||
qdel(R)
|
||||
reagent_list -= R
|
||||
|
||||
@@ -51,7 +51,8 @@
|
||||
//these become available once upgraded.
|
||||
var/list/upgrade_reagents = list(
|
||||
"oil",
|
||||
"ammonia"
|
||||
"ammonia",
|
||||
"ash"
|
||||
)
|
||||
|
||||
var/list/upgrade_reagents2 = list(
|
||||
@@ -250,13 +251,8 @@
|
||||
work_animation()
|
||||
. = TRUE
|
||||
if("eject")
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
if(Adjacent(usr) && !issilicon(usr))
|
||||
usr.put_in_hands(beaker)
|
||||
beaker = null
|
||||
update_icon()
|
||||
. = TRUE
|
||||
replace_beaker(usr)
|
||||
. = TRUE //no afterattack
|
||||
if("dispense_recipe")
|
||||
if(!is_operational() || QDELETED(cell))
|
||||
return
|
||||
@@ -269,7 +265,7 @@
|
||||
if(beaker && dispensable_reagents.Find(r_id)) // but since we verify we have the reagent, it'll be fine
|
||||
var/datum/reagents/R = beaker.reagents
|
||||
var/free = R.maximum_volume - R.total_volume
|
||||
var/actual = min(round(chemicals_to_dispense[key], res), (cell.charge * powerefficiency)*10, free)
|
||||
var/actual = min(max(chemicals_to_dispense[key], res), (cell.charge * powerefficiency)*10, free)
|
||||
if(actual)
|
||||
if(!cell.use(actual / powerefficiency))
|
||||
say("Not enough energy to complete operation!")
|
||||
@@ -322,14 +318,12 @@
|
||||
return
|
||||
if(istype(I, /obj/item/reagent_containers) && !(I.item_flags & ABSTRACT) && I.is_open_container())
|
||||
var/obj/item/reagent_containers/B = I
|
||||
. = 1 //no afterattack
|
||||
if(beaker)
|
||||
to_chat(user, "<span class='warning'>A container is already loaded into [src]!</span>")
|
||||
return
|
||||
. = TRUE //no afterattack
|
||||
if(!user.transferItemToLoc(B, src))
|
||||
return
|
||||
beaker = B
|
||||
replace_beaker(user, B)
|
||||
to_chat(user, "<span class='notice'>You add [B] to [src].</span>")
|
||||
updateUsrDialog()
|
||||
update_icon()
|
||||
else if(user.a_intent != INTENT_HARM && !istype(I, /obj/item/card/emag))
|
||||
to_chat(user, "<span class='warning'>You can't load [I] into [src]!</span>")
|
||||
@@ -381,7 +375,17 @@
|
||||
dispensable_reagents |= upgrade_reagents3
|
||||
powerefficiency = round(newpowereff, 0.01)
|
||||
|
||||
|
||||
/obj/machinery/chem_dispenser/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
if(user && Adjacent(user) && !issiliconoradminghost(user))
|
||||
user.put_in_hands(beaker)
|
||||
if(new_beaker)
|
||||
beaker = new_beaker
|
||||
else
|
||||
beaker = null
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_dispenser/on_deconstruction()
|
||||
cell = null
|
||||
@@ -417,6 +421,12 @@
|
||||
final_list += list(avoid_assoc_duplicate_keys(fuck[1],key_list) = text2num(fuck[2]))
|
||||
return final_list
|
||||
|
||||
/obj/machinery/chem_dispenser/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
replace_beaker(user)
|
||||
return
|
||||
|
||||
/obj/machinery/chem_dispenser/drinks/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE)
|
||||
@@ -480,9 +490,16 @@
|
||||
"tomatojuice",
|
||||
"lemonjuice",
|
||||
"menthol"
|
||||
) //prevents the soda machine from obtaining chemical upgrades. .
|
||||
upgrade_reagents = null
|
||||
upgrade_reagents2 = null
|
||||
)
|
||||
upgrade_reagents = list(
|
||||
"mushroomhallucinogen",
|
||||
"nothing",
|
||||
"cryoxadone"
|
||||
)
|
||||
upgrade_reagents2 = list(
|
||||
"banana",
|
||||
"berryjuice"
|
||||
)
|
||||
upgrade_reagents3 = null
|
||||
emagged_reagents = list(
|
||||
"thirteenloko",
|
||||
@@ -535,18 +552,19 @@
|
||||
"creme_de_cacao",
|
||||
"triple_sec",
|
||||
"sake"
|
||||
)//prevents the booze machine from obtaining chemical upgrades.
|
||||
upgrade_reagents = null
|
||||
)
|
||||
upgrade_reagents = list(
|
||||
"ethanol",
|
||||
"fernet"
|
||||
)
|
||||
upgrade_reagents2 = null
|
||||
upgrade_reagents3 = null
|
||||
emagged_reagents = list(
|
||||
"ethanol",
|
||||
"iron",
|
||||
"alexander",
|
||||
"clownstears",
|
||||
"minttoxin",
|
||||
"atomicbomb",
|
||||
"fernet",
|
||||
"aphro",
|
||||
"aphro+"
|
||||
)
|
||||
|
||||
@@ -28,13 +28,23 @@
|
||||
else
|
||||
icon_state = "mixer0b"
|
||||
|
||||
/obj/machinery/chem_heater/proc/eject_beaker(mob/user)
|
||||
/obj/machinery/chem_heater/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
replace_beaker(user)
|
||||
return
|
||||
|
||||
/obj/machinery/chem_heater/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
if(Adjacent(user) && !issilicon(user))
|
||||
if(user && Adjacent(user) && !issiliconoradminghost(user))
|
||||
user.put_in_hands(beaker)
|
||||
if(new_beaker)
|
||||
beaker = new_beaker
|
||||
else
|
||||
beaker = null
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_heater/RefreshParts()
|
||||
heater_coefficient = 0.1
|
||||
@@ -58,21 +68,19 @@
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/reagent_containers) && !(I.item_flags & ABSTRACT) && I.is_open_container())
|
||||
. = 1 //no afterattack
|
||||
if(beaker)
|
||||
to_chat(user, "<span class='warning'>A container is already loaded into [src]!</span>")
|
||||
. = TRUE //no afterattack
|
||||
var/obj/item/reagent_containers/B = I
|
||||
if(!user.transferItemToLoc(B, src))
|
||||
return
|
||||
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
beaker = I
|
||||
to_chat(user, "<span class='notice'>You add [I] to [src].</span>")
|
||||
replace_beaker(user, B)
|
||||
to_chat(user, "<span class='notice'>You add [B] to [src].</span>")
|
||||
updateUsrDialog()
|
||||
update_icon()
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/chem_heater/on_deconstruction()
|
||||
eject_beaker()
|
||||
replace_beaker()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/chem_heater/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
@@ -122,5 +130,5 @@
|
||||
target_temperature = CLAMP(target, 0, 1000)
|
||||
if("eject")
|
||||
on = FALSE
|
||||
eject_beaker(usr)
|
||||
replace_beaker(usr)
|
||||
. = TRUE
|
||||
|
||||
@@ -60,16 +60,6 @@
|
||||
else
|
||||
icon_state = "mixer0"
|
||||
|
||||
/obj/machinery/chem_master/proc/eject_beaker(mob/user)
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
if(Adjacent(user) && !issilicon(user))
|
||||
user.put_in_hands(beaker)
|
||||
else
|
||||
adjust_item_drop_location(beaker)
|
||||
beaker = null
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/chem_master/blob_act(obj/structure/blob/B)
|
||||
if (prob(50))
|
||||
qdel(src)
|
||||
@@ -85,36 +75,49 @@
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/reagent_containers) && !(I.item_flags & ABSTRACT) && I.is_open_container())
|
||||
. = 1 // no afterattack
|
||||
. = TRUE // no afterattack
|
||||
if(panel_open)
|
||||
to_chat(user, "<span class='warning'>You can't use the [src.name] while its panel is opened!</span>")
|
||||
return
|
||||
if(beaker)
|
||||
to_chat(user, "<span class='warning'>A container is already loaded into [src]!</span>")
|
||||
var/obj/item/reagent_containers/B = I
|
||||
if(!user.transferItemToLoc(B, src))
|
||||
return
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
|
||||
beaker = I
|
||||
to_chat(user, "<span class='notice'>You add [I] to [src].</span>")
|
||||
src.updateUsrDialog()
|
||||
replace_beaker(user, B)
|
||||
to_chat(user, "<span class='notice'>You add [B] to [src].</span>")
|
||||
updateUsrDialog()
|
||||
update_icon()
|
||||
|
||||
else if(!condi && istype(I, /obj/item/storage/pill_bottle))
|
||||
if(bottle)
|
||||
to_chat(user, "<span class='warning'>A pill bottle is already loaded into [src]!</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
|
||||
bottle = I
|
||||
to_chat(user, "<span class='notice'>You add [I] into the dispenser slot.</span>")
|
||||
src.updateUsrDialog()
|
||||
updateUsrDialog()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/chem_master/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
replace_beaker(user)
|
||||
return
|
||||
|
||||
/obj/machinery/chem_master/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
if(user && Adjacent(user) && !issiliconoradminghost(user))
|
||||
user.put_in_hands(beaker)
|
||||
if(new_beaker)
|
||||
beaker = new_beaker
|
||||
else
|
||||
beaker = null
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_master/on_deconstruction()
|
||||
eject_beaker()
|
||||
replace_beaker(usr)
|
||||
if(bottle)
|
||||
bottle.forceMove(drop_location())
|
||||
adjust_item_drop_location(bottle)
|
||||
@@ -164,7 +167,7 @@
|
||||
return
|
||||
switch(action)
|
||||
if("eject")
|
||||
eject_beaker(usr)
|
||||
replace_beaker(usr)
|
||||
. = TRUE
|
||||
|
||||
if("ejectp")
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
var/speed = 1
|
||||
var/list/holdingitems
|
||||
|
||||
var/static/radial_examine = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_examine")
|
||||
var/static/radial_eject = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_eject")
|
||||
var/static/radial_grind = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_grind")
|
||||
var/static/radial_juice = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_juice")
|
||||
var/static/radial_mix = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_mix")
|
||||
|
||||
/obj/machinery/reagentgrinder/Initialize()
|
||||
. = ..()
|
||||
holdingitems = list()
|
||||
@@ -51,7 +57,6 @@
|
||||
if(A == beaker)
|
||||
beaker = null
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
if(holdingitems[A])
|
||||
holdingitems -= A
|
||||
|
||||
@@ -67,6 +72,18 @@
|
||||
else
|
||||
icon_state = "juicer0"
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
if(user && Adjacent(user) && !issiliconoradminghost(user))
|
||||
user.put_in_hands(beaker)
|
||||
if(new_beaker)
|
||||
beaker = new_beaker
|
||||
else
|
||||
beaker = null
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/reagentgrinder/attackby(obj/item/I, mob/user, params)
|
||||
//You can only screw open empty grinder
|
||||
if(!beaker && !length(holdingitems) && default_deconstruction_screwdriver(user, icon_state, icon_state, I))
|
||||
@@ -82,17 +99,14 @@
|
||||
return TRUE
|
||||
|
||||
if (istype(I, /obj/item/reagent_containers) && !(I.item_flags & ABSTRACT) && I.is_open_container())
|
||||
if (!beaker)
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
to_chat(user, "<span class='warning'>[I] is stuck to your hand!</span>")
|
||||
return TRUE
|
||||
to_chat(user, "<span class='notice'>You slide [I] into [src].</span>")
|
||||
beaker = I
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>There's already a container inside [src].</span>")
|
||||
return TRUE //no afterattack
|
||||
var/obj/item/reagent_containers/B = I
|
||||
. = TRUE
|
||||
if(!user.transferItemToLoc(B, src))
|
||||
return
|
||||
replace_beaker(user, B)
|
||||
to_chat(user, "<span class='notice'>You add [B] to [src].</span>")
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(holdingitems.len >= limit)
|
||||
to_chat(user, "<span class='warning'>[src] is filled to capacity!</span>")
|
||||
@@ -108,8 +122,6 @@
|
||||
to_chat(user, "<span class='notice'>You empty [I] into [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You fill [src] to the brim.</span>")
|
||||
|
||||
updateUsrDialog()
|
||||
return TRUE
|
||||
|
||||
if(!I.grind_results && !I.juice_results)
|
||||
@@ -125,104 +137,89 @@
|
||||
if(user.transferItemToLoc(I, src))
|
||||
to_chat(user, "<span class='notice'>You add [I] to [src].</span>")
|
||||
holdingitems[I] = TRUE
|
||||
updateUsrDialog()
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/reagentgrinder/ui_interact(mob/user) // The microwave Menu //I am reasonably certain that this is not a microwave
|
||||
. = ..()
|
||||
var/is_chamber_empty = FALSE
|
||||
var/is_beaker_ready = FALSE
|
||||
var/processing_chamber = ""
|
||||
var/beaker_contents = ""
|
||||
var/dat = ""
|
||||
|
||||
if(!operating)
|
||||
for (var/i in holdingitems)
|
||||
var/obj/item/O = i
|
||||
processing_chamber += "\A [O.name]<BR>"
|
||||
if(operating || !user.canUseTopic(src, !issilicon(user)))
|
||||
return
|
||||
|
||||
if (!processing_chamber)
|
||||
is_chamber_empty = TRUE
|
||||
processing_chamber = "Nothing."
|
||||
if (!beaker)
|
||||
beaker_contents = "<B>No beaker attached.</B><br>"
|
||||
else
|
||||
is_beaker_ready = TRUE
|
||||
beaker_contents = "<B>The beaker contains:</B><br>"
|
||||
var/anything = FALSE
|
||||
for(var/datum/reagent/R in beaker.reagents.reagent_list)
|
||||
anything = TRUE
|
||||
beaker_contents += "[R.volume] - [R.name]<br>"
|
||||
if(!anything)
|
||||
beaker_contents += "Nothing<br>"
|
||||
var/list/options = list()
|
||||
|
||||
dat = {"
|
||||
<b>Processing chamber contains:</b><br>
|
||||
[processing_chamber]<br>
|
||||
[beaker_contents]<hr>
|
||||
"}
|
||||
if (is_beaker_ready)
|
||||
if(!is_chamber_empty && !(stat & (NOPOWER|BROKEN)))
|
||||
dat += "<A href='?src=[REF(src)];action=grind'>Grind the reagents</a><BR>"
|
||||
dat += "<A href='?src=[REF(src)];action=juice'>Juice the reagents</a><BR><BR>"
|
||||
else if (beaker.reagents.total_volume)
|
||||
dat += "<A href='?src=[REF(src)];action=mix'>Mix the reagents</a><BR><BR>"
|
||||
if(length(holdingitems))
|
||||
dat += "<A href='?src=[REF(src)];action=eject'>Eject the reagents</a><BR>"
|
||||
if(beaker)
|
||||
dat += "<A href='?src=[REF(src)];action=detach'>Detach the beaker</a><BR>"
|
||||
if(beaker || length(holdingitems))
|
||||
options["eject"] = radial_eject
|
||||
|
||||
if(isAI(user))
|
||||
if(stat & NOPOWER)
|
||||
return
|
||||
options["examine"] = radial_examine
|
||||
|
||||
// if there is no power or it's broken, the procs will fail but the buttons will still show
|
||||
if(length(holdingitems))
|
||||
options["grind"] = radial_grind
|
||||
options["juice"] = radial_juice
|
||||
else if(beaker?.reagents.total_volume)
|
||||
options["mix"] = radial_mix
|
||||
|
||||
var/choice
|
||||
|
||||
if(length(options) < 1)
|
||||
return
|
||||
if(length(options) == 1)
|
||||
for(var/key in options)
|
||||
choice = key
|
||||
else
|
||||
dat += "Please wait..."
|
||||
choice = show_radial_menu(user, src, options, require_near = !issilicon(user))
|
||||
|
||||
var/datum/browser/popup = new(user, "reagentgrinder", "All-In-One Grinder")
|
||||
popup.set_content(dat)
|
||||
popup.set_title_image(user.browse_rsc_icon(icon, icon_state))
|
||||
popup.open(1)
|
||||
return
|
||||
// post choice verification
|
||||
if(operating || (isAI(user) && stat & NOPOWER) || !user.canUseTopic(src, !issilicon(user)))
|
||||
return
|
||||
|
||||
/obj/machinery/reagentgrinder/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
var/mob/user = usr
|
||||
if(!user.canUseTopic(src))
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
user.set_machine(src)
|
||||
if(operating)
|
||||
updateUsrDialog()
|
||||
return
|
||||
switch(href_list["action"])
|
||||
if ("grind")
|
||||
switch(choice)
|
||||
if("eject")
|
||||
eject(user)
|
||||
if("grind")
|
||||
grind(user)
|
||||
if("juice")
|
||||
juice(user)
|
||||
if("mix")
|
||||
mix(user)
|
||||
if("eject")
|
||||
eject(user)
|
||||
if("detach")
|
||||
detach(user)
|
||||
updateUsrDialog()
|
||||
if("examine")
|
||||
examine(user)
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/detach(mob/user)
|
||||
if(!beaker)
|
||||
/obj/machinery/reagentgrinder/examine(mob/user)
|
||||
. = ..()
|
||||
if(!in_range(user, src) && !issilicon(user) && !isobserver(user))
|
||||
to_chat(user, "<span class='warning'>You're too far away to examine [src]'s contents and display!</span>")
|
||||
return
|
||||
beaker.forceMove(drop_location())
|
||||
if(Adjacent(user) && !issilicon(user))
|
||||
user.put_in_hands(beaker)
|
||||
beaker = null
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
|
||||
if(operating)
|
||||
to_chat(user, "<span class='warning'>\The [src] is operating.</span>")
|
||||
return
|
||||
|
||||
if(beaker || length(holdingitems))
|
||||
to_chat(user, "<span class='notice'>\The [src] contains:</span>")
|
||||
if(beaker)
|
||||
to_chat(user, "<span class='notice'>- \A [beaker].</span>")
|
||||
for(var/i in holdingitems)
|
||||
var/obj/item/O = i
|
||||
to_chat(user, "<span class='notice'>- \A [O.name].</span>")
|
||||
|
||||
if(!(stat & (NOPOWER|BROKEN)))
|
||||
to_chat(user, "<span class='notice'>The status display reads:</span>")
|
||||
to_chat(user, "<span class='notice'>- Grinding reagents at <b>[speed*100]%</b>.<span>")
|
||||
if(beaker)
|
||||
for(var/datum/reagent/R in beaker.reagents.reagent_list)
|
||||
to_chat(user, "<span class='notice'>- [R.volume] units of [R.name].</span>")
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/eject(mob/user)
|
||||
if(!length(holdingitems))
|
||||
return
|
||||
for(var/i in holdingitems)
|
||||
var/obj/item/O = i
|
||||
O.forceMove(drop_location())
|
||||
holdingitems -= O
|
||||
updateUsrDialog()
|
||||
if(beaker)
|
||||
replace_beaker(user)
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/remove_object(obj/item/O)
|
||||
holdingitems -= O
|
||||
@@ -240,7 +237,6 @@
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/operate_for(time, silent = FALSE, juicing = FALSE)
|
||||
shake_for(time / speed)
|
||||
updateUsrDialog()
|
||||
operating = TRUE
|
||||
if(!silent)
|
||||
if(!juicing)
|
||||
@@ -251,11 +247,10 @@
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/stop_operating()
|
||||
operating = FALSE
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/juice()
|
||||
power_change()
|
||||
if(!beaker || (beaker && (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)))
|
||||
if(!beaker || stat & (NOPOWER|BROKEN) || beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
return
|
||||
operate_for(50, juicing = TRUE)
|
||||
for(var/obj/item/i in holdingitems)
|
||||
@@ -274,7 +269,7 @@
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/grind()
|
||||
power_change()
|
||||
if(!beaker || (beaker && beaker.reagents.total_volume >= beaker.reagents.maximum_volume))
|
||||
if(!beaker || stat & (NOPOWER|BROKEN) || beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
return
|
||||
operate_for(60)
|
||||
for(var/i in holdingitems)
|
||||
@@ -296,13 +291,13 @@
|
||||
/obj/machinery/reagentgrinder/proc/mix(mob/user)
|
||||
//For butter and other things that would change upon shaking or mixing
|
||||
power_change()
|
||||
if(!beaker)
|
||||
if(!beaker || stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
operate_for(50, juicing = TRUE)
|
||||
addtimer(CALLBACK(src, /obj/machinery/reagentgrinder/proc/mix_complete), 50)
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/mix_complete()
|
||||
if(beaker && beaker.reagents.total_volume)
|
||||
if(beaker?.reagents.total_volume)
|
||||
//Recipe to make Butter
|
||||
var/butter_amt = FLOOR(beaker.reagents.get_reagent_amount("milk") / MILK_TO_BUTTER_COEFF, 1)
|
||||
beaker.reagents.remove_reagent("milk", MILK_TO_BUTTER_COEFF * butter_amt)
|
||||
|
||||
@@ -33,6 +33,10 @@
|
||||
var/addiction_stage4_end = 40
|
||||
var/overdosed = 0 // You fucked up and this is now triggering its overdose effects, purge that shit quick.
|
||||
var/self_consuming = FALSE
|
||||
var/metabolizing = FALSE
|
||||
|
||||
|
||||
|
||||
|
||||
/datum/reagent/Destroy() // This should only be called by the holder, so it's already handled clearing its references
|
||||
. = ..()
|
||||
@@ -68,6 +72,14 @@
|
||||
/datum/reagent/proc/on_mob_delete(mob/living/L)
|
||||
return
|
||||
|
||||
// Called when this reagent first starts being metabolized by a liver
|
||||
/datum/reagent/proc/on_mob_metabolize(mob/living/L)
|
||||
return
|
||||
|
||||
// Called when this reagent stops being metabolized by a liver
|
||||
/datum/reagent/proc/on_mob_end_metabolize(mob/living/L)
|
||||
return
|
||||
|
||||
/datum/reagent/proc/on_move(mob/M)
|
||||
return
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
M.add_atom_colour(color, TEMPORARY_COLOUR_PRIORITY)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/beer/green/on_mob_delete(mob/living/M)
|
||||
/datum/reagent/consumable/ethanol/beer/green/on_mob_end_metabolize(mob/living/M)
|
||||
M.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, color)
|
||||
|
||||
/datum/reagent/consumable/ethanol/kahlua
|
||||
@@ -569,13 +569,13 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_desc = "Tequila and Coffee liqueur, brought together in a mouthwatering mixture. Drink up."
|
||||
var/tough_text
|
||||
|
||||
/datum/reagent/consumable/ethanol/brave_bull/on_mob_add(mob/living/M)
|
||||
/datum/reagent/consumable/ethanol/brave_bull/on_mob_metabolize(mob/living/M)
|
||||
tough_text = pick("brawny", "tenacious", "tough", "hardy", "sturdy") //Tuff stuff
|
||||
to_chat(M, "<span class='notice'>You feel [tough_text]!</span>")
|
||||
M.maxHealth += 10 //Brave Bull makes you sturdier, and thus capable of withstanding a tiny bit more punishment.
|
||||
M.health += 10
|
||||
|
||||
/datum/reagent/consumable/ethanol/brave_bull/on_mob_delete(mob/living/M)
|
||||
/datum/reagent/consumable/ethanol/brave_bull/on_mob_end_metabolize(mob/living/M)
|
||||
to_chat(M, "<span class='notice'>You no longer feel [tough_text].</span>")
|
||||
M.maxHealth -= 10
|
||||
M.health = min(M.health - 10, M.maxHealth) //This can indeed crit you if you're alive solely based on alchol ingestion
|
||||
@@ -593,7 +593,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_desc = "Oh great, now you feel nostalgic about sunrises back on Terra..."
|
||||
var/obj/effect/light_holder
|
||||
|
||||
/datum/reagent/consumable/ethanol/tequila_sunrise/on_mob_add(mob/living/M)
|
||||
/datum/reagent/consumable/ethanol/tequila_sunrise/on_mob_metabolize(mob/living/M)
|
||||
to_chat(M, "<span class='notice'>You feel gentle warmth spread through your body!</span>")
|
||||
light_holder = new(M)
|
||||
light_holder.set_light(3, 0.7, "#FFCC00") //Tequila Sunrise makes you radiate dim light, like a sunrise!
|
||||
@@ -605,7 +605,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
light_holder.forceMove(M)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/tequila_sunrise/on_mob_delete(mob/living/M)
|
||||
/datum/reagent/consumable/ethanol/tequila_sunrise/on_mob_end_metabolize(mob/living/M)
|
||||
to_chat(M, "<span class='notice'>The warmth in your body fades.</span>")
|
||||
QDEL_NULL(light_holder)
|
||||
|
||||
@@ -671,7 +671,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_desc = "A manly concoction made from Ale and Beer. Intended for true men only."
|
||||
var/dorf_mode
|
||||
|
||||
/datum/reagent/consumable/ethanol/manly_dorf/on_mob_add(mob/living/M)
|
||||
/datum/reagent/consumable/ethanol/manly_dorf/on_mob_metabolize(mob/living/M)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.dna.check_mutation(DWARFISM) || HAS_TRAIT(H, TRAIT_ALCOHOL_TOLERANCE))
|
||||
@@ -722,7 +722,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_desc = "Kahlua, Irish Cream, and cognac. You will get bombed."
|
||||
shot_glass_icon_state = "b52glass"
|
||||
|
||||
/datum/reagent/consumable/ethanol/b52/on_mob_add(mob/living/M)
|
||||
/datum/reagent/consumable/ethanol/b52/on_mob_metabolize(mob/living/M)
|
||||
playsound(M, 'sound/effects/explosion_distant.ogg', 100, FALSE)
|
||||
|
||||
/datum/reagent/consumable/ethanol/irishcoffee
|
||||
@@ -1534,7 +1534,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_desc = "If you're feeling low, count on the buttery flavor of our own bastion bourbon."
|
||||
shot_glass_icon_state = "shotglassgreen"
|
||||
|
||||
/datum/reagent/consumable/ethanol/bastion_bourbon/on_mob_add(mob/living/L)
|
||||
/datum/reagent/consumable/ethanol/bastion_bourbon/on_mob_metabolize(mob/living/L)
|
||||
var/heal_points = 10
|
||||
if(L.health <= 0)
|
||||
heal_points = 20 //heal more if we're in softcrit
|
||||
@@ -1618,7 +1618,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_name = "Crevice Spike"
|
||||
glass_desc = "It'll either knock the drunkenness out of you or knock you out cold. Both, probably."
|
||||
|
||||
/datum/reagent/consumable/ethanol/crevice_spike/on_mob_add(mob/living/L) //damage only applies when drink first enters system and won't again until drink metabolizes out
|
||||
/datum/reagent/consumable/ethanol/crevice_spike/on_mob_metabolize(mob/living/L) //damage only applies when drink first enters system and won't again until drink metabolizes out
|
||||
L.adjustBruteLoss(3 * min(5,volume)) //minimum 3 brute damage on ingestion to limit non-drink means of injury - a full 5 unit gulp of the drink trucks you for the full 15
|
||||
|
||||
/datum/reagent/consumable/ethanol/sake
|
||||
@@ -1661,7 +1661,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_desc = "A creamy, indulgent delight that is stronger than it seems."
|
||||
var/obj/item/shield/mighty_shield
|
||||
|
||||
/datum/reagent/consumable/ethanol/alexander/on_mob_add(mob/living/L)
|
||||
/datum/reagent/consumable/ethanol/alexander/on_mob_metabolize(mob/living/L)
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/thehuman = L
|
||||
for(var/obj/item/shield/theshield in thehuman.contents)
|
||||
@@ -1675,7 +1675,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
if(mighty_shield && !(mighty_shield in L.contents)) //If you had a shield and lose it, you lose the reagent as well. Otherwise this is just a normal drink.
|
||||
L.reagents.del_reagent("alexander")
|
||||
|
||||
/datum/reagent/consumable/ethanol/alexander/on_mob_delete(mob/living/L)
|
||||
/datum/reagent/consumable/ethanol/alexander/on_mob_end_metabolize(mob/living/L)
|
||||
if(mighty_shield)
|
||||
mighty_shield.block_chance -= 10
|
||||
to_chat(L,"<span class='notice'>You notice [mighty_shield] looks worn again. Weird.</span>")
|
||||
@@ -1796,7 +1796,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
M.overeatduration = 0
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/fanciulli/on_mob_add(mob/living/M)
|
||||
/datum/reagent/consumable/ethanol/fanciulli/on_mob_metabolize(mob/living/M)
|
||||
if(M.health > 0)
|
||||
M.adjustStaminaLoss(20)
|
||||
. = TRUE
|
||||
@@ -1820,7 +1820,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
M.adjust_bodytemperature(-20 * TEMPERATURE_DAMAGE_COEFFICIENT, T0C)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/branca_menta/on_mob_add(mob/living/M)
|
||||
/datum/reagent/consumable/ethanol/branca_menta/on_mob_metabolize(mob/living/M)
|
||||
if(M.health > 0)
|
||||
M.adjustStaminaLoss(35)
|
||||
. = TRUE
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
C.hal_screwyhud = SCREWYHUD_HEALTHY //fully healed, honest
|
||||
..()
|
||||
|
||||
/datum/reagent/blob/regenerative_materia/on_mob_delete(mob/living/M)
|
||||
/datum/reagent/blob/regenerative_materia/on_mob_end_metabolize(mob/living/M)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/N = M
|
||||
N.hal_screwyhud = 0
|
||||
|
||||
@@ -213,15 +213,15 @@
|
||||
glass_desc = "White and nutritious goodness!"
|
||||
|
||||
/datum/reagent/consumable/milk/on_mob_life(mob/living/carbon/M)
|
||||
if(M.getBruteLoss() && prob(20))
|
||||
M.heal_bodypart_damage(1,0, 0)
|
||||
if(HAS_TRAIT(M, TRAIT_CALCIUM_HEALER))
|
||||
M.heal_bodypart_damage(1.5,0, 0)
|
||||
. = 1
|
||||
else
|
||||
if(M.getBruteLoss() && prob(20))
|
||||
M.heal_bodypart_damage(1,0, 0)
|
||||
. = 1
|
||||
if(holder.has_reagent("capsaicin"))
|
||||
holder.remove_reagent("capsaicin", 2)
|
||||
var/datum/dna/Mdna = M.has_dna()
|
||||
if(Mdna && Mdna.species && (Mdna.species.id == "plasmaman" || Mdna.species.id == "skeleton"))
|
||||
M.heal_bodypart_damage(1,0, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/soymilk
|
||||
@@ -390,11 +390,11 @@
|
||||
glass_name = "glass of Nuka Cola"
|
||||
glass_desc = "Don't cry, Don't raise your eye, It's only nuclear wasteland."
|
||||
|
||||
/datum/reagent/consumable/nuka_cola/on_mob_add(mob/living/L)
|
||||
/datum/reagent/consumable/nuka_cola/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
ADD_TRAIT(L, TRAIT_GOTTAGOFAST, id)
|
||||
|
||||
/datum/reagent/consumable/nuka_cola/on_mob_delete(mob/living/L)
|
||||
/datum/reagent/consumable/nuka_cola/on_mob_end_metabolize(mob/living/L)
|
||||
REMOVE_TRAIT(L, TRAIT_GOTTAGOFAST, id)
|
||||
..()
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
taste_description = "bitterness"
|
||||
var/trippy = TRUE //Does this drug make you trip?
|
||||
|
||||
/datum/reagent/drug/on_mob_delete(mob/living/M)
|
||||
/datum/reagent/drug/on_mob_end_metabolize(mob/living/M)
|
||||
if(trippy)
|
||||
SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "[id]_high")
|
||||
|
||||
@@ -168,11 +168,11 @@
|
||||
var/jitter = TRUE
|
||||
var/confusion = TRUE
|
||||
|
||||
/datum/reagent/drug/methamphetamine/on_mob_add(mob/living/L)
|
||||
/datum/reagent/drug/methamphetamine/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
L.ignore_slowdown(id)
|
||||
|
||||
/datum/reagent/drug/methamphetamine/on_mob_delete(mob/living/L)
|
||||
/datum/reagent/drug/methamphetamine/on_mob_end_metabolize(mob/living/L)
|
||||
L.unignore_slowdown(id)
|
||||
..()
|
||||
|
||||
@@ -262,7 +262,7 @@
|
||||
taste_description = "salt" // because they're bathsalts?
|
||||
var/datum/brain_trauma/special/psychotic_brawling/bath_salts/rage
|
||||
|
||||
/datum/reagent/drug/bath_salts/on_mob_add(mob/living/L)
|
||||
/datum/reagent/drug/bath_salts/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
ADD_TRAIT(L, TRAIT_STUNIMMUNE, id)
|
||||
ADD_TRAIT(L, TRAIT_SLEEPIMMUNE, id)
|
||||
@@ -271,7 +271,7 @@
|
||||
rage = new()
|
||||
C.gain_trauma(rage, TRAUMA_RESILIENCE_ABSOLUTE)
|
||||
|
||||
/datum/reagent/drug/bath_salts/on_mob_delete(mob/living/L)
|
||||
/datum/reagent/drug/bath_salts/on_mob_end_metabolize(mob/living/L)
|
||||
REMOVE_TRAIT(L, TRAIT_STUNIMMUNE, id)
|
||||
REMOVE_TRAIT(L, TRAIT_SLEEPIMMUNE, id)
|
||||
if(rage)
|
||||
@@ -381,7 +381,7 @@
|
||||
addiction_stage3_end = 40
|
||||
addiction_stage4_end = 240
|
||||
|
||||
/datum/reagent/drug/skooma/on_mob_add(mob/living/L)
|
||||
/datum/reagent/drug/skooma/on_mob_metabolize(mob/living/L)
|
||||
. = ..()
|
||||
ADD_TRAIT(L, TRAIT_GOTTAGOFAST, id)
|
||||
L.next_move_modifier *= 2
|
||||
@@ -392,7 +392,7 @@
|
||||
if(H.dna && H.dna.species)
|
||||
H.dna.species.punchdamagehigh *= 5
|
||||
|
||||
/datum/reagent/drug/skooma/on_mob_delete(mob/living/L)
|
||||
/datum/reagent/drug/skooma/on_mob_end_metabolize(mob/living/L)
|
||||
. = ..()
|
||||
REMOVE_TRAIT(L, TRAIT_GOTTAGOFAST, id)
|
||||
L.next_move_modifier *= 0.5
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_drink", /datum/mood_event/quality_verygood)
|
||||
if (DRINK_FANTASTIC)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_drink", /datum/mood_event/quality_fantastic)
|
||||
if (FOOD_AMAZING)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_food", /datum/mood_event/amazingtaste)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/nutriment
|
||||
@@ -401,7 +403,7 @@
|
||||
metabolization_rate = 0.2 * REAGENTS_METABOLISM
|
||||
taste_description = "mushroom"
|
||||
|
||||
/datum/reagent/mushroomhallucinogen/on_mob_life(mob/living/carbon/M)
|
||||
/datum/reagent/drug/mushroomhallucinogen/on_mob_life(mob/living/carbon/M)
|
||||
M.slurring = max(M.slurring,50)
|
||||
switch(current_cycle)
|
||||
if(1 to 5)
|
||||
@@ -686,7 +688,7 @@
|
||||
/datum/reagent/consumable/tinlux/reaction_mob(mob/living/M)
|
||||
M.set_light(2)
|
||||
|
||||
/datum/reagent/consumable/tinlux/on_mob_delete(mob/living/M)
|
||||
/datum/reagent/consumable/tinlux/on_mob_end_metabolize(mob/living/M)
|
||||
M.set_light(-2)
|
||||
|
||||
/datum/reagent/consumable/vitfro
|
||||
@@ -711,3 +713,14 @@
|
||||
nutriment_factor = 5 * REAGENTS_METABOLISM
|
||||
color = "#eef442" // rgb: 238, 244, 66
|
||||
taste_description = "mournful honking"
|
||||
|
||||
/datum/reagent/consumable/secretsauce
|
||||
name = "secret sauce"
|
||||
id = "secret_sauce"
|
||||
description = "What could it be."
|
||||
nutriment_factor = 2 * REAGENTS_METABOLISM
|
||||
color = "#792300"
|
||||
taste_description = "indescribable"
|
||||
quality = FOOD_AMAZING
|
||||
taste_mult = 100
|
||||
can_synth = FALSE
|
||||
|
||||
@@ -366,7 +366,7 @@
|
||||
to_chat(M, "<span class='danger'>You feel your wounds fade away to nothing!</span>" )
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/mine_salve/on_mob_delete(mob/living/M)
|
||||
/datum/reagent/medicine/mine_salve/on_mob_end_metabolize(mob/living/M)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/N = M
|
||||
N.hal_screwyhud = SCREWYHUD_NONE
|
||||
@@ -483,16 +483,24 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#E6FFF0"
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
var/healtoxinlover = FALSE
|
||||
|
||||
/datum/reagent/medicine/pen_acid/on_mob_life(mob/living/carbon/M)
|
||||
M.radiation -= max(M.radiation-RAD_MOB_SAFE, 0)/50
|
||||
M.adjustToxLoss(-2*REM, 0)
|
||||
M.adjustToxLoss(-2*REM, 0, healtoxinlover)
|
||||
for(var/datum/reagent/R in M.reagents.reagent_list)
|
||||
if(R != src)
|
||||
M.reagents.remove_reagent(R.id,2)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/medicine/pen_acid/pen_jelly
|
||||
name = "Pentetic Jelly"
|
||||
id = "pen_jelly"
|
||||
description = "Reduces massive amounts of radiation and toxin damage while purging other chemicals from the body. Slimepeople friendly!"
|
||||
color = "#91D865"
|
||||
healtoxinlover = TRUE
|
||||
|
||||
/datum/reagent/medicine/sal_acid
|
||||
name = "Salicyclic Acid"
|
||||
id = "sal_acid"
|
||||
@@ -630,11 +638,11 @@
|
||||
overdose_threshold = 30
|
||||
addiction_threshold = 25
|
||||
|
||||
/datum/reagent/medicine/morphine/on_mob_add(mob/living/L)
|
||||
/datum/reagent/medicine/morphine/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
L.ignore_slowdown(id)
|
||||
|
||||
/datum/reagent/medicine/morphine/on_mob_delete(mob/living/L)
|
||||
/datum/reagent/medicine/morphine/on_mob_end_metabolize(mob/living/L)
|
||||
L.unignore_slowdown(id)
|
||||
..()
|
||||
|
||||
@@ -875,11 +883,11 @@
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
overdose_threshold = 60
|
||||
|
||||
/datum/reagent/medicine/stimulants/on_mob_add(mob/living/L)
|
||||
/datum/reagent/medicine/stimulants/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
ADD_TRAIT(L, TRAIT_GOTTAGOFAST, id)
|
||||
|
||||
/datum/reagent/medicine/stimulants/on_mob_delete(mob/living/L)
|
||||
/datum/reagent/medicine/stimulants/on_mob_end_metabolize(mob/living/L)
|
||||
REMOVE_TRAIT(L, TRAIT_GOTTAGOFAST, id)
|
||||
..()
|
||||
|
||||
@@ -1102,7 +1110,7 @@
|
||||
M.adjustBruteLoss(-3 * REM, 0)
|
||||
M.adjustFireLoss(-3 * REM, 0)
|
||||
M.adjustOxyLoss(-15 * REM, 0)
|
||||
M.adjustToxLoss(-3 * REM, 0)
|
||||
M.adjustToxLoss(-3 * REM, 0, TRUE) //Heals TOXINLOVERS
|
||||
M.adjustBrainLoss(2 * REM, 150) //This does, after all, come from ambrosia, and the most powerful ambrosia in existence, at that!
|
||||
M.adjustCloneLoss(-1 * REM, 0)
|
||||
M.adjustStaminaLoss(-30 * REM, 0)
|
||||
@@ -1113,7 +1121,7 @@
|
||||
|
||||
/datum/reagent/medicine/earthsblood/overdose_process(mob/living/M)
|
||||
M.hallucination = min(max(0, M.hallucination + 5), 60)
|
||||
M.adjustToxLoss(5 * REM, 0)
|
||||
M.adjustToxLoss(8 * REM, 0, TRUE) //Hurts TOXINLOVERS
|
||||
..()
|
||||
. = 1
|
||||
|
||||
@@ -1188,11 +1196,11 @@
|
||||
color = "#C8A5DC"
|
||||
metabolization_rate = 1
|
||||
|
||||
/datum/reagent/medicine/changelinghaste/on_mob_add(mob/living/L)
|
||||
/datum/reagent/medicine/changelinghaste/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
ADD_TRAIT(L, TRAIT_GOTTAGOREALLYFAST, id)
|
||||
|
||||
/datum/reagent/medicine/changelinghaste/on_mob_delete(mob/living/L)
|
||||
/datum/reagent/medicine/changelinghaste/on_mob_end_metabolize(mob/living/L)
|
||||
REMOVE_TRAIT(L, TRAIT_GOTTAGOREALLYFAST, id)
|
||||
..()
|
||||
|
||||
@@ -1210,11 +1218,11 @@
|
||||
color = "#F5F5F5"
|
||||
self_consuming = TRUE
|
||||
|
||||
/datum/reagent/medicine/corazone/on_mob_add(mob/living/M)
|
||||
/datum/reagent/medicine/corazone/on_mob_metabolize(mob/living/M)
|
||||
..()
|
||||
ADD_TRAIT(M, TRAIT_STABLEHEART, id)
|
||||
|
||||
/datum/reagent/medicine/corazone/on_mob_delete(mob/living/M)
|
||||
/datum/reagent/medicine/corazone/on_mob_end_metabolize(mob/living/M)
|
||||
REMOVE_TRAIT(M, TRAIT_STABLEHEART, id)
|
||||
..()
|
||||
|
||||
@@ -1223,11 +1231,11 @@
|
||||
id = "muscle_stimulant"
|
||||
description = "A potent chemical that allows someone under its influence to be at full physical ability even when under massive amounts of pain."
|
||||
|
||||
/datum/reagent/medicine/muscle_stimulant/on_mob_add(mob/living/M)
|
||||
/datum/reagent/medicine/muscle_stimulant/on_mob_metabolize(mob/living/M)
|
||||
. = ..()
|
||||
M.ignore_slowdown(id)
|
||||
|
||||
/datum/reagent/medicine/muscle_stimulant/on_mob_delete(mob/living/M)
|
||||
/datum/reagent/medicine/muscle_stimulant/on_mob_end_metabolize(mob/living/M)
|
||||
. = ..()
|
||||
M.unignore_slowdown(id)
|
||||
|
||||
@@ -1242,11 +1250,11 @@
|
||||
taste_description = "salt" // it actually does taste salty
|
||||
var/overdose_progress = 0 // to track overdose progress
|
||||
|
||||
/datum/reagent/medicine/modafinil/on_mob_add(mob/living/M)
|
||||
/datum/reagent/medicine/modafinil/on_mob_metabolize(mob/living/M)
|
||||
ADD_TRAIT(M, TRAIT_SLEEPIMMUNE, id)
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/modafinil/on_mob_delete(mob/living/M)
|
||||
/datum/reagent/medicine/modafinil/on_mob_end_metabolize(mob/living/M)
|
||||
REMOVE_TRAIT(M, TRAIT_SLEEPIMMUNE, id)
|
||||
..()
|
||||
|
||||
|
||||
@@ -196,11 +196,11 @@
|
||||
glass_name = "glass of holy water"
|
||||
glass_desc = "A glass of holy water."
|
||||
|
||||
/datum/reagent/water/holywater/on_mob_add(mob/living/L)
|
||||
/datum/reagent/water/holywater/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
ADD_TRAIT(L, TRAIT_HOLY, id)
|
||||
|
||||
/datum/reagent/water/holywater/on_mob_delete(mob/living/L)
|
||||
/datum/reagent/water/holywater/on_mob_end_metabolize(mob/living/L)
|
||||
REMOVE_TRAIT(L, TRAIT_HOLY, id)
|
||||
..()
|
||||
|
||||
@@ -1241,12 +1241,12 @@
|
||||
color = "E1A116"
|
||||
taste_description = "sourness"
|
||||
|
||||
/datum/reagent/stimulum/on_mob_add(mob/living/L)
|
||||
/datum/reagent/stimulum/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
ADD_TRAIT(L, TRAIT_STUNIMMUNE, id)
|
||||
ADD_TRAIT(L, TRAIT_SLEEPIMMUNE, id)
|
||||
|
||||
/datum/reagent/stimulum/on_mob_delete(mob/living/L)
|
||||
/datum/reagent/stimulum/on_mob_end_metabolize(mob/living/L)
|
||||
REMOVE_TRAIT(L, TRAIT_STUNIMMUNE, id)
|
||||
REMOVE_TRAIT(L, TRAIT_SLEEPIMMUNE, id)
|
||||
..()
|
||||
@@ -1266,11 +1266,11 @@
|
||||
color = "90560B"
|
||||
taste_description = "burning"
|
||||
|
||||
/datum/reagent/nitryl/on_mob_add(mob/living/L)
|
||||
/datum/reagent/nitryl/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
ADD_TRAIT(L, TRAIT_GOTTAGOFAST, id)
|
||||
|
||||
/datum/reagent/nitryl/on_mob_delete(mob/living/L)
|
||||
/datum/reagent/nitryl/on_mob_end_metabolize(mob/living/L)
|
||||
REMOVE_TRAIT(L, TRAIT_GOTTAGOFAST, id)
|
||||
..()
|
||||
|
||||
@@ -1723,7 +1723,7 @@
|
||||
H.update_transform()
|
||||
..()
|
||||
|
||||
/datum/reagent/growthserum/on_mob_delete(mob/living/M)
|
||||
/datum/reagent/growthserum/on_mob_end_metabolize(mob/living/M)
|
||||
M.resize = 1/current_size
|
||||
M.update_transform()
|
||||
..()
|
||||
@@ -1777,11 +1777,11 @@
|
||||
taste_description = "water"
|
||||
metabolization_rate = 0.25 * REAGENTS_METABOLISM
|
||||
|
||||
/datum/reagent/pax/on_mob_add(mob/living/L)
|
||||
/datum/reagent/pax/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
ADD_TRAIT(L, TRAIT_PACIFISM, id)
|
||||
|
||||
/datum/reagent/pax/on_mob_delete(mob/living/L)
|
||||
/datum/reagent/pax/on_mob_end_metabolize(mob/living/L)
|
||||
REMOVE_TRAIT(L, TRAIT_PACIFISM, id)
|
||||
..()
|
||||
|
||||
@@ -1793,11 +1793,11 @@
|
||||
taste_description = "acrid cinnamon"
|
||||
metabolization_rate = 0.2 * REAGENTS_METABOLISM
|
||||
|
||||
/datum/reagent/bz_metabolites/on_mob_add(mob/living/L)
|
||||
/datum/reagent/bz_metabolites/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
ADD_TRAIT(L, CHANGELING_HIVEMIND_MUTE, id)
|
||||
|
||||
/datum/reagent/bz_metabolites/on_mob_delete(mob/living/L)
|
||||
/datum/reagent/bz_metabolites/on_mob_end_metabolize(mob/living/L)
|
||||
..()
|
||||
REMOVE_TRAIT(L, CHANGELING_HIVEMIND_MUTE, id)
|
||||
|
||||
@@ -1814,14 +1814,14 @@
|
||||
description = "A colorless liquid that suppresses violence on the subjects. Cheaper to synthetize, but wears out faster than normal Pax."
|
||||
metabolization_rate = 1.5 * REAGENTS_METABOLISM
|
||||
|
||||
/datum/reagent/peaceborg/confuse
|
||||
/datum/reagent/peaceborg_confuse
|
||||
name = "Dizzying Solution"
|
||||
id = "dizzysolution"
|
||||
description = "Makes the target off balance and dizzy"
|
||||
metabolization_rate = 1.5 * REAGENTS_METABOLISM
|
||||
taste_description = "dizziness"
|
||||
|
||||
/datum/reagent/peaceborg/confuse/on_mob_life(mob/living/carbon/M)
|
||||
/datum/reagent/peaceborg_confuse/on_mob_life(mob/living/carbon/M)
|
||||
if(M.confused < 6)
|
||||
M.confused = CLAMP(M.confused + 3, 0, 5)
|
||||
if(M.dizziness < 6)
|
||||
@@ -1830,14 +1830,14 @@
|
||||
to_chat(M, "You feel confused and disorientated.")
|
||||
..()
|
||||
|
||||
/datum/reagent/peaceborg/tire
|
||||
/datum/reagent/peaceborg_tire
|
||||
name = "Tiring Solution"
|
||||
id = "tiresolution"
|
||||
description = "An extremely weak stamina-toxin that tires out the target. Completely harmless."
|
||||
metabolization_rate = 1.5 * REAGENTS_METABOLISM
|
||||
taste_description = "tiredness"
|
||||
|
||||
/datum/reagent/peaceborg/tire/on_mob_life(mob/living/carbon/M)
|
||||
/datum/reagent/peaceborg_tire/on_mob_life(mob/living/carbon/M)
|
||||
var/healthcomp = (100 - M.health) //DOES NOT ACCOUNT FOR ADMINBUS THINGS THAT MAKE YOU HAVE MORE THAN 200/210 HEALTH, OR SOMETHING OTHER THAN A HUMAN PROCESSING THIS.
|
||||
if(M.getStaminaLoss() < (45 - healthcomp)) //At 50 health you would have 200 - 150 health meaning 50 compensation. 60 - 50 = 10, so would only do 10-19 stamina.)
|
||||
M.adjustStaminaLoss(10)
|
||||
|
||||
@@ -156,11 +156,11 @@
|
||||
toxpwr = 0.5
|
||||
taste_description = "death"
|
||||
|
||||
/datum/reagent/toxin/zombiepowder/on_mob_add(mob/living/L)
|
||||
/datum/reagent/toxin/zombiepowder/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
L.fakedeath(id)
|
||||
|
||||
/datum/reagent/toxin/zombiepowder/on_mob_delete(mob/living/L)
|
||||
/datum/reagent/toxin/zombiepowder/on_mob_end_metabolize(mob/living/L)
|
||||
L.cure_fakedeath(id)
|
||||
..()
|
||||
|
||||
@@ -178,11 +178,11 @@
|
||||
toxpwr = 0.8
|
||||
taste_description = "death"
|
||||
|
||||
/datum/reagent/toxin/ghoulpowder/on_mob_add(mob/living/L)
|
||||
/datum/reagent/toxin/ghoulpowder/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
ADD_TRAIT(L, TRAIT_FAKEDEATH, id)
|
||||
|
||||
/datum/reagent/toxin/ghoulpowder/on_mob_delete(mob/living/L)
|
||||
/datum/reagent/toxin/ghoulpowder/on_mob_end_metabolize(mob/living/L)
|
||||
REMOVE_TRAIT(L, TRAIT_FAKEDEATH, id)
|
||||
..()
|
||||
|
||||
@@ -626,7 +626,7 @@
|
||||
toxpwr = 0
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
|
||||
/datum/reagent/toxin/amanitin/on_mob_delete(mob/living/M)
|
||||
/datum/reagent/toxin/amanitin/on_mob_end_metabolize(mob/living/M)
|
||||
var/toxdamage = current_cycle*3*REM
|
||||
M.log_message("has taken [toxdamage] toxin damage from amanitin toxin", LOG_ATTACK)
|
||||
M.adjustToxLoss(toxdamage)
|
||||
@@ -742,7 +742,7 @@
|
||||
animate(transform = matrix(-rotation, MATRIX_ROTATE), time = 5, easing = QUAD_EASING)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/toxin/rotatium/on_mob_delete(mob/living/M)
|
||||
/datum/reagent/toxin/rotatium/on_mob_end_metabolize(mob/living/M)
|
||||
if(M && M.hud_used)
|
||||
var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"])
|
||||
for(var/whole_screen in screens)
|
||||
@@ -779,7 +779,7 @@
|
||||
*/
|
||||
return ..()
|
||||
|
||||
/datum/reagent/toxin/skewium/on_mob_delete(mob/living/M)
|
||||
/datum/reagent/toxin/skewium/on_mob_end_metabolize(mob/living/M)
|
||||
if(M && M.hud_used)
|
||||
var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"])
|
||||
for(var/whole_screen in screens)
|
||||
@@ -798,7 +798,7 @@
|
||||
|
||||
/datum/reagent/toxin/anacea/on_mob_life(mob/living/carbon/M)
|
||||
var/remove_amt = 5
|
||||
if(holder.has_reagent("calomel") || holder.has_reagent("pen_acid"))
|
||||
if(holder.has_reagent("calomel") || holder.has_reagent("pen_acid") || holder.has_reagent("pen_jelly"))
|
||||
remove_amt = 0.5
|
||||
for(var/datum/reagent/medicine/R in M.reagents.reagent_list)
|
||||
M.reagents.remove_reagent(R.id,remove_amt)
|
||||
@@ -882,8 +882,69 @@
|
||||
toxpwr = 0
|
||||
taste_description = "stillness"
|
||||
|
||||
/datum/reagent/toxin/mimesbane/on_mob_add(mob/living/L)
|
||||
/datum/reagent/toxin/mimesbane/on_mob_metabolize(mob/living/L)
|
||||
ADD_TRAIT(L, TRAIT_EMOTEMUTE, id)
|
||||
|
||||
/datum/reagent/toxin/mimesbane/on_mob_delete(mob/living/L)
|
||||
/datum/reagent/toxin/mimesbane/on_mob_end_metabolize(mob/living/L)
|
||||
REMOVE_TRAIT(L, TRAIT_EMOTEMUTE, id)
|
||||
|
||||
/datum/reagent/toxin/bonehurtingjuice //oof ouch
|
||||
name = "Bone Hurting Juice"
|
||||
id = "bonehurtingjuice"
|
||||
description = "A strange substance that looks a lot like water. Drinking it is oddly tempting. Oof ouch."
|
||||
color = "#AAAAAA77" //RGBA: 170, 170, 170, 77
|
||||
toxpwr = 0
|
||||
taste_description = "bone hurting"
|
||||
overdose_threshold = 20
|
||||
|
||||
/datum/reagent/toxin/bonehurtingjuice/on_mob_add(mob/living/carbon/M)
|
||||
M.say("oof ouch my bones", forced = /datum/reagent/toxin/bonehurtingjuice)
|
||||
|
||||
/datum/reagent/toxin/bonehurtingjuice/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustStaminaLoss(7.5, 0)
|
||||
if(HAS_TRAIT(M, TRAIT_CALCIUM_HEALER))
|
||||
M.adjustBruteLoss(3.5, 0)
|
||||
if(prob(12))
|
||||
switch(rand(1, 3))
|
||||
if(1)
|
||||
var/list/possible_says = list("oof.", "ouch!", "my bones.", "oof ouch.", "oof ouch my bones.")
|
||||
M.say(pick(possible_says), forced = /datum/reagent/toxin/bonehurtingjuice)
|
||||
if(2)
|
||||
var/list/possible_mes = list("oofs softly.", "looks like their bones hurt.", "grimaces, as though their bones hurt.")
|
||||
M.say("*custom " + pick(possible_mes), forced = /datum/reagent/toxin/bonehurtingjuice)
|
||||
if(3)
|
||||
to_chat(M, "<span class='warning'>Your bones hurt!</span>")
|
||||
return ..()
|
||||
|
||||
/datum/reagent/toxin/bonehurtingjuice/overdose_process(mob/living/carbon/M)
|
||||
if(prob(6) && iscarbon(M)) //big oof
|
||||
var/selected_part
|
||||
switch(rand(1, 4)) //God help you if the same limb gets picked twice quickly.
|
||||
if(1)
|
||||
selected_part = BODY_ZONE_L_ARM
|
||||
if(2)
|
||||
selected_part = BODY_ZONE_R_ARM
|
||||
if(3)
|
||||
selected_part = BODY_ZONE_L_LEG
|
||||
if(4)
|
||||
selected_part = BODY_ZONE_R_LEG
|
||||
var/obj/item/bodypart/bp = M.get_bodypart(selected_part)
|
||||
if(M.dna.species.type != /datum/species/skeleton || M.dna.species.type != /datum/species/plasmaman || M.dna.species.type != /datum/species/golem/bone) //We're so sorry skeletons, you're so misunderstood
|
||||
if(bp)
|
||||
bp.receive_damage(0, 0, 200)
|
||||
playsound(M, get_sfx("desceration"), 50, TRUE, -1)
|
||||
M.visible_message("<span class='warning'>[M]'s bones hurt too much!!</span>", "<span class='danger'>Your bones hurt too much!!</span>")
|
||||
M.say("OOF!!", forced = /datum/reagent/toxin/bonehurtingjuice)
|
||||
else //SUCH A LUST FOR REVENGE!!!
|
||||
to_chat(M, "<span class='warning'>A phantom limb hurts!</span>")
|
||||
M.say("Why are we still here, just to suffer?", forced = /datum/reagent/toxin/bonehurtingjuice)
|
||||
else //you just want to socialize
|
||||
if(bp)
|
||||
playsound(M, get_sfx("desceration"), 50, TRUE, -1)
|
||||
M.visible_message("<span class='warning'>[M] rattles loudly and flails around!!</span>", "<span class='danger'>Your bones hurt so much that your missing muscles spasm!!</span>")
|
||||
M.say("OOF!!", forced=/datum/reagent/toxin/bonehurtingjuice)
|
||||
bp.receive_damage(200, 0, 0) //But I don't think we should
|
||||
else
|
||||
to_chat(M, "<span class='warning'>Your missing arm aches from wherever you left it.</span>")
|
||||
M.emote("sigh")
|
||||
return ..()
|
||||
|
||||
@@ -94,6 +94,12 @@
|
||||
results = list("pen_acid" = 6)
|
||||
required_reagents = list("welding_fuel" = 1, "chlorine" = 1, "ammonia" = 1, "formaldehyde" = 1, "sodium" = 1, "cyanide" = 1)
|
||||
|
||||
/datum/chemical_reaction/pen_jelly
|
||||
name = "Pentetic Jelly"
|
||||
id = "pen_jelly"
|
||||
results = list("pen_jelly" = 2)
|
||||
required_reagents = list("pen_acid" = 1, "slimejelly" = 1)
|
||||
|
||||
/datum/chemical_reaction/sal_acid
|
||||
name = "Salicyclic Acid"
|
||||
id = "sal_acid"
|
||||
|
||||
@@ -64,8 +64,8 @@
|
||||
strengthdiv = 8
|
||||
for(var/mob/living/simple_animal/revenant/R in get_hearers_in_view(7,get_turf(holder.my_atom)))
|
||||
var/deity
|
||||
if(SSreligion.deity)
|
||||
deity = SSreligion.deity
|
||||
if(GLOB.deity)
|
||||
deity = GLOB.deity
|
||||
else
|
||||
deity = "Christ"
|
||||
to_chat(R, "<span class='userdanger'>The power of [deity] compels you!</span>")
|
||||
|
||||
212
code/modules/reagents/chemistry/recipes/special.dm
Normal file
212
code/modules/reagents/chemistry/recipes/special.dm
Normal file
@@ -0,0 +1,212 @@
|
||||
GLOBAL_LIST_INIT(food_reagents, build_reagents_to_food()) //reagentid = related food types
|
||||
|
||||
/proc/build_reagents_to_food()
|
||||
. = list()
|
||||
for (var/type in subtypesof(/obj/item/reagent_containers/food))
|
||||
var/obj/item/reagent_containers/food/item = new type()
|
||||
for(var/r in item.list_reagents)
|
||||
if (!.[r])
|
||||
.[r] = list()
|
||||
.[r] += type
|
||||
qdel(item)
|
||||
//dang plant snowflake
|
||||
for (var/type in subtypesof(/obj/item/seeds))
|
||||
var/obj/item/seeds/item = new type()
|
||||
for(var/r in item.reagents_add)
|
||||
if (!.[r])
|
||||
.[r] = list()
|
||||
.[r] += type
|
||||
qdel(item)
|
||||
|
||||
|
||||
#define RNGCHEM_INPUT "input"
|
||||
#define RNGCHEM_CATALYSTS "catalysts"
|
||||
#define RNGCHEM_OUTPUT "output"
|
||||
|
||||
/datum/chemical_reaction/randomized
|
||||
name = "semi randomized reaction"
|
||||
|
||||
var/persistent = FALSE
|
||||
var/persistence_period = 7 //Will reset every x days
|
||||
var/created //creation timestamp
|
||||
|
||||
var/randomize_container = FALSE
|
||||
var/list/possible_containers = list()
|
||||
|
||||
var/randomize_req_temperature = TRUE
|
||||
var/min_temp = 1
|
||||
var/max_temp = 600
|
||||
|
||||
var/randomize_inputs = TRUE
|
||||
var/min_input_reagent_amount = 1
|
||||
var/max_input_reagent_amount = 10
|
||||
var/min_input_reagents = 2
|
||||
var/max_input_reagents = 5
|
||||
var/list/possible_reagents = list()
|
||||
var/min_catalysts = 0
|
||||
var/max_catalysts = 2
|
||||
var/list/possible_catalysts = list()
|
||||
|
||||
var/randomize_results = FALSE
|
||||
var/min_output_reagent_amount = 1
|
||||
var/max_output_reagent_amount = 5
|
||||
var/min_result_reagents = 1
|
||||
var/max_result_reagents = 1
|
||||
var/list/possible_results = list()
|
||||
|
||||
/datum/chemical_reaction/randomized/proc/GenerateRecipe()
|
||||
created = world.time
|
||||
if(randomize_container)
|
||||
required_container = pick(possible_containers)
|
||||
if(randomize_req_temperature)
|
||||
required_temp = rand(min_temp,max_temp)
|
||||
is_cold_recipe = pick(TRUE,FALSE)
|
||||
|
||||
if(randomize_results)
|
||||
results = list()
|
||||
var/list/remaining_possible_results = GetPossibleReagents(RNGCHEM_OUTPUT)
|
||||
var/out_reagent_count = min(rand(min_result_reagents,max_result_reagents),remaining_possible_results.len)
|
||||
for(var/i in 1 to out_reagent_count)
|
||||
var/r_id = pick_n_take(remaining_possible_results)
|
||||
results[r_id] = rand(min_output_reagent_amount,max_output_reagent_amount)
|
||||
|
||||
if(randomize_inputs)
|
||||
var/list/remaining_possible_reagents = GetPossibleReagents(RNGCHEM_INPUT)
|
||||
var/list/remaining_possible_catalysts = GetPossibleReagents(RNGCHEM_CATALYSTS)
|
||||
|
||||
//We're going to assume we're not doing any weird partial reactions for now.
|
||||
for(var/reagent_type in results)
|
||||
remaining_possible_catalysts -= reagent_type
|
||||
remaining_possible_reagents -= reagent_type
|
||||
|
||||
var/in_reagent_count = min(rand(min_input_reagents,max_input_reagents),remaining_possible_reagents.len)
|
||||
if(in_reagent_count <= 0)
|
||||
return FALSE
|
||||
|
||||
required_reagents = list()
|
||||
for(var/i in 1 to in_reagent_count)
|
||||
var/r_id = pick_n_take(remaining_possible_reagents)
|
||||
required_reagents[r_id] = rand(min_input_reagent_amount,max_input_reagent_amount)
|
||||
remaining_possible_catalysts -= r_id //Can't have same reagents both as catalyst and reagent. Or can we ?
|
||||
|
||||
required_catalysts = list()
|
||||
var/in_catalyst_count = min(rand(min_catalysts,max_catalysts),remaining_possible_catalysts.len)
|
||||
for(var/i in 1 to in_catalyst_count)
|
||||
var/r_id = pick_n_take(remaining_possible_catalysts)
|
||||
required_catalysts[r_id] = rand(min_input_reagent_amount,max_input_reagent_amount)
|
||||
|
||||
return TRUE
|
||||
|
||||
/datum/chemical_reaction/randomized/proc/GetPossibleReagents(kind)
|
||||
switch(kind)
|
||||
if(RNGCHEM_INPUT)
|
||||
return possible_reagents.Copy()
|
||||
if(RNGCHEM_CATALYSTS)
|
||||
return possible_catalysts.Copy()
|
||||
if(RNGCHEM_OUTPUT)
|
||||
return possible_results.Copy()
|
||||
|
||||
/datum/chemical_reaction/randomized/proc/HasConflicts()
|
||||
for(var/x in required_reagents)
|
||||
for(var/datum/chemical_reaction/R in GLOB.chemical_reactions_list[x])
|
||||
if(chem_recipes_do_conflict(R,src))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/chemical_reaction/randomized/proc/unwrap_reagent_list(list/textreagents)
|
||||
. = list()
|
||||
for(var/R in textreagents)
|
||||
var/pathR = text2path(R)
|
||||
if(!pathR)
|
||||
return null
|
||||
.[pathR] = textreagents[R]
|
||||
|
||||
/datum/chemical_reaction/randomized/proc/LoadOldRecipe(recipe_data)
|
||||
created = text2num(recipe_data["timestamp"])
|
||||
|
||||
var/req_reag = unwrap_reagent_list(recipe_data["required_reagents"])
|
||||
if(!req_reag)
|
||||
return FALSE
|
||||
required_reagents = req_reag
|
||||
|
||||
var/req_catalysts = unwrap_reagent_list(recipe_data["required_catalysts"])
|
||||
if(!req_catalysts)
|
||||
return FALSE
|
||||
required_catalysts = req_catalysts
|
||||
|
||||
required_temp = recipe_data["required_temp"]
|
||||
is_cold_recipe = recipe_data["is_cold_recipe"]
|
||||
|
||||
var/temp_results = unwrap_reagent_list(recipe_data["results"])
|
||||
if(!temp_results)
|
||||
return FALSE
|
||||
results = temp_results
|
||||
var/containerpath = text2path(recipe_data["required_container"])
|
||||
if(!containerpath)
|
||||
return FALSE
|
||||
required_container = containerpath
|
||||
return TRUE
|
||||
|
||||
/datum/chemical_reaction/randomized/secret_sauce
|
||||
name = "secret sauce creation"
|
||||
id = "secretsauce"
|
||||
persistent = TRUE
|
||||
persistence_period = 7 //Reset every week
|
||||
randomize_container = TRUE
|
||||
possible_containers = list(/obj/item/reagent_containers/glass/bucket) //easy way to ensure no common conflicts
|
||||
randomize_req_temperature = TRUE
|
||||
results = list("secret_sauce" =1)
|
||||
|
||||
/datum/chemical_reaction/randomized/secret_sauce/GetPossibleReagents(kind)
|
||||
switch(kind)
|
||||
if(RNGCHEM_INPUT,RNGCHEM_CATALYSTS)
|
||||
var/food_reagent_ids = list()
|
||||
for(var/key in GLOB.food_reagents)
|
||||
food_reagent_ids += key
|
||||
return food_reagent_ids
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/paper/secretrecipe
|
||||
name = "old recipe"
|
||||
var/recipe_id = "secretsauce"
|
||||
|
||||
/obj/item/paper/secretrecipe/examine(mob/user) //Extra secret
|
||||
if(isobserver(user))
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/obj/item/paper/secretrecipe/Initialize()
|
||||
. = ..()
|
||||
if(SSpersistence.initialized)
|
||||
UpdateInfo()
|
||||
else
|
||||
SSticker.OnRoundstart(CALLBACK(src,.proc/UpdateInfo))
|
||||
|
||||
/obj/item/paper/secretrecipe/proc/UpdateInfo()
|
||||
var/datum/chemical_reaction/recipe = get_chemical_reaction(recipe_id)
|
||||
if(!recipe)
|
||||
info = "This recipe is illegible."
|
||||
var/list/dat = list("<ul>")
|
||||
for(var/rid in recipe.required_reagents)
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[rid]
|
||||
dat += "<li>[recipe.required_reagents[rid]]u of [R.name]</li>"
|
||||
dat += "</ul>"
|
||||
if(recipe.required_catalysts.len)
|
||||
dat += "With following present: <ul>"
|
||||
for(var/rid in recipe.required_catalysts)
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[rid]
|
||||
dat += "<li>[recipe.required_catalysts[rid]]u of [R.name]</li>"
|
||||
dat += "</ul>"
|
||||
dat += "Mix slowly"
|
||||
if(recipe.required_container)
|
||||
var/obj/item/I = recipe.required_container
|
||||
dat += " in [initial(I.name)]"
|
||||
if(recipe.required_temp != 0)
|
||||
if(recipe.is_cold_recipe)
|
||||
dat += " below [recipe.required_temp] degrees"
|
||||
else
|
||||
dat += " above [recipe.required_temp] degrees"
|
||||
dat += "."
|
||||
info = dat.Join("")
|
||||
update_icon()
|
||||
@@ -119,3 +119,10 @@
|
||||
id = "mimesbane"
|
||||
results = list("mimesbane" = 3)
|
||||
required_reagents = list("radium" = 1, "mutetoxin" = 1, "nothing" = 1)
|
||||
|
||||
/datum/chemical_reaction/bonehurtingjuice
|
||||
name = "Bone Hurting Juice"
|
||||
id = "bonehurtingjuice"
|
||||
results = list("bonehurtingjuice" = 5)
|
||||
required_reagents = list("mutagen" = 1, "itching_powder" = 3, "milk" = 1)
|
||||
mix_message = "<span class='danger'>The mixture suddenly becomes clear and looks a lot like water. You feel a strong urge to drink it.</span>"
|
||||
|
||||
@@ -259,3 +259,92 @@
|
||||
|
||||
/obj/item/reagent_containers/syringe/get_belt_overlay()
|
||||
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "pouch")
|
||||
|
||||
/obj/item/reagent_containers/syringe/dart
|
||||
name = "medicinal smartdart"
|
||||
desc = "A non-harmful dart that can administer medication from a range. Once it hits a patient using it's smart nanofilter technology only medicines contained within the dart are administered to the patient. Additonally, due to capillary action, injection of chemicals past the overdose limit is prevented."
|
||||
volume = 20
|
||||
amount_per_transfer_from_this = 20
|
||||
icon_state = "empty"
|
||||
item_state = "syringe_empty"
|
||||
var/emptrig = FALSE
|
||||
|
||||
/obj/item/reagent_containers/syringe/dart/afterattack(atom/target, mob/user , proximity)
|
||||
|
||||
if(busy)
|
||||
return
|
||||
if(!proximity)
|
||||
return
|
||||
if(!target.reagents)
|
||||
return
|
||||
|
||||
var/mob/living/L
|
||||
if(isliving(target))
|
||||
L = target
|
||||
if(!L.can_inject(user, 1))
|
||||
return
|
||||
|
||||
switch(mode)
|
||||
if(SYRINGE_DRAW)
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>The dart is full!</span>")
|
||||
return
|
||||
|
||||
if(L) //living mob
|
||||
to_chat(user, "<span class='warning'>You can't draw blood using a dart!</span>")
|
||||
return
|
||||
|
||||
else //if not mob
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty!</span>")
|
||||
return
|
||||
|
||||
if(!target.is_drawable())
|
||||
to_chat(user, "<span class='warning'>You cannot directly remove reagents from [target]!</span>")
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
|
||||
|
||||
to_chat(user, "<span class='notice'>You soak the [src] with [trans] units of the solution. It now contains [reagents.total_volume] units.</span>")
|
||||
if (reagents.total_volume >= reagents.maximum_volume)
|
||||
mode=!mode
|
||||
update_icon()
|
||||
|
||||
if(SYRINGE_INJECT)
|
||||
src.visible_message("<span class='danger'>The smartdart gives a frustrated boop! It's fully saturated; You need to shoot someone with it!</span>")
|
||||
|
||||
/obj/item/reagent_containers/syringe/dart/attack_self(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/syringe/dart/update_icon()
|
||||
cut_overlays()
|
||||
var/rounded_vol
|
||||
|
||||
rounded_vol = "empty"
|
||||
if(reagents && reagents.total_volume)
|
||||
if(volume/reagents.total_volume == 1)
|
||||
rounded_vol="full"
|
||||
|
||||
icon_state = "[rounded_vol]"
|
||||
item_state = "syringe_[rounded_vol]"
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
var/injoverlay
|
||||
switch(mode)
|
||||
if (SYRINGE_DRAW)
|
||||
injoverlay = "draw"
|
||||
if (SYRINGE_INJECT)
|
||||
injoverlay = "ready"
|
||||
add_overlay(injoverlay)
|
||||
M.update_inv_hands()
|
||||
|
||||
/obj/item/reagent_containers/syringe/dart/emp_act(severity)
|
||||
emptrig = TRUE
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/syringe/dart/bluespace
|
||||
name = "bluespace smartdart"
|
||||
desc = "A non-harmful dart that can administer medication from a range. Once it hits a patient using it's smart nanofilter technology only medicines contained within the dart are administered to the patient. Additonally, due to capillary action, injection of chemicals past the overdose limit is prevented. Has an extended volume capacity thanks to bluespace foam."
|
||||
amount_per_transfer_from_this = 50
|
||||
volume = 50
|
||||
|
||||
@@ -21,6 +21,14 @@
|
||||
category = list("Computer Boards")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_ALL
|
||||
|
||||
/datum/design/board/minesweeper
|
||||
name = "Computer Design (Minesweeper Arcade Machine)"
|
||||
desc = "Allows for the construction of circuit boards used to build a new Minesweeper machine."
|
||||
id = "arcade_minesweeper"
|
||||
build_path = /obj/item/circuitboard/computer/arcade/minesweeper
|
||||
category = list("Computer Boards")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_ALL
|
||||
|
||||
/datum/design/board/slot_machine
|
||||
name = "Computer Design (Slot Machine)"
|
||||
desc = "Allows for the construction of circuit boards used to build a new slot machine."
|
||||
|
||||
@@ -92,6 +92,36 @@
|
||||
category = list("Medical Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
|
||||
|
||||
/datum/design/medicinalsmartdart
|
||||
name = "Medicinal Smartdart"
|
||||
desc = "A non-harmful dart that can administer medication from a range. Once it hits a patient using it's smart nanofilter technology only medicines contained within the dart are administered to the patient. Additonally, due to capillary action, injection of chemicals past the overdose limit is prevented."
|
||||
id = "medicinalsmartdart"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_GLASS = 100, MAT_PLASTIC = 100, MAT_METAL = 100)
|
||||
build_path = /obj/item/reagent_containers/syringe/dart
|
||||
category = list("Medical Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
|
||||
|
||||
/datum/design/bluespacesmartdart
|
||||
name = "bluespace smartdart"
|
||||
desc = "A non-harmful dart that can administer medication from a range. Once it hits a patient using it's smart nanofilter technology only medicines contained within the dart are administered to the patient. Additonally, due to capillary action, injection of chemicals past the overdose limit is prevented. Has an extended volume capacity thanks to bluespace foam."
|
||||
id = "bluespacesmartdart"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_GLASS = 250, MAT_PLASTIC = 250, MAT_METAL = 250, MAT_BLUESPACE = 250)
|
||||
build_path = /obj/item/reagent_containers/syringe/dart/bluespace
|
||||
category = list("Medical Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
|
||||
|
||||
/datum/design/smartdartgun
|
||||
name = "dart gun"
|
||||
desc = "A compressed air gun, designed to fit medicinal darts for application of medicine for those patients just out of reach."
|
||||
id = "smartdartgun"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_GLASS = 500, MAT_PLASTIC = 1000, MAT_METAL = 500)
|
||||
build_path = /obj/item/gun/syringe/dart
|
||||
category = list("Medical Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
|
||||
|
||||
/datum/design/bluespacebodybag
|
||||
name = "Bluespace Body Bag"
|
||||
desc = "A bluespace body bag, powered by experimental bluespace technology. It can hold loads of bodies and the largest of creatures."
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
deactivate()
|
||||
if(passive_enabled)
|
||||
disable_passive_effect()
|
||||
on_mob_remove()
|
||||
if(nanites)
|
||||
nanites.programs -= src
|
||||
return ..()
|
||||
@@ -107,6 +108,9 @@
|
||||
if(activated) //apply activation effects if it starts active
|
||||
activate()
|
||||
|
||||
datum/nanite_program/proc/on_mob_remove()
|
||||
return
|
||||
|
||||
/datum/nanite_program/proc/toggle()
|
||||
if(!activated)
|
||||
activate()
|
||||
@@ -115,6 +119,7 @@
|
||||
|
||||
/datum/nanite_program/proc/activate()
|
||||
activated = TRUE
|
||||
timer_counter = activation_delay
|
||||
|
||||
/datum/nanite_program/proc/deactivate()
|
||||
if(passive_enabled)
|
||||
@@ -135,8 +140,10 @@
|
||||
if(timer && timer_counter > timer)
|
||||
if(timer_type == NANITE_TIMER_DEACTIVATE)
|
||||
deactivate()
|
||||
return
|
||||
else if(timer_type == NANITE_TIMER_SELFDELETE)
|
||||
qdel(src)
|
||||
return
|
||||
else if(can_trigger && timer_type == NANITE_TIMER_TRIGGER)
|
||||
trigger()
|
||||
timer_counter = activation_delay
|
||||
@@ -251,4 +258,3 @@
|
||||
return "Trigger"
|
||||
if(NANITE_TIMER_RESET)
|
||||
return "Reset Activation Timer"
|
||||
|
||||
|
||||
@@ -237,7 +237,11 @@
|
||||
if(prob(10))
|
||||
var/list/mob/living/target_hosts = list()
|
||||
for(var/mob/living/L in oview(5, host_mob))
|
||||
if(!(MOB_ORGANIC in L.mob_biotypes) && !(MOB_UNDEAD in L.mob_biotypes))
|
||||
continue
|
||||
target_hosts += L
|
||||
if(!target_hosts.len)
|
||||
return
|
||||
var/mob/living/infectee = pick(target_hosts)
|
||||
if(prob(100 - (infectee.get_permeability_protection() * 100)))
|
||||
//this will potentially take over existing nanites!
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
display_name = "Advanced Biotechnology"
|
||||
description = "Advanced Biotechnology"
|
||||
prereq_ids = list("biotech")
|
||||
design_ids = list("piercesyringe", "crewpinpointer", "smoke_machine", "plasmarefiller", "limbgrower", "defibrillator", "meta_beaker", "healthanalyzer_advanced","harvester","holobarrier_med")
|
||||
design_ids = list("piercesyringe", "crewpinpointer", "smoke_machine", "plasmarefiller", "limbgrower", "defibrillator", "meta_beaker", "healthanalyzer_advanced","harvester","holobarrier_med","smartdartgun","medicinalsmartdart")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
|
||||
export_price = 5000
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
display_name = "Applied Bluespace Research"
|
||||
description = "Using bluespace to make things faster and better."
|
||||
prereq_ids = list("bluespace_basic", "engineering")
|
||||
design_ids = list("bs_rped","biobag_holding","minerbag_holding", "bluespacebeaker", "bluespacesyringe", "phasic_scanning", "roastingstick", "ore_silo")
|
||||
design_ids = list("bs_rped","biobag_holding","minerbag_holding", "bluespacebeaker", "bluespacesyringe", "phasic_scanning", "roastingstick", "ore_silo", "bluespacesmartdart")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 7500)
|
||||
export_price = 5000
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user