mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Merge branch 'master' of https://github.com/ZomgPonies/Baystation12
This commit is contained in:
Regular → Executable
+4
-2
@@ -22,7 +22,9 @@
|
||||
var/obj/vent = pick_n_take(vents)
|
||||
|
||||
var/list/gunk = list("water","carbon","flour","radium","toxin","cleaner","nutriment","condensedcapsaicin","psilocybin","lube",
|
||||
"plantbgone","banana","anti_toxin","space_drugs","hyperzine","holywater","ethanol","hot_coco","pacid")
|
||||
"plantbgone","banana","anti_toxin","space_drugs","hyperzine","holywater","ethanol","hot_coco","pacid",
|
||||
"blood","stoxin","flourine","ryetalyn","thermite","mutagen","oxycodone","fuel","plasma","cryptobiolin",
|
||||
"impedrezene","mindbreaker","nanites","xenomicrobes","lipozine","frostoil","doctorsdelight","beepskysmash","tricordrazine")
|
||||
var/datum/reagents/R = new/datum/reagents(50)
|
||||
R.my_atom = vent
|
||||
R.add_reagent(pick(gunk), 50)
|
||||
@@ -31,4 +33,4 @@
|
||||
smoke.set_up(R, rand(1, 2), 0, vent, 0, silent = 1)
|
||||
playsound(vent.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
smoke.start()
|
||||
R.delete() //GC the reagents
|
||||
R.delete() //GC the reagents
|
||||
|
||||
@@ -432,12 +432,12 @@
|
||||
reagents.clear_reagents()
|
||||
icon_state = "mixer0"
|
||||
else if (href_list["createpill"] || href_list["createpill_multiple"])
|
||||
var/name = reject_bad_text(input(usr,"Name:","Name your pill!",reagents.get_master_reagent_name()))
|
||||
var/count = 1
|
||||
if (href_list["createpill_multiple"]) count = isgoodnumber(input("Select the number of pills to make.", 10, pillamount) as num)
|
||||
if (count > 20) count = 20 //Pevent people from creating huge stacks of pills easily. Maybe move the number to defines?
|
||||
var/amount_per_pill = reagents.total_volume/count
|
||||
if (amount_per_pill > 50) amount_per_pill = 50
|
||||
var/name = reject_bad_text(input(usr,"Name:","Name your pill!","[reagents.get_master_reagent_name()] ([amount_per_pill] units)"))
|
||||
while (count--)
|
||||
var/obj/item/weapon/reagent_containers/pill/P = new/obj/item/weapon/reagent_containers/pill(src.loc)
|
||||
if(!name) name = reagents.get_master_reagent_name()
|
||||
@@ -547,7 +547,7 @@
|
||||
if(!condi)
|
||||
dat += "<HR><BR><A href='?src=\ref[src];createpill=1'>Create pill (50 units max)</A><a href=\"?src=\ref[src]&change_pill=1\"><img src=\"pill[pillsprite].png\" /></a><BR>"
|
||||
dat += "<A href='?src=\ref[src];createpill_multiple=1'>Create multiple pills</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];createbottle=1'>Create bottle (30 units max)<a href=\"?src=\ref[src]&change_bottle=1\"><img src=\"bottle[bottlesprite].png\" /></A>"
|
||||
dat += "<A href='?src=\ref[src];createbottle=1'>Create bottle (30 units max)</A>"
|
||||
else
|
||||
dat += "<A href='?src=\ref[src];createbottle=1'>Create bottle (50 units max)</A>"
|
||||
if(!condi)
|
||||
|
||||
@@ -17,9 +17,40 @@
|
||||
if(!icon_state)
|
||||
icon_state = "bottle[rand(1,20)]"
|
||||
|
||||
|
||||
//Copypasta from /obj/item/weapon/reagent_containers/glass/beaker
|
||||
on_reagent_change()
|
||||
update_icon()
|
||||
|
||||
pickup(mob/user)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
dropped(mob/user)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
attack_hand()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
update_icon()
|
||||
overlays.Cut()
|
||||
|
||||
if(reagents.total_volume)
|
||||
var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]10")
|
||||
|
||||
var/percent = round((reagents.total_volume / volume) * 100)
|
||||
switch(percent)
|
||||
if(0 to 24) filling.icon_state = "[icon_state]10"
|
||||
if(25 to 49) filling.icon_state = "[icon_state]25"
|
||||
if(50 to 74) filling.icon_state = "[icon_state]50"
|
||||
if(75 to 90) filling.icon_state = "[icon_state]75"
|
||||
if(91 to INFINITY) filling.icon_state = "[icon_state]100"
|
||||
|
||||
filling.icon += mix_color_from_reagents(reagents.reagent_list)
|
||||
overlays += filling
|
||||
|
||||
if (!is_open_container())
|
||||
var/image/lid = image(icon, src, "lid_bottle")
|
||||
overlays += lid
|
||||
|
||||
Reference in New Issue
Block a user