mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into space_ruins
All hail glorious leader tigercat
This commit is contained in:
@@ -92,17 +92,17 @@ var/const/INGEST = 2
|
||||
return the_id
|
||||
|
||||
/datum/reagents/proc/trans_to(var/target, var/amount=1, var/multiplier=1, var/preserve_data=1)//if preserve_data=0, the reagents data will be lost. Usefull if you use data for some strange stuff and don't want it to be transferred.
|
||||
if (!target)
|
||||
if(!target)
|
||||
return
|
||||
if(src.total_volume <= 0)
|
||||
return
|
||||
var/datum/reagents/R
|
||||
if(istype(target, /obj))
|
||||
var/obj/O = target
|
||||
if (!O.reagents )
|
||||
if(!O.reagents )
|
||||
return
|
||||
R = O.reagents
|
||||
else if (istype(target, /mob/living))
|
||||
else if(istype(target, /mob/living))
|
||||
var/mob/living/M = target
|
||||
if(!M.reagents)
|
||||
return
|
||||
@@ -115,10 +115,10 @@ var/const/INGEST = 2
|
||||
amount = min(min(amount, src.total_volume), R.maximum_volume-R.total_volume)
|
||||
var/part = amount / src.total_volume
|
||||
var/trans_data = null
|
||||
for (var/datum/reagent/current_reagent in src.reagent_list)
|
||||
if (!current_reagent)
|
||||
for(var/datum/reagent/current_reagent in src.reagent_list)
|
||||
if(!current_reagent)
|
||||
continue
|
||||
if (current_reagent.id == "blood" && ishuman(target))
|
||||
if(current_reagent.id == "blood" && ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
H.inject_blood(my_atom, amount)
|
||||
continue
|
||||
@@ -144,7 +144,7 @@ var/const/INGEST = 2
|
||||
amount = min(min(amount, src.total_volume), R.maximum_volume-R.total_volume)
|
||||
var/part = amount / src.total_volume
|
||||
var/trans_data = null
|
||||
for (var/datum/reagent/current_reagent in src.reagent_list)
|
||||
for(var/datum/reagent/current_reagent in src.reagent_list)
|
||||
var/current_reagent_transfer = current_reagent.volume * part
|
||||
if(preserve_data)
|
||||
trans_data = copy_data(current_reagent)
|
||||
@@ -157,9 +157,9 @@ var/const/INGEST = 2
|
||||
return amount
|
||||
|
||||
/datum/reagents/proc/trans_id_to(var/obj/target, var/reagent, var/amount=1, var/preserve_data=1)//Not sure why this proc didn't exist before. It does now! /N
|
||||
if (!target)
|
||||
if(!target)
|
||||
return
|
||||
if (!target.reagents || src.total_volume<=0 || !src.get_reagent_amount(reagent))
|
||||
if(!target.reagents || src.total_volume<=0 || !src.get_reagent_amount(reagent))
|
||||
return
|
||||
|
||||
var/datum/reagents/R = target.reagents
|
||||
@@ -167,7 +167,7 @@ var/const/INGEST = 2
|
||||
amount = src.get_reagent_amount(reagent)
|
||||
amount = min(amount, R.maximum_volume-R.total_volume)
|
||||
var/trans_data = null
|
||||
for (var/datum/reagent/current_reagent in src.reagent_list)
|
||||
for(var/datum/reagent/current_reagent in src.reagent_list)
|
||||
if(current_reagent.id == reagent)
|
||||
if(preserve_data)
|
||||
trans_data = copy_data(current_reagent)
|
||||
@@ -182,7 +182,7 @@ var/const/INGEST = 2
|
||||
return amount
|
||||
|
||||
/*
|
||||
if (!target) return
|
||||
if(!target) return
|
||||
var/total_transfered = 0
|
||||
var/current_list_element = 1
|
||||
var/datum/reagents/R = target.reagents
|
||||
@@ -326,14 +326,14 @@ var/const/INGEST = 2
|
||||
/datum/reagents/proc/isolate_reagent(var/reagent)
|
||||
for(var/A in reagent_list)
|
||||
var/datum/reagent/R = A
|
||||
if (R.id != reagent)
|
||||
if(R.id != reagent)
|
||||
del_reagent(R.id)
|
||||
update_total()
|
||||
|
||||
/datum/reagents/proc/del_reagent(var/reagent)
|
||||
for(var/A in reagent_list)
|
||||
var/datum/reagent/R = A
|
||||
if (R.id == reagent)
|
||||
if(R.id == reagent)
|
||||
if(istype(my_atom, /mob/living))
|
||||
var/mob/living/M = my_atom
|
||||
R.reagent_deleted(M)
|
||||
@@ -446,7 +446,7 @@ var/const/INGEST = 2
|
||||
for(var/A in reagent_list)
|
||||
|
||||
var/datum/reagent/R = A
|
||||
if (R.id == reagent)
|
||||
if(R.id == reagent)
|
||||
R.volume += amount
|
||||
update_total()
|
||||
my_atom.on_reagent_change()
|
||||
@@ -482,7 +482,7 @@ var/const/INGEST = 2
|
||||
|
||||
for(var/A in reagent_list)
|
||||
var/datum/reagent/R = A
|
||||
if (R.id == reagent)
|
||||
if(R.id == reagent)
|
||||
R.volume -= amount
|
||||
update_total()
|
||||
if(!safety)//So it does not handle reactions when it need not to
|
||||
@@ -496,7 +496,7 @@ var/const/INGEST = 2
|
||||
|
||||
for(var/A in reagent_list)
|
||||
var/datum/reagent/R = A
|
||||
if (R.id == reagent)
|
||||
if(R.id == reagent)
|
||||
if(!amount) return R
|
||||
else
|
||||
if(R.volume >= amount) return R
|
||||
@@ -507,7 +507,7 @@ var/const/INGEST = 2
|
||||
/datum/reagents/proc/get_reagent_amount(var/reagent)
|
||||
for(var/A in reagent_list)
|
||||
var/datum/reagent/R = A
|
||||
if (R.id == reagent)
|
||||
if(R.id == reagent)
|
||||
return R.volume
|
||||
|
||||
return 0
|
||||
@@ -515,7 +515,7 @@ var/const/INGEST = 2
|
||||
/datum/reagents/proc/get_reagents()
|
||||
var/res = ""
|
||||
for(var/datum/reagent/A in reagent_list)
|
||||
if (res != "") res += ","
|
||||
if(res != "") res += ","
|
||||
res += A.name
|
||||
|
||||
return res
|
||||
@@ -565,8 +565,8 @@ var/const/INGEST = 2
|
||||
D.data = new_data
|
||||
|
||||
/datum/reagents/proc/copy_data(var/datum/reagent/current_reagent)
|
||||
if (!current_reagent || !current_reagent.data) return null
|
||||
if (!istype(current_reagent.data, /list)) return current_reagent.data
|
||||
if(!current_reagent || !current_reagent.data) return null
|
||||
if(!istype(current_reagent.data, /list)) return current_reagent.data
|
||||
|
||||
var/list/trans_data = current_reagent.data.Copy()
|
||||
|
||||
|
||||
@@ -89,12 +89,12 @@
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/machinery/chem_dispenser/blob_act()
|
||||
if (prob(50))
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
|
||||
/**
|
||||
@@ -129,7 +129,7 @@
|
||||
beakerCurrentVolume += R.volume
|
||||
data["beakerContents"] = beakerContents
|
||||
|
||||
if (beaker)
|
||||
if(beaker)
|
||||
data["beakerCurrentVolume"] = beakerCurrentVolume
|
||||
data["beakerMaxVolume"] = beaker.volume
|
||||
else
|
||||
@@ -137,7 +137,7 @@
|
||||
data["beakerMaxVolume"] = null
|
||||
|
||||
var chemicals[0]
|
||||
for (var/re in dispensable_reagents)
|
||||
for(var/re in dispensable_reagents)
|
||||
var/datum/reagent/temp = chemical_reagents_list[re]
|
||||
if(temp)
|
||||
chemicals.Add(list(list("title" = temp.name, "id" = temp.id, "commands" = list("dispense" = temp.id)))) // list in a list because Byond merges the first list...
|
||||
@@ -145,7 +145,7 @@
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 390, 655)
|
||||
@@ -160,13 +160,13 @@
|
||||
|
||||
if(href_list["amount"])
|
||||
amount = round(text2num(href_list["amount"]), 5) // round to nearest 5
|
||||
if (amount < 0) // Since the user can actually type the commands himself, some sanity checking
|
||||
if(amount < 0) // Since the user can actually type the commands himself, some sanity checking
|
||||
amount = 0
|
||||
if (amount > 100)
|
||||
if(amount > 100)
|
||||
amount = 100
|
||||
|
||||
if(href_list["dispense"])
|
||||
if (dispensable_reagents.Find(href_list["dispense"]) && beaker != null)
|
||||
if(dispensable_reagents.Find(href_list["dispense"]) && beaker != null)
|
||||
var/obj/item/weapon/reagent_containers/glass/B = src.beaker
|
||||
var/datum/reagents/R = B.reagents
|
||||
var/space = R.maximum_volume - R.total_volume
|
||||
@@ -411,12 +411,12 @@
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/machinery/chem_master/blob_act()
|
||||
if (prob(50))
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/chem_master/power_change()
|
||||
@@ -465,7 +465,7 @@
|
||||
usr.set_machine(src)
|
||||
|
||||
|
||||
if (href_list["ejectp"])
|
||||
if(href_list["ejectp"])
|
||||
if(loaded_pill_bottle)
|
||||
loaded_pill_bottle.forceMove(src.loc)
|
||||
loaded_pill_bottle = null
|
||||
@@ -475,8 +475,8 @@
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
if (href_list["print_p"])
|
||||
if (!(src.printing))
|
||||
if(href_list["print_p"])
|
||||
if(!(src.printing))
|
||||
src.printing = 1
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message("\blue \the [src] rattles and prints out a sheet of paper.", 1)
|
||||
@@ -503,7 +503,7 @@
|
||||
|
||||
if(beaker)
|
||||
var/datum/reagents/R = beaker.reagents
|
||||
if (href_list["analyze"])
|
||||
if(href_list["analyze"])
|
||||
var/dat = ""
|
||||
if(!condi)
|
||||
if(href_list["name"] == "Blood")
|
||||
@@ -525,21 +525,21 @@
|
||||
usr << browse(dat, "window=chem_master;size=575x400")
|
||||
return
|
||||
|
||||
else if (href_list["add"])
|
||||
else if(href_list["add"])
|
||||
|
||||
if(href_list["amount"])
|
||||
var/id = href_list["add"]
|
||||
var/amount = text2num(href_list["amount"])
|
||||
R.trans_id_to(src, id, amount)
|
||||
|
||||
else if (href_list["addcustom"])
|
||||
else if(href_list["addcustom"])
|
||||
|
||||
var/id = href_list["addcustom"]
|
||||
useramount = input("Select the amount to transfer.", 30, useramount) as num
|
||||
useramount = isgoodnumber(useramount)
|
||||
src.Topic(null, list("amount" = "[useramount]", "add" = "[id]"))
|
||||
|
||||
else if (href_list["remove"])
|
||||
else if(href_list["remove"])
|
||||
|
||||
if(href_list["amount"])
|
||||
var/id = href_list["remove"]
|
||||
@@ -550,42 +550,42 @@
|
||||
reagents.remove_reagent(id, amount)
|
||||
|
||||
|
||||
else if (href_list["removecustom"])
|
||||
else if(href_list["removecustom"])
|
||||
|
||||
var/id = href_list["removecustom"]
|
||||
useramount = input("Select the amount to transfer.", 30, useramount) as num
|
||||
useramount = isgoodnumber(useramount)
|
||||
src.Topic(null, list("amount" = "[useramount]", "remove" = "[id]"))
|
||||
|
||||
else if (href_list["toggle"])
|
||||
else if(href_list["toggle"])
|
||||
mode = !mode
|
||||
|
||||
else if (href_list["main"])
|
||||
else if(href_list["main"])
|
||||
attack_hand(usr)
|
||||
return
|
||||
else if (href_list["eject"])
|
||||
else if(href_list["eject"])
|
||||
if(beaker)
|
||||
beaker.forceMove(get_turf(src))
|
||||
beaker = null
|
||||
reagents.clear_reagents()
|
||||
icon_state = "mixer0"
|
||||
else if (href_list["createpill"] || href_list["createpill_multiple"])
|
||||
else if(href_list["createpill"] || href_list["createpill_multiple"])
|
||||
if(!condi)
|
||||
var/count = 1
|
||||
if (href_list["createpill_multiple"])
|
||||
if(href_list["createpill_multiple"])
|
||||
count = input("Select the number of pills to make.", 10, pillamount) as num|null
|
||||
if(count == null)
|
||||
return
|
||||
count = isgoodnumber(count)
|
||||
if (count > 20) count = 20 //Pevent people from creating huge stacks of pills easily. Maybe move the number to defines?
|
||||
if (count <= 0) return
|
||||
if(count > 20) count = 20 //Pevent people from creating huge stacks of pills easily. Maybe move the number to defines?
|
||||
if(count <= 0) return
|
||||
var/amount_per_pill = reagents.total_volume/count
|
||||
if (amount_per_pill > 50) amount_per_pill = 50
|
||||
if(amount_per_pill > 50) amount_per_pill = 50
|
||||
var/name = input(usr,"Name:","Name your pill!","[reagents.get_master_reagent_name()] ([amount_per_pill]u)") as text|null
|
||||
if(!name)
|
||||
return
|
||||
name = reject_bad_text(name)
|
||||
while (count--)
|
||||
while(count--)
|
||||
var/obj/item/weapon/reagent_containers/food/pill/P = new/obj/item/weapon/reagent_containers/food/pill(src.loc)
|
||||
if(!name) name = reagents.get_master_reagent_name()
|
||||
P.name = "[name] pill"
|
||||
@@ -608,19 +608,19 @@
|
||||
P.name = "[name] pack"
|
||||
P.desc = "A small condiment pack. The label says it contains [name]."
|
||||
reagents.trans_to(P,10)
|
||||
else if (href_list["createpatch"] || href_list["createpatch_multiple"])
|
||||
else if(href_list["createpatch"] || href_list["createpatch_multiple"])
|
||||
if(!condi)
|
||||
var/count = 1
|
||||
if (href_list["createpatch_multiple"])
|
||||
if(href_list["createpatch_multiple"])
|
||||
count = input("Select the number of patches to make.", 10, patchamount) as num|null
|
||||
if(count == null)
|
||||
return
|
||||
count = isgoodnumber(count)
|
||||
if(!count || count <= 0)
|
||||
return
|
||||
if (count > 20) count = 20 //Pevent people from creating huge stacks of patches easily. Maybe move the number to defines?
|
||||
if(count > 20) count = 20 //Pevent people from creating huge stacks of patches easily. Maybe move the number to defines?
|
||||
var/amount_per_patch = reagents.total_volume/count
|
||||
if (amount_per_patch > 40) amount_per_patch = 40
|
||||
if(amount_per_patch > 40) amount_per_patch = 40
|
||||
var/name = input(usr,"Name:","Name your patch!","[reagents.get_master_reagent_name()] ([amount_per_patch]u)") as text|null
|
||||
if(!name)
|
||||
return
|
||||
@@ -636,7 +636,7 @@
|
||||
if(is_medical_patch)
|
||||
P.instant_application = 1
|
||||
P.icon_state = "bandaid_med"
|
||||
else if (href_list["createbottle"])
|
||||
else if(href_list["createbottle"])
|
||||
if(!condi)
|
||||
var/name = input(usr,"Name:","Name your bottle!",reagents.get_master_reagent_name()) as text|null
|
||||
if(!name)
|
||||
@@ -888,11 +888,11 @@
|
||||
|
||||
/obj/machinery/reagentgrinder/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
|
||||
if (istype(O,/obj/item/weapon/reagent_containers/glass) || \
|
||||
if(istype(O,/obj/item/weapon/reagent_containers/glass) || \
|
||||
istype(O,/obj/item/weapon/reagent_containers/food/drinks/drinkingglass) || \
|
||||
istype(O,/obj/item/weapon/reagent_containers/food/drinks/shaker))
|
||||
|
||||
if (beaker)
|
||||
if(beaker)
|
||||
return 1
|
||||
else
|
||||
if(!user.drop_item())
|
||||
@@ -911,7 +911,7 @@
|
||||
//Fill machine with the plantbag!
|
||||
if(istype(O, /obj/item/weapon/storage/bag/plants))
|
||||
|
||||
for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
|
||||
O.contents -= G
|
||||
G.forceMove(src)
|
||||
holdingitems += G
|
||||
@@ -926,7 +926,7 @@
|
||||
return 0
|
||||
|
||||
|
||||
if (!is_type_in_list(O, blend_items) && !is_type_in_list(O, juice_items))
|
||||
if(!is_type_in_list(O, blend_items) && !is_type_in_list(O, juice_items))
|
||||
to_chat(user, "<span class='warning'>Cannot refine into a reagent.</span>")
|
||||
return 1
|
||||
|
||||
@@ -951,13 +951,13 @@
|
||||
var/dat = ""
|
||||
|
||||
if(!inuse)
|
||||
for (var/obj/item/O in holdingitems)
|
||||
for(var/obj/item/O in holdingitems)
|
||||
processing_chamber += "\A [O.name]<BR>"
|
||||
|
||||
if (!processing_chamber)
|
||||
if(!processing_chamber)
|
||||
is_chamber_empty = 1
|
||||
processing_chamber = "Nothing."
|
||||
if (!beaker)
|
||||
if(!beaker)
|
||||
beaker_contents = "<B>No beaker attached.</B><br>"
|
||||
else
|
||||
is_beaker_ready = 1
|
||||
@@ -975,12 +975,12 @@
|
||||
[processing_chamber]<br>
|
||||
[beaker_contents]<hr>
|
||||
"}
|
||||
if (is_beaker_ready && !is_chamber_empty && !(stat & (NOPOWER|BROKEN)))
|
||||
if(is_beaker_ready && !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>"
|
||||
if(holdingitems && holdingitems.len > 0)
|
||||
dat += "<A href='?src=\ref[src];action=eject'>Eject the reagents</a><BR>"
|
||||
if (beaker)
|
||||
if(beaker)
|
||||
dat += "<A href='?src=\ref[src];action=detach'>Detach the beaker</a><BR>"
|
||||
else
|
||||
dat += "Please wait..."
|
||||
@@ -993,22 +993,22 @@
|
||||
return
|
||||
usr.set_machine(src)
|
||||
switch(href_list["action"])
|
||||
if ("grind")
|
||||
if("grind")
|
||||
grind()
|
||||
if("juice")
|
||||
juice()
|
||||
if("eject")
|
||||
eject()
|
||||
if ("detach")
|
||||
if("detach")
|
||||
detach()
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/detach()
|
||||
|
||||
if (usr.stat != 0)
|
||||
if(usr.stat != 0)
|
||||
return
|
||||
if (!beaker)
|
||||
if(!beaker)
|
||||
return
|
||||
beaker.forceMove(src.loc)
|
||||
beaker = null
|
||||
@@ -1016,9 +1016,9 @@
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/eject()
|
||||
|
||||
if (usr.stat != 0)
|
||||
if(usr.stat != 0)
|
||||
return
|
||||
if (holdingitems && holdingitems.len == 0)
|
||||
if(holdingitems && holdingitems.len == 0)
|
||||
return
|
||||
|
||||
for(var/obj/item/O in holdingitems)
|
||||
@@ -1027,14 +1027,14 @@
|
||||
holdingitems = list()
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/is_allowed(var/obj/item/weapon/reagent_containers/O)
|
||||
for (var/i in blend_items)
|
||||
for(var/i in blend_items)
|
||||
if(istype(O, i))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/get_allowed_by_id(var/obj/item/weapon/grown/O)
|
||||
for (var/i in blend_items)
|
||||
if (istype(O, i))
|
||||
for(var/i in blend_items)
|
||||
if(istype(O, i))
|
||||
return blend_items[i]
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/get_allowed_snack_by_id(var/obj/item/weapon/reagent_containers/food/snacks/O)
|
||||
@@ -1058,17 +1058,17 @@
|
||||
return juice_tags[i]
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/get_grownweapon_amount(var/obj/item/weapon/grown/O)
|
||||
if (!istype(O))
|
||||
if(!istype(O))
|
||||
return 5
|
||||
else if (O.potency == -1)
|
||||
else if(O.potency == -1)
|
||||
return 5
|
||||
else
|
||||
return round(O.potency)
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/get_juice_amount(var/obj/item/weapon/reagent_containers/food/snacks/grown/O)
|
||||
if (!istype(O))
|
||||
if(!istype(O))
|
||||
return 5
|
||||
else if (O.potency == -1)
|
||||
else if(O.potency == -1)
|
||||
return 5
|
||||
else
|
||||
return round(5*sqrt(O.potency))
|
||||
@@ -1081,7 +1081,7 @@
|
||||
power_change()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if (!beaker || (beaker && beaker.reagents.total_volume >= beaker.reagents.maximum_volume))
|
||||
if(!beaker || (beaker && beaker.reagents.total_volume >= beaker.reagents.maximum_volume))
|
||||
return
|
||||
playsound(src.loc, 'sound/machines/juicer.ogg', 20, 1)
|
||||
var/offset = prob(50) ? -2 : 2
|
||||
@@ -1092,8 +1092,8 @@
|
||||
inuse = 0
|
||||
interact(usr)
|
||||
//Snacks
|
||||
for (var/obj/item/weapon/reagent_containers/food/snacks/O in holdingitems)
|
||||
if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/O in holdingitems)
|
||||
if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
break
|
||||
|
||||
var/allowed = null
|
||||
@@ -1104,14 +1104,14 @@
|
||||
if(isnull(allowed))
|
||||
break
|
||||
|
||||
for (var/r_id in allowed)
|
||||
for(var/r_id in allowed)
|
||||
|
||||
var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume
|
||||
var/amount = get_juice_amount(O)
|
||||
|
||||
beaker.reagents.add_reagent(r_id, min(amount, space))
|
||||
|
||||
if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
break
|
||||
|
||||
remove_object(O)
|
||||
@@ -1121,7 +1121,7 @@
|
||||
power_change()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if (!beaker || (beaker && beaker.reagents.total_volume >= beaker.reagents.maximum_volume))
|
||||
if(!beaker || (beaker && beaker.reagents.total_volume >= beaker.reagents.maximum_volume))
|
||||
return
|
||||
playsound(src.loc, 'sound/machines/blender.ogg', 50, 1)
|
||||
var/offset = prob(50) ? -2 : 2
|
||||
@@ -1132,8 +1132,8 @@
|
||||
inuse = 0
|
||||
interact(usr)
|
||||
//Snacks and Plants
|
||||
for (var/obj/item/weapon/reagent_containers/food/snacks/O in holdingitems)
|
||||
if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/O in holdingitems)
|
||||
if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
break
|
||||
|
||||
var/allowed = null
|
||||
@@ -1144,85 +1144,85 @@
|
||||
if(isnull(allowed))
|
||||
break
|
||||
|
||||
for (var/r_id in allowed)
|
||||
for(var/r_id in allowed)
|
||||
|
||||
var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume
|
||||
var/amount = allowed[r_id]
|
||||
if(amount <= 0) //Negative amounts are multipliers for the reagent amount (Example: "amount = -5" means "reagent_amount * 5")
|
||||
if(amount == 0)
|
||||
if (O.reagents != null && O.reagents.has_reagent("nutriment"))
|
||||
if(O.reagents != null && O.reagents.has_reagent("nutriment"))
|
||||
beaker.reagents.add_reagent(r_id, min(O.reagents.get_reagent_amount("nutriment"), space))
|
||||
O.reagents.remove_reagent("nutriment", min(O.reagents.get_reagent_amount("nutriment"), space))
|
||||
if (O.reagents != null && O.reagents.has_reagent("plantmatter"))
|
||||
if(O.reagents != null && O.reagents.has_reagent("plantmatter"))
|
||||
beaker.reagents.add_reagent(r_id, min(O.reagents.get_reagent_amount("plantmatter"), space))
|
||||
O.reagents.remove_reagent("plantmatter", min(O.reagents.get_reagent_amount("plantmatter"), space))
|
||||
else
|
||||
if (O.reagents != null && O.reagents.has_reagent("nutriment"))
|
||||
if(O.reagents != null && O.reagents.has_reagent("nutriment"))
|
||||
beaker.reagents.add_reagent(r_id, min(round(O.reagents.get_reagent_amount("nutriment")*abs(amount)), space))
|
||||
O.reagents.remove_reagent("nutriment", min(O.reagents.get_reagent_amount("nutriment"), space))
|
||||
if (O.reagents != null && O.reagents.has_reagent("plantmatter"))
|
||||
if(O.reagents != null && O.reagents.has_reagent("plantmatter"))
|
||||
beaker.reagents.add_reagent(r_id, min(round(O.reagents.get_reagent_amount("plantmatter")*abs(amount)), space))
|
||||
O.reagents.remove_reagent("plantmatter", min(O.reagents.get_reagent_amount("plantmatter"), space))
|
||||
|
||||
else
|
||||
O.reagents.trans_id_to(beaker, r_id, min(amount, space))
|
||||
|
||||
if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
break
|
||||
|
||||
if(O.reagents.reagent_list.len == 0)
|
||||
remove_object(O)
|
||||
|
||||
//Sheets
|
||||
for (var/obj/item/stack/sheet/O in holdingitems)
|
||||
for(var/obj/item/stack/sheet/O in holdingitems)
|
||||
var/allowed = get_allowed_by_id(O)
|
||||
if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
break
|
||||
for(var/i = 1; i <= round(O.amount, 1); i++)
|
||||
for (var/r_id in allowed)
|
||||
for(var/r_id in allowed)
|
||||
var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume
|
||||
var/amount = allowed[r_id]
|
||||
beaker.reagents.add_reagent(r_id,min(amount, space))
|
||||
if (space < amount)
|
||||
if(space < amount)
|
||||
break
|
||||
if (i == round(O.amount, 1))
|
||||
if(i == round(O.amount, 1))
|
||||
remove_object(O)
|
||||
break
|
||||
//Plants
|
||||
for (var/obj/item/weapon/grown/O in holdingitems)
|
||||
if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
for(var/obj/item/weapon/grown/O in holdingitems)
|
||||
if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
break
|
||||
var/allowed = get_allowed_by_id(O)
|
||||
for (var/r_id in allowed)
|
||||
for(var/r_id in allowed)
|
||||
var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume
|
||||
var/amount = allowed[r_id]
|
||||
if (amount == 0)
|
||||
if (O.reagents != null && O.reagents.has_reagent(r_id))
|
||||
if(amount == 0)
|
||||
if(O.reagents != null && O.reagents.has_reagent(r_id))
|
||||
beaker.reagents.add_reagent(r_id,min(O.reagents.get_reagent_amount(r_id), space))
|
||||
else
|
||||
beaker.reagents.add_reagent(r_id,min(amount, space))
|
||||
|
||||
if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
break
|
||||
remove_object(O)
|
||||
|
||||
//xenoarch
|
||||
/*for(var/obj/item/weapon/rocksliver/O in holdingitems)
|
||||
if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
break
|
||||
var/allowed = get_allowed_by_id(O)
|
||||
for (var/r_id in allowed)
|
||||
for(var/r_id in allowed)
|
||||
var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume
|
||||
var/amount = allowed[r_id]
|
||||
beaker.reagents.add_reagent(r_id,min(amount, space), O.geological_data)
|
||||
|
||||
if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
break
|
||||
remove_object(O)*/
|
||||
|
||||
//Everything else - Transfers reagents from it into beaker
|
||||
for (var/obj/item/weapon/reagent_containers/O in holdingitems)
|
||||
if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
for(var/obj/item/weapon/reagent_containers/O in holdingitems)
|
||||
if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
break
|
||||
var/amount = O.reagents.total_volume
|
||||
O.reagents.trans_to(beaker, amount)
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
||||
if (!ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "chem_heater.tmpl", "ChemHeater", 350, 270)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
@@ -587,7 +587,7 @@
|
||||
M.visible_message("<span class='warning'>[M]'s hands flip out and flail everywhere!</span>")
|
||||
M.drop_l_hand()
|
||||
M.drop_r_hand()
|
||||
else if (effect <= 4)
|
||||
else if(effect <= 4)
|
||||
M.visible_message("<span class='warning'>[M] falls to the floor and flails uncontrollably!</span>")
|
||||
M.Jitter(5)
|
||||
M.Weaken(5)
|
||||
|
||||
@@ -609,7 +609,7 @@ datum/reagent/epinephrine/on_mob_life(var/mob/living/M as mob)
|
||||
|
||||
/datum/reagent/epinephrine/overdose_process(var/mob/living/M as mob, severity)
|
||||
var/effect = ..()
|
||||
if (severity == 1)
|
||||
if(severity == 1)
|
||||
if(effect <= 1)
|
||||
M.visible_message("<span class='warning'>[M] suddenly and violently vomits!</span>")
|
||||
M.fakevomit(no_text = 1)
|
||||
@@ -998,7 +998,7 @@ datum/reagent/haloperidol/on_mob_life(var/mob/living/M as mob)
|
||||
result_amount = 2
|
||||
|
||||
/datum/reagent/degreaser/reaction_turf(var/turf/simulated/T, var/volume)
|
||||
if (!istype(T)) return
|
||||
if(!istype(T)) return
|
||||
src = null
|
||||
if(volume >= 1)
|
||||
if(istype(T) && T.wet)
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
// Called if the reagent has passed the overdose threshold and is set to be triggering overdose effects
|
||||
/datum/reagent/proc/overdose_process(var/mob/living/M as mob, severity)
|
||||
var/effect = rand(1, 100) - severity
|
||||
if (effect <= 8)
|
||||
if(effect <= 8)
|
||||
M.adjustToxLoss(severity)
|
||||
return effect
|
||||
|
||||
|
||||
@@ -368,13 +368,13 @@ datum/reagent/blackpowder/reaction_turf(var/turf/T, var/volume) //oh shit
|
||||
M.Weaken(max(10/distance, 3))
|
||||
M.ear_damage += rand(0, 5)
|
||||
M.ear_deaf = max(M.ear_deaf,15)
|
||||
if (M.ear_damage >= 15)
|
||||
if(M.ear_damage >= 15)
|
||||
to_chat(M, "<span class='warning'>Your ears start to ring badly!</span>")
|
||||
if(prob(M.ear_damage - 10 + 5))
|
||||
to_chat(M, "<span class='warning'>You can't hear anything!</span>")
|
||||
M.disabilities |= DEAF
|
||||
else
|
||||
if (M.ear_damage >= 5)
|
||||
if(M.ear_damage >= 5)
|
||||
to_chat(M, "<span class='warning'>Your ears start to ring!</span>")
|
||||
|
||||
/datum/chemical_reaction/sonic_powder/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
@@ -397,13 +397,13 @@ datum/reagent/blackpowder/reaction_turf(var/turf/T, var/volume) //oh shit
|
||||
M.Weaken(max(10/distance, 3))
|
||||
M.ear_damage += rand(0, 5)
|
||||
M.ear_deaf = max(M.ear_deaf,15)
|
||||
if (M.ear_damage >= 15)
|
||||
if(M.ear_damage >= 15)
|
||||
to_chat(M, "<span class='warning'>Your ears start to ring badly!</span>")
|
||||
if(prob(M.ear_damage - 10 + 5))
|
||||
to_chat(M, "<span class='warning'>You can't hear anything!</span>")
|
||||
M.disabilities |= DEAF
|
||||
else
|
||||
if (M.ear_damage >= 5)
|
||||
if(M.ear_damage >= 5)
|
||||
to_chat(M, "<span class='warning'>Your ears start to ring!</span>")
|
||||
holder.remove_reagent("sonic_powder", created_volume)
|
||||
|
||||
@@ -535,6 +535,7 @@ datum/reagent/pyrosium/on_tick()
|
||||
required_reagents = list("chlorine" = 1, "oxygen" = 1, "nitrogen" = 1, "ammonia" = 1, "sodium" = 1, "silver" = 1)
|
||||
result_amount = 1
|
||||
mix_message = "The substance violently detonates!"
|
||||
mix_sound = 'sound/effects/bang.ogg'
|
||||
|
||||
/datum/chemical_reaction/azide/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
@@ -570,7 +571,7 @@ datum/reagent/firefighting_foam/reaction_mob(var/mob/living/M, var/method=TOUCH,
|
||||
return
|
||||
|
||||
datum/reagent/firefighting_foam/reaction_turf(var/turf/simulated/T, var/volume)
|
||||
if (!istype(T)) return
|
||||
if(!istype(T)) return
|
||||
var/CT = cooling_temperature
|
||||
src = null
|
||||
if(!istype(T, /turf/space))
|
||||
@@ -603,6 +604,7 @@ datum/reagent/firefighting_foam/reaction_obj(var/obj/O, var/volume)
|
||||
required_reagents = list("firefighting_foam" = 1, "clf3" = 1)
|
||||
result_amount = 1
|
||||
mix_message = "The substance violently detonates!"
|
||||
mix_sound = 'sound/effects/bang.ogg'
|
||||
|
||||
/datum/chemical_reaction/clf3_firefighting/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
M:drowsyness = max(0,M:drowsyness-7)
|
||||
//if(!M:sleeping_willingly)
|
||||
// M:sleeping = max(0,M.sleeping-2)
|
||||
if (M.bodytemperature > 310)
|
||||
if(M.bodytemperature > 310)
|
||||
M.bodytemperature = max(310, M.bodytemperature-5)
|
||||
M.Jitter(1)
|
||||
return
|
||||
@@ -528,7 +528,7 @@
|
||||
|
||||
/datum/reagent/ethanol/sbiten/on_mob_life(var/mob/living/M as mob)
|
||||
..()
|
||||
if (M.bodytemperature < 360)
|
||||
if(M.bodytemperature < 360)
|
||||
M.bodytemperature = min(360, M.bodytemperature+50) //310 is the normal bodytemp. 310.055
|
||||
return
|
||||
|
||||
@@ -566,7 +566,7 @@
|
||||
|
||||
/datum/reagent/ethanol/iced_beer/on_mob_life(var/mob/living/M as mob)
|
||||
..()
|
||||
if (M.bodytemperature < 270)
|
||||
if(M.bodytemperature < 270)
|
||||
M.bodytemperature = min(270, M.bodytemperature-40) //310 is the normal bodytemp. 310.055
|
||||
return
|
||||
|
||||
@@ -689,7 +689,7 @@
|
||||
/datum/reagent/ethanol/driestmartini/on_mob_life(var/mob/living/M as mob)
|
||||
M.dizziness +=10
|
||||
if(current_cycle >= 55 && current_cycle <115)
|
||||
if (!M.stuttering) M.stuttering = 1
|
||||
if(!M.stuttering) M.stuttering = 1
|
||||
M.stuttering += 10
|
||||
..()
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
if(1 to 20)
|
||||
//nothing
|
||||
if(21 to INFINITY)
|
||||
if (prob(data-10))
|
||||
if(prob(data-10))
|
||||
M.disabilities &= ~NEARSIGHTED
|
||||
data++
|
||||
return
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
/datum/reagent/drink/on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
M.nutrition += nutriment_factor
|
||||
if (adj_dizzy) M.dizziness = max(0,M.dizziness + adj_dizzy)
|
||||
if (adj_drowsy) M.drowsyness = max(0,M.drowsyness + adj_drowsy)
|
||||
if (adj_sleepy) M.sleeping = max(0,M.sleeping + adj_sleepy)
|
||||
if (adj_temp)
|
||||
if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055
|
||||
if(adj_dizzy) M.dizziness = max(0,M.dizziness + adj_dizzy)
|
||||
if(adj_drowsy) M.drowsyness = max(0,M.drowsyness + adj_drowsy)
|
||||
if(adj_sleepy) M.sleeping = max(0,M.sleeping + adj_sleepy)
|
||||
if(adj_temp)
|
||||
if(M.bodytemperature < 310)//310 is the normal bodytemp. 310.055
|
||||
M.bodytemperature = min(310, M.bodytemperature + (25 * TEMPERATURE_DAMAGE_COEFFICIENT))
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
for(var/tocheck in incoming)
|
||||
if(ispath(tocheck))
|
||||
var/check = new tocheck
|
||||
if (istype(check, /atom))
|
||||
if(istype(check, /atom))
|
||||
var/atom/reagentCheck = check
|
||||
var/datum/reagents/reagents = reagentCheck.reagents
|
||||
var/admin = 0
|
||||
|
||||
@@ -45,17 +45,17 @@
|
||||
if(!data) data = 1
|
||||
switch(data)
|
||||
if(1 to 5)
|
||||
if (!M.stuttering) M.stuttering = 1
|
||||
if(!M.stuttering) M.stuttering = 1
|
||||
M.Dizzy(10)
|
||||
if(prob(10)) M.emote(pick("twitch","giggle"))
|
||||
if(5 to 10)
|
||||
if (!M.stuttering) M.stuttering = 1
|
||||
if(!M.stuttering) M.stuttering = 1
|
||||
M.Jitter(20)
|
||||
M.Dizzy(20)
|
||||
M.druggy = max(M.druggy, 45)
|
||||
if(prob(20)) M.emote(pick("twitch","giggle"))
|
||||
if (10 to INFINITY)
|
||||
if (!M.stuttering) M.stuttering = 1
|
||||
if(10 to INFINITY)
|
||||
if(!M.stuttering) M.stuttering = 1
|
||||
M.Jitter(40)
|
||||
M.Dizzy(40)
|
||||
M.druggy = max(M.druggy, 60)
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
color = "#403010" // rgb: 64, 48, 16
|
||||
|
||||
/datum/reagent/hot_coco/on_mob_life(var/mob/living/M as mob)
|
||||
if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055
|
||||
if(M.bodytemperature < 310)//310 is the normal bodytemp. 310.055
|
||||
M.bodytemperature = min(310, M.bodytemperature + (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
|
||||
M.nutrition += nutriment_factor
|
||||
..()
|
||||
@@ -224,17 +224,17 @@
|
||||
if(!data) data = 1
|
||||
switch(data)
|
||||
if(1 to 5)
|
||||
if (!M.stuttering) M.stuttering = 1
|
||||
if(!M.stuttering) M.stuttering = 1
|
||||
M.Dizzy(5)
|
||||
if(prob(10)) M.emote(pick("twitch","giggle"))
|
||||
if(5 to 10)
|
||||
if (!M.stuttering) M.stuttering = 1
|
||||
if(!M.stuttering) M.stuttering = 1
|
||||
M.Jitter(10)
|
||||
M.Dizzy(10)
|
||||
M.druggy = max(M.druggy, 35)
|
||||
if(prob(20)) M.emote(pick("twitch","giggle"))
|
||||
if (10 to INFINITY)
|
||||
if (!M.stuttering) M.stuttering = 1
|
||||
if(10 to INFINITY)
|
||||
if(!M.stuttering) M.stuttering = 1
|
||||
M.Jitter(20)
|
||||
M.Dizzy(20)
|
||||
M.druggy = max(M.druggy, 40)
|
||||
@@ -277,7 +277,7 @@
|
||||
return
|
||||
|
||||
/datum/reagent/cornoil/reaction_turf(var/turf/simulated/T, var/volume)
|
||||
if (!istype(T)) return
|
||||
if(!istype(T)) return
|
||||
src = null
|
||||
if(volume >= 3)
|
||||
T.MakeSlippery()
|
||||
@@ -322,7 +322,7 @@
|
||||
|
||||
/datum/reagent/hot_ramen/on_mob_life(var/mob/living/M as mob)
|
||||
M.nutrition += nutriment_factor
|
||||
if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055
|
||||
if(M.bodytemperature < 310)//310 is the normal bodytemp. 310.055
|
||||
M.bodytemperature = min(310, M.bodytemperature + (10 * TEMPERATURE_DAMAGE_COEFFICIENT))
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
//makes you squeaky clean
|
||||
/datum/reagent/sterilizine/reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)
|
||||
if (method == TOUCH)
|
||||
if(method == TOUCH)
|
||||
M.germ_level -= min(volume*20, M.germ_level)
|
||||
|
||||
/datum/reagent/sterilizine/reaction_obj(var/obj/O, var/volume)
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
/datum/reagent/minttoxin/on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
if (FAT in M.mutations)
|
||||
if(FAT in M.mutations)
|
||||
M.gib()
|
||||
..()
|
||||
return
|
||||
@@ -412,27 +412,27 @@
|
||||
var/eyes_covered = 0
|
||||
var/obj/item/safe_thing = null
|
||||
if( victim.wear_mask )
|
||||
if ( victim.wear_mask.flags & MASKCOVERSEYES )
|
||||
if( victim.wear_mask.flags & MASKCOVERSEYES )
|
||||
eyes_covered = 1
|
||||
safe_thing = victim.wear_mask
|
||||
if ( victim.wear_mask.flags & MASKCOVERSMOUTH )
|
||||
if( victim.wear_mask.flags & MASKCOVERSMOUTH )
|
||||
mouth_covered = 1
|
||||
safe_thing = victim.wear_mask
|
||||
if( victim.head )
|
||||
if ( victim.head.flags & MASKCOVERSEYES )
|
||||
if( victim.head.flags & MASKCOVERSEYES )
|
||||
eyes_covered = 1
|
||||
safe_thing = victim.head
|
||||
if ( victim.head.flags & MASKCOVERSMOUTH )
|
||||
if( victim.head.flags & MASKCOVERSMOUTH )
|
||||
mouth_covered = 1
|
||||
safe_thing = victim.head
|
||||
if(victim.glasses)
|
||||
eyes_covered = 1
|
||||
if ( !safe_thing )
|
||||
if( !safe_thing )
|
||||
safe_thing = victim.glasses
|
||||
if ( eyes_covered && mouth_covered )
|
||||
if( eyes_covered && mouth_covered )
|
||||
to_chat(victim, "\red Your [safe_thing] protects you from the pepperspray!")
|
||||
return
|
||||
else if ( mouth_covered ) // Reduced effects if partially protected
|
||||
else if( mouth_covered ) // Reduced effects if partially protected
|
||||
to_chat(victim, "\red Your [safe_thing] protect you from most of the pepperspray!")
|
||||
if(prob(5))
|
||||
victim.emote("scream")
|
||||
@@ -443,7 +443,7 @@
|
||||
victim.Weaken(3)
|
||||
victim.drop_item()
|
||||
return
|
||||
else if ( eyes_covered ) // Eye cover is better than mouth cover
|
||||
else if( eyes_covered ) // Eye cover is better than mouth cover
|
||||
to_chat(victim, "\red Your [safe_thing] protects your eyes from the pepperspray!")
|
||||
victim.eye_blurry = max(M.eye_blurry, 3)
|
||||
victim.damageoverlaytemp = 30
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
return
|
||||
|
||||
/datum/reagent/water/reaction_turf(var/turf/simulated/T, var/volume)
|
||||
if (!istype(T)) return
|
||||
if(!istype(T)) return
|
||||
src = null
|
||||
if(volume >= 3)
|
||||
T.MakeSlippery()
|
||||
@@ -74,7 +74,7 @@
|
||||
color = "#1BB1AB"
|
||||
|
||||
/datum/reagent/lube/reaction_turf(var/turf/simulated/T, var/volume)
|
||||
if (!istype(T)) return
|
||||
if(!istype(T)) return
|
||||
src = null
|
||||
if(volume >= 1)
|
||||
T.MakeSlippery(TURF_WET_LUBE)
|
||||
@@ -289,13 +289,13 @@
|
||||
data++
|
||||
M.jitteriness = max(M.jitteriness-5,0)
|
||||
if(data >= 30) // 12 units, 60 seconds @ metabolism 0.4 units & tick rate 2.0 sec
|
||||
if (!M.stuttering) M.stuttering = 1
|
||||
if(!M.stuttering) M.stuttering = 1
|
||||
M.stuttering += 4
|
||||
M.Dizzy(5)
|
||||
if(iscultist(M) && prob(5))
|
||||
M.say(pick("Av'te Nar'sie","Pa'lid Mors","INO INO ORA ANA","SAT ANA!","Daim'niodeis Arc'iai Le'eones","Egkau'haom'nai en Chaous","Ho Diak'nos tou Ap'iron","R'ge Na'sie","Diabo us Vo'iscum","Si gn'um Co'nu"))
|
||||
if(data >= 75 && prob(33)) // 30 units, 150 seconds
|
||||
if (!M.confused) M.confused = 1
|
||||
if(!M.confused) M.confused = 1
|
||||
M.confused += 3
|
||||
if(isvampirethrall(M))
|
||||
ticker.mode.remove_vampire_mind(M.mind)
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
usr.set_machine(src)
|
||||
if(!beaker) return
|
||||
|
||||
if (href_list["create_vaccine"])
|
||||
if(href_list["create_vaccine"])
|
||||
if(!src.wait)
|
||||
var/obj/item/weapon/reagent_containers/glass/bottle/B = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc)
|
||||
if(B)
|
||||
@@ -104,7 +104,7 @@
|
||||
src.temp_html = "The replicator is not ready yet."
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
else if (href_list["create_virus_culture"])
|
||||
else if(href_list["create_virus_culture"])
|
||||
if(!wait)
|
||||
var/type = GetVirusTypeByIndex(text2num(href_list["create_virus_culture"]))//the path is received as string - converting
|
||||
var/datum/disease/D = null
|
||||
@@ -135,11 +135,11 @@
|
||||
src.temp_html = "The replicator is not ready yet."
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
else if (href_list["empty_beaker"])
|
||||
else if(href_list["empty_beaker"])
|
||||
beaker.reagents.clear_reagents()
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
else if (href_list["eject"])
|
||||
else if(href_list["eject"])
|
||||
beaker:loc = src.loc
|
||||
beaker = null
|
||||
icon_state = "mixer0"
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
if(amount_per_transfer_from_this in possible_transfer_amounts)
|
||||
default = amount_per_transfer_from_this
|
||||
var/N = input("Amount per transfer from this:", "[src]", default) as null|anything in possible_transfer_amounts
|
||||
if (N)
|
||||
if(N)
|
||||
amount_per_transfer_from_this = N
|
||||
|
||||
/obj/item/weapon/reagent_containers/New()
|
||||
..()
|
||||
if (!possible_transfer_amounts)
|
||||
if(!possible_transfer_amounts)
|
||||
src.verbs -= /obj/item/weapon/reagent_containers/verb/set_APTFT
|
||||
var/datum/reagents/R = new/datum/reagents(volume)
|
||||
reagents = R
|
||||
@@ -72,7 +72,7 @@
|
||||
/obj/item/weapon/reagent_containers/proc/reagentlist(var/obj/item/weapon/reagent_containers/snack) //Attack logs for regents in pills
|
||||
var/data
|
||||
if(snack && snack.reagents && snack.reagents.reagent_list && snack.reagents.reagent_list.len) //find a reagent list if there is and check if it has entries
|
||||
for (var/datum/reagent/R in snack.reagents.reagent_list) //no reagents will be left behind
|
||||
for(var/datum/reagent/R in snack.reagents.reagent_list) //no reagents will be left behind
|
||||
data += "[R.id]([R.volume] units); " //Using IDs because SOME chemicals(I'm looking at you, chlorhydrate-beer) have the same names as other chemicals.
|
||||
return data
|
||||
else return "No reagents"
|
||||
|
||||
@@ -74,9 +74,9 @@
|
||||
if(!R.total_volume)
|
||||
to_chat(user, "<span class='warning'>The injector is empty.</span>")
|
||||
return
|
||||
if (!istype(M))
|
||||
if(!istype(M))
|
||||
return
|
||||
if (R.total_volume && M.can_inject(user, 1, penetrate_thick = bypass_protection))
|
||||
if(R.total_volume && M.can_inject(user, 1, penetrate_thick = bypass_protection))
|
||||
to_chat(user, "<span class='notice'>You inject [M] with the injector.</span>")
|
||||
to_chat(M, "<span class='notice'>You feel a tiny prick!</span>")
|
||||
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
|
||||
var/obj/item/safe_thing = null
|
||||
if( victim.wear_mask )
|
||||
if ( victim.wear_mask.flags & MASKCOVERSEYES )
|
||||
if( victim.wear_mask.flags & MASKCOVERSEYES )
|
||||
safe_thing = victim.wear_mask
|
||||
if( victim.head )
|
||||
if ( victim.head.flags & MASKCOVERSEYES )
|
||||
if( victim.head.flags & MASKCOVERSEYES )
|
||||
safe_thing = victim.head
|
||||
if(victim.glasses)
|
||||
if ( !safe_thing )
|
||||
if( !safe_thing )
|
||||
safe_thing = victim.glasses
|
||||
|
||||
if(safe_thing)
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
|
||||
to_chat(user, "\blue You transfer [trans] units of the solution.")
|
||||
if (src.reagents.total_volume<=0)
|
||||
if(src.reagents.total_volume<=0)
|
||||
filled = 0
|
||||
icon_state = "[initial(icon_state)]"
|
||||
return
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "\blue You transfer [trans] units of the solution.")
|
||||
if (src.reagents.total_volume<=0)
|
||||
if(src.reagents.total_volume<=0)
|
||||
filled = 0
|
||||
icon_state = "[initial(icon_state)]"
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
flags &= ~OPENCONTAINER
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/attack_self(mob/user as mob)
|
||||
if (canopened == 0)
|
||||
if(canopened == 0)
|
||||
playsound(src.loc,'sound/effects/canopen.ogg', rand(10,50), 1)
|
||||
to_chat(user, "<span class='notice'>You open the drink with an audible pop!</span>")
|
||||
canopened = 1
|
||||
@@ -59,11 +59,11 @@
|
||||
return
|
||||
if(!reagents || reagents.total_volume==0)
|
||||
to_chat(user, "\blue \The [src] is empty!")
|
||||
else if (reagents.total_volume<=src.volume/4)
|
||||
else if(reagents.total_volume<=src.volume/4)
|
||||
to_chat(user, "\blue \The [src] is almost empty!")
|
||||
else if (reagents.total_volume<=src.volume*0.66)
|
||||
else if(reagents.total_volume<=src.volume*0.66)
|
||||
to_chat(user, "\blue \The [src] is half full!")
|
||||
else if (reagents.total_volume<=src.volume*0.90)
|
||||
else if(reagents.total_volume<=src.volume*0.90)
|
||||
to_chat(user, "\blue \The [src] is almost full!")
|
||||
else
|
||||
to_chat(user, "\blue \The [src] is full!")*/
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
else
|
||||
name = "condiment bottle"
|
||||
main_reagent = reagents.get_master_reagent_name()
|
||||
if (reagents.reagent_list.len==1)
|
||||
if(reagents.reagent_list.len==1)
|
||||
desc = "Looks like it is [lowertext(main_reagent)], but you are not sure."
|
||||
else
|
||||
desc = "A mixture of various condiments. [lowertext(main_reagent)] is one of them."
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
if(!proximity) return
|
||||
|
||||
// Moved from the can code; not necessary since closed cans aren't open containers now, but, eh.
|
||||
if (istype(target, /obj/item/weapon/reagent_containers/food/drinks/cans))
|
||||
if(istype(target, /obj/item/weapon/reagent_containers/food/drinks/cans))
|
||||
var/obj/item/weapon/reagent_containers/food/drinks/cans/cantarget = target
|
||||
if(cantarget.canopened == 0)
|
||||
to_chat(user, "<span class='notice'>You need to open the drink you want to pour into!</span>")
|
||||
@@ -109,12 +109,12 @@
|
||||
return
|
||||
if(!reagents || reagents.total_volume==0)
|
||||
to_chat(user, "<span class='notice'> \The [src] is empty!</span>")
|
||||
else if (reagents.total_volume<=src.volume/4)
|
||||
else if(reagents.total_volume<=src.volume/4)
|
||||
to_chat(user, "<span class='notice'> \The [src] is almost empty!</span>")
|
||||
else if (reagents.total_volume<=src.volume*0.66)
|
||||
else if(reagents.total_volume<=src.volume*0.66)
|
||||
to_chat(user, "<span class='notice'> \The [src] is half full!</span>")// We're all optimistic, right?!
|
||||
|
||||
else if (reagents.total_volume<=src.volume*0.90)
|
||||
else if(reagents.total_volume<=src.volume*0.90)
|
||||
to_chat(user, "<span class='notice'> \The [src] is almost full!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'> \The [src] is full!</span>")
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
/*else if(reagents.reagent_list.len == 1)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
switch(R.id)*/
|
||||
if (reagents.reagent_list.len > 0)
|
||||
if(reagents.reagent_list.len > 0)
|
||||
//mrid = R.get_master_reagent_id()
|
||||
switch(reagents.get_master_reagent_id())
|
||||
if("beer")
|
||||
@@ -183,7 +183,7 @@
|
||||
icon_state = "cognacglass"
|
||||
name = "Glass of cognac"
|
||||
desc = "Damn, you feel like some kind of French aristocrat just by holding this."
|
||||
if ("kahlua")
|
||||
if("kahlua")
|
||||
icon_state = "kahluaglass"
|
||||
name = "Glass of RR coffee Liquor"
|
||||
desc = "DAMN, THIS THING LOOKS ROBUST"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
reagents.add_reagent("slimejelly", 50)
|
||||
|
||||
on_reagent_change()
|
||||
if (reagents.reagent_list.len > 0)
|
||||
if(reagents.reagent_list.len > 0)
|
||||
switch(reagents.get_master_reagent_id())
|
||||
if("slimejelly")
|
||||
icon_state = "jar_slime"
|
||||
|
||||
@@ -61,11 +61,11 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/examine(mob/user)
|
||||
if(..(user, 0))
|
||||
if (bitecount==0)
|
||||
if(bitecount==0)
|
||||
return
|
||||
else if (bitecount==1)
|
||||
else if(bitecount==1)
|
||||
to_chat(user, "\blue \The [src] was bitten by someone!")
|
||||
else if (bitecount<=3)
|
||||
else if(bitecount<=3)
|
||||
to_chat(user, "\blue \The [src] was bitten [bitecount] times!")
|
||||
else
|
||||
to_chat(user, "\blue \The [src] was bitten multiple times!")
|
||||
@@ -138,7 +138,7 @@
|
||||
return 1
|
||||
to_chat(user, "\red You slip [W] inside [src].")
|
||||
user.unEquip(W)
|
||||
if ((user.client && user.s_active != src))
|
||||
if((user.client && user.s_active != src))
|
||||
user.client.screen -= W
|
||||
W.dropped(user)
|
||||
add_fingerprint(user)
|
||||
@@ -146,7 +146,7 @@
|
||||
return
|
||||
else
|
||||
return 1
|
||||
if ( \
|
||||
if( \
|
||||
!isturf(src.loc) || \
|
||||
!(locate(/obj/structure/table) in src.loc) && \
|
||||
!(locate(/obj/machinery/optable) in src.loc) && \
|
||||
@@ -155,7 +155,7 @@
|
||||
to_chat(user, "\red You cannot slice [src] here! You need a table or at least a tray to do it.")
|
||||
return 1
|
||||
var/slices_lost = 0
|
||||
if (!inaccurate)
|
||||
if(!inaccurate)
|
||||
user.visible_message( \
|
||||
"\blue [user] slices \the [src]!", \
|
||||
"\blue You slice \the [src]!" \
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
filling.icon += mix_color_from_reagents(reagents.reagent_list)
|
||||
overlays += filling
|
||||
|
||||
if (!is_open_container())
|
||||
if(!is_open_container())
|
||||
var/image/lid = image(icon, src, "lid_bottle")
|
||||
overlays += lid
|
||||
|
||||
|
||||
@@ -48,12 +48,12 @@
|
||||
/obj/item/weapon/reagent_containers/glass/examine(mob/user)
|
||||
if(!..(user, 2))
|
||||
return
|
||||
if (!is_open_container())
|
||||
if(!is_open_container())
|
||||
to_chat(user, "<span class='notice'>Airtight lid seals it completely.</span>")
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/attack_self()
|
||||
..()
|
||||
if (is_open_container())
|
||||
if(is_open_container())
|
||||
to_chat(usr, "<span class='notice'>You put the lid on \the [src].</span>")
|
||||
flags ^= OPENCONTAINER
|
||||
else
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
if (!is_open_container())
|
||||
if(!is_open_container())
|
||||
return
|
||||
|
||||
for(var/type in can_be_placed_into)
|
||||
@@ -216,7 +216,7 @@
|
||||
filling.icon += mix_color_from_reagents(reagents.reagent_list)
|
||||
overlays += filling
|
||||
|
||||
if (!is_open_container())
|
||||
if(!is_open_container())
|
||||
var/image/lid = image(icon, src, "lid_[initial(icon_state)]")
|
||||
overlays += lid
|
||||
if(assembly)
|
||||
@@ -228,7 +228,7 @@
|
||||
set src in usr
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
if (assembly)
|
||||
if(assembly)
|
||||
to_chat(usr, "<span class='notice'>You detach [assembly] from \the [src]</span>")
|
||||
usr.put_in_hands(assembly)
|
||||
assembly = null
|
||||
@@ -242,8 +242,8 @@
|
||||
reagents.handle_reactions()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if (istype(W,/obj/item/device/assembly_holder))
|
||||
if (assembly)
|
||||
if(istype(W,/obj/item/device/assembly_holder))
|
||||
if(assembly)
|
||||
to_chat(usr, "<span class='warning'>The [src] already has an assembly.</span>")
|
||||
return ..()
|
||||
assembly = W
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
set src in usr
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
if (alert(usr, "Are you sure you want to empty that?", "Empty Bottle:", "Yes", "No") != "Yes")
|
||||
if(alert(usr, "Are you sure you want to empty that?", "Empty Bottle:", "Yes", "No") != "Yes")
|
||||
return
|
||||
if(isturf(usr.loc) && src.loc == usr)
|
||||
to_chat(usr, "<span class='notice'>You empty \the [src] onto the floor.</span>")
|
||||
@@ -228,10 +228,10 @@
|
||||
/obj/item/weapon/reagent_containers/spray/plantbgone/afterattack(atom/A as mob|obj, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
|
||||
if (istype(A, /obj/machinery/portable_atmospherics/hydroponics)) // We are targeting hydrotray
|
||||
if(istype(A, /obj/machinery/portable_atmospherics/hydroponics)) // We are targeting hydrotray
|
||||
return
|
||||
|
||||
if (istype(A, /obj/effect/blob)) // blob damage in blob code
|
||||
if(istype(A, /obj/effect/blob)) // blob damage in blob code
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
to_chat(user, "\red This syringe is broken!")
|
||||
return
|
||||
|
||||
/* if (user.a_intent == I_HARM && ismob(target))
|
||||
/* if(user.a_intent == I_HARM && ismob(target))
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
target = user
|
||||
syringestab(target, user)
|
||||
@@ -126,7 +126,7 @@
|
||||
else
|
||||
B = T.take_blood(src,amount)
|
||||
|
||||
if (B)
|
||||
if(B)
|
||||
src.reagents.reagent_list |= B
|
||||
src.reagents.update_total()
|
||||
src.on_reagent_change()
|
||||
@@ -150,7 +150,7 @@
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) // transfer from, transfer to - who cares?
|
||||
|
||||
to_chat(user, "\blue You fill the syringe with [trans] units of the solution.")
|
||||
if (reagents.total_volume >= reagents.maximum_volume)
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
mode=!mode
|
||||
update_icon()
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
to_chat(user, "<span class=warning>You break the medical seal on the [P]!</span>")
|
||||
P.instant_application = 0
|
||||
|
||||
if (reagents.total_volume <= 0 && mode==SYRINGE_INJECT)
|
||||
if(reagents.total_volume <= 0 && mode==SYRINGE_INJECT)
|
||||
mode = SYRINGE_DRAW
|
||||
update_icon()
|
||||
|
||||
@@ -270,9 +270,9 @@
|
||||
if(ismob(loc))
|
||||
var/injoverlay
|
||||
switch(mode)
|
||||
if (SYRINGE_DRAW)
|
||||
if(SYRINGE_DRAW)
|
||||
injoverlay = "draw"
|
||||
if (SYRINGE_INJECT)
|
||||
if(SYRINGE_INJECT)
|
||||
injoverlay = "inject"
|
||||
overlays += injoverlay
|
||||
icon_state = "[rounded_vol]"
|
||||
@@ -303,7 +303,7 @@
|
||||
var/target_zone = ran_zone(check_zone(user.zone_sel.selecting, target))
|
||||
var/obj/item/organ/external/affecting = target:get_organ(target_zone)
|
||||
|
||||
if (!affecting || (affecting.status & ORGAN_DESTROYED) || affecting.is_stump())
|
||||
if(!affecting || (affecting.status & ORGAN_DESTROYED) || affecting.is_stump())
|
||||
to_chat(user, "<span class='danger'>They are missing that limb!</span>")
|
||||
return
|
||||
var/hit_area = affecting.name
|
||||
@@ -312,7 +312,7 @@
|
||||
if((user != target) && H.check_shields(7, "the [src.name]"))
|
||||
return
|
||||
|
||||
if (target != user && target.getarmor(target_zone, "melee") > 5 && prob(50))
|
||||
if(target != user && target.getarmor(target_zone, "melee") > 5 && prob(50))
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("\red <B>[user] tries to stab [target] in \the [hit_area] with [src.name], but the attack is deflected by armor!</B>"), 1)
|
||||
user.unEquip(src)
|
||||
@@ -401,7 +401,7 @@
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) // transfer from, transfer to - who cares?
|
||||
|
||||
to_chat(user, "\blue You fill the syringe with [trans] units of the solution.")
|
||||
if (reagents.total_volume >= reagents.maximum_volume)
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
mode=!mode
|
||||
update_icon()
|
||||
|
||||
@@ -430,7 +430,7 @@
|
||||
spawn(5)
|
||||
var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "\blue You inject [trans] units of the solution. The syringe now contains [src.reagents.total_volume] units.")
|
||||
if (reagents.total_volume >= reagents.maximum_volume && mode==SYRINGE_INJECT)
|
||||
if(reagents.total_volume >= reagents.maximum_volume && mode==SYRINGE_INJECT)
|
||||
mode = SYRINGE_DRAW
|
||||
update_icon()
|
||||
return
|
||||
@@ -441,9 +441,9 @@
|
||||
if(ismob(loc))
|
||||
var/mode_t
|
||||
switch(mode)
|
||||
if (SYRINGE_DRAW)
|
||||
if(SYRINGE_DRAW)
|
||||
mode_t = "d"
|
||||
if (SYRINGE_INJECT)
|
||||
if(SYRINGE_INJECT)
|
||||
mode_t = "i"
|
||||
icon_state = "[mode_t][rounded_vol]"
|
||||
else
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
if (!possible_transfer_amounts)
|
||||
if(!possible_transfer_amounts)
|
||||
src.verbs -= /obj/structure/reagent_dispensers/verb/set_APTFT
|
||||
..()
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
var/N = input("Amount per transfer from this:","[src]") as null|anything in possible_transfer_amounts
|
||||
if (N)
|
||||
if(N)
|
||||
amount_per_transfer_from_this = N
|
||||
|
||||
/obj/structure/reagent_dispensers/ex_act(severity)
|
||||
@@ -49,12 +49,12 @@
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
if(prob(50))
|
||||
new /obj/effect/effect/water(src.loc)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
if(prob(5))
|
||||
new /obj/effect/effect/water(src.loc)
|
||||
qdel(src)
|
||||
return
|
||||
@@ -131,7 +131,7 @@
|
||||
to_chat(usr, "<span class='notice'>There is some kind of device rigged to the tank.")
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/attack_hand()
|
||||
if (rig)
|
||||
if(rig)
|
||||
usr.visible_message("[usr] begins to detach [rig] from \the [src].", "You begin to detach [rig] from \the [src]")
|
||||
if(do_after(usr, 20, target = src))
|
||||
usr.visible_message("\blue [usr] detaches [rig] from \the [src].", "\blue You detach [rig] from \the [src]")
|
||||
@@ -140,8 +140,8 @@
|
||||
overlays = new/list()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if (istype(W,/obj/item/device/assembly_holder) && accepts_rig)
|
||||
if (rig)
|
||||
if(istype(W,/obj/item/device/assembly_holder) && accepts_rig)
|
||||
if(rig)
|
||||
to_chat(user, "\red There is another device in the way.")
|
||||
return ..()
|
||||
user.visible_message("[user] begins rigging [W] to \the [src].", "You begin rigging [W] to \the [src]")
|
||||
@@ -149,7 +149,7 @@
|
||||
user.visible_message("\blue [user] rigs [W] to \the [src].", "\blue You rig [W] to \the [src]")
|
||||
|
||||
var/obj/item/device/assembly_holder/H = W
|
||||
if (istype(H.a_left,/obj/item/device/assembly/igniter) || istype(H.a_right,/obj/item/device/assembly/igniter))
|
||||
if(istype(H.a_left,/obj/item/device/assembly/igniter) || istype(H.a_right,/obj/item/device/assembly/igniter))
|
||||
msg_admin_attack("[key_name_admin(user)] rigged a fueltank for explosion (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
|
||||
log_game("[key_name(user)] rigged fueltank a fueltank for explosion at [loc.x], [loc.y], [loc.z]")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user