mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
further tweaks
This commit is contained in:
@@ -81,7 +81,7 @@
|
||||
refill = reagents.get_master_reagent_id()
|
||||
refillName = reagents.get_master_reagent_name()
|
||||
|
||||
var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
var/trans = reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'> You transfer [trans] units of the solution to [target].</span>")
|
||||
|
||||
if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell
|
||||
@@ -102,22 +102,22 @@
|
||||
if(istype(I, /obj/item/clothing/mask/cigarette)) //ciggies are weird
|
||||
return
|
||||
if(is_hot(I))
|
||||
if(src.reagents)
|
||||
src.reagents.chem_temp += 15
|
||||
if(reagents)
|
||||
reagents.chem_temp += 15
|
||||
to_chat(user, "<span class='notice'>You heat [src] with [I].</span>")
|
||||
src.reagents.handle_reactions()
|
||||
reagents.handle_reactions()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/examine(mob/user)
|
||||
if(!..(user, 1))
|
||||
return
|
||||
if(!reagents || reagents.total_volume==0)
|
||||
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 <= 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 <= 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 <= 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>")
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
else
|
||||
user.drop_item()
|
||||
user.put_in_active_hand(B)
|
||||
B.icon_state = src.icon_state
|
||||
B.icon_state = icon_state
|
||||
|
||||
var/icon/I = new('icons/obj/drinks.dmi', src.icon_state)
|
||||
var/icon/I = new('icons/obj/drinks.dmi', icon_state)
|
||||
I.Blend(B.broken_outline, ICON_OVERLAY, rand(5), 1)
|
||||
I.SwapColor(rgb(255, 0, 220, 255), rgb(0, 0, 0, 0))
|
||||
B.icon = I
|
||||
@@ -99,11 +99,11 @@
|
||||
|
||||
//Display an attack message.
|
||||
if(target != user)
|
||||
target.visible_message("<span class='danger'>[user] has hit [target][head_attack_message] with a bottle of [src.name]!</span>", \
|
||||
"<span class='userdanger'>[user] has hit [target][head_attack_message] with a bottle of [src.name]!</span>")
|
||||
target.visible_message("<span class='danger'>[user] has hit [target][head_attack_message] with a bottle of [name]!</span>", \
|
||||
"<span class='userdanger'>[user] has hit [target][head_attack_message] with a bottle of [name]!</span>")
|
||||
else
|
||||
user.visible_message("<span class='danger'>[target] hits \himself with a bottle of [src.name][head_attack_message]!</span>", \
|
||||
"<span class='userdanger'>[target] hits \himself with a bottle of [src.name][head_attack_message]!</span>")
|
||||
user.visible_message("<span class='danger'>[target] hits \himself with a bottle of [name][head_attack_message]!</span>", \
|
||||
"<span class='userdanger'>[target] hits \himself with a bottle of [name][head_attack_message]!</span>")
|
||||
|
||||
//Attack logs
|
||||
add_logs(user, target, "attacked", src)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/attack_self(mob/user)
|
||||
if(canopened == 0)
|
||||
playsound(src.loc,'sound/effects/canopen.ogg', rand(10,50), 1)
|
||||
playsound(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
|
||||
flags |= OPENCONTAINER
|
||||
@@ -32,7 +32,7 @@
|
||||
if(canopened == 0)
|
||||
to_chat(user, "<span class='notice'>You need to open the drink!</span>")
|
||||
return
|
||||
else if(M == user && !src.reagents.total_volume && user.a_intent == "harm" && user.zone_sel.selecting == "head")
|
||||
else if(M == user && !reagents.total_volume && user.a_intent == "harm" && user.zone_sel.selecting == "head")
|
||||
user.visible_message("<span class='warning'>[user] crushes ["\the [src]"] on \his forehead!</span>", "<span class='notice'>You crush \the [src] on your forehead.</span>")
|
||||
crush(user)
|
||||
return
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='warning'>you can't add anymore to [target]!</span>")
|
||||
return
|
||||
var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
var/trans = reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You transfer [trans] units of the condiment to [target].</span>")
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/condiment/on_reagent_change()
|
||||
@@ -223,7 +223,7 @@
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You tear open [src] above [target] and the condiments drip onto it.</span>")
|
||||
src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/condiment/pack/on_reagent_change()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/reagent_containers/food/snacks/breadslice/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/item/weapon/reagent_containers/food/snacks/breadslice/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/reagent_containers/food/snacks) && !(W.flags & NODROP))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/customizable/sandwich/S = new(get_turf(user))
|
||||
S.attackby(W,user, params)
|
||||
@@ -6,13 +6,13 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/bun/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/item/weapon/reagent_containers/food/snacks/bun/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/reagent_containers/food/snacks) && !(W.flags & NODROP))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/customizable/burger/S = new(get_turf(user))
|
||||
S.attackby(W,user, params)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/reagent_containers/food/snacks) && !(W.flags & NODROP))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/customizable/pizza/S = new(get_turf(user))
|
||||
S.attackby(W,user, params)
|
||||
@@ -21,7 +21,7 @@
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/boiledspagetti/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/item/weapon/reagent_containers/food/snacks/boiledspagetti/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/reagent_containers/food/snacks) && !(W.flags & NODROP))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/customizable/pasta/S = new(get_turf(user))
|
||||
S.attackby(W,user, params)
|
||||
@@ -30,7 +30,7 @@
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/trash/plate/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/item/trash/plate/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/reagent_containers/food/snacks) && !(W.flags & NODROP))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/customizable/fullycustom/S = new(get_turf(user))
|
||||
S.attackby(W,user, params)
|
||||
@@ -44,7 +44,7 @@
|
||||
icon = 'icons/obj/food/food.dmi'
|
||||
icon_state = "soup"
|
||||
|
||||
/obj/item/trash/bowl/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/item/trash/bowl/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
if(istype(W, /obj/item/weapon/reagent_containers/food/snacks) && !(W.flags & NODROP))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/customizable/soup/S = new(get_turf(user))
|
||||
@@ -54,7 +54,6 @@
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/customizable/sandwich
|
||||
/obj/item/weapon/reagent_containers/food/snacks/customizable
|
||||
name = "sandwich"
|
||||
desc = "A sandwich! A timeless classic."
|
||||
icon_state = "breadslice"
|
||||
@@ -318,7 +317,7 @@
|
||||
toptype = new /obj/item/weapon/reagent_containers/food/snacks/bun()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/customizable/attackby(obj/item/I, mob/user, params)
|
||||
if(src.contents.len > sandwich_limit)
|
||||
if(contents.len > sandwich_limit)
|
||||
to_chat(user, "<span class='warning'>If you put anything else in or on [src] it's going to make a mess.</span>")
|
||||
return
|
||||
if(!istype(I, /obj/item/weapon/reagent_containers/food/snacks))
|
||||
@@ -346,7 +345,7 @@
|
||||
for(var/obj/item/O in ingredients)
|
||||
i++
|
||||
if(!fullycustom)
|
||||
var/image/I = new(src.icon, "[baseicon]_filling")
|
||||
var/image/I = new(icon, "[baseicon]_filling")
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/food = O
|
||||
if(!food.filling_color == "#FFFFFF")
|
||||
@@ -367,7 +366,7 @@
|
||||
overlays += O.overlays
|
||||
|
||||
if(top)
|
||||
var/image/T = new(src.icon, "[baseicon]_top")
|
||||
var/image/T = new(icon, "[baseicon]_top")
|
||||
T.pixel_x = pick(list(-1,0,1))
|
||||
T.pixel_y = (ingredients.len * 2)+1
|
||||
overlays += T
|
||||
@@ -383,24 +382,6 @@
|
||||
|
||||
to_chat(user, "<span class='notice'> You think you can see [whatsinside] in there.</span>")
|
||||
|
||||
/*
|
||||
/obj/item/weapon/reagent_containers/food/snacks/customizable/attack(mob/M as mob, mob/user as mob, def_zone) //SNOOOOOOOWFLAAAAAAAAAAAAAAAAAKES
|
||||
|
||||
var/obj/item/shard
|
||||
for(var/obj/item/O in contents)
|
||||
if(istype(O,/obj/item/weapon/shard))
|
||||
shard = O
|
||||
break
|
||||
|
||||
var/mob/living/H
|
||||
if(istype(M,/mob/living))
|
||||
H = M
|
||||
|
||||
if(H && shard && M == user) //This needs a check for feeding the food to other people, but that could be abusable.
|
||||
to_chat(H, "\red You lacerate your mouth on a [shard.name] in the sandwich!")
|
||||
H.adjustBruteLoss(5) //TODO: Target head if human.
|
||||
..()
|
||||
*/
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/customizable/proc/newname()
|
||||
var/unsorteditems[0]
|
||||
@@ -482,7 +463,7 @@
|
||||
sendback = "[pick(list("absurd","colossal","enormous","ridiculous","massive","oversized","cardiac-arresting","pipe-clogging","edible but sickening","sickening","gargantuan","mega","belly-burster","chest-burster"))] [basename]"
|
||||
return sendback
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/customizable/proc/sortlist(var/list/unsorted, var/highest)
|
||||
/obj/item/weapon/reagent_containers/food/snacks/customizable/proc/sortlist(list/unsorted, highest)
|
||||
var/sorted[0]
|
||||
for(var/i = 1, i<= highest, i++)
|
||||
for(var/it in unsorted)
|
||||
|
||||
@@ -63,11 +63,11 @@
|
||||
if(bitecount==0)
|
||||
return
|
||||
else if(bitecount==1)
|
||||
to_chat(user, "\blue \The [src] was bitten by someone!")
|
||||
to_chat(user, "<span class='notice'>[src] was bitten by someone!</span>")
|
||||
else if(bitecount<=3)
|
||||
to_chat(user, "\blue \The [src] was bitten [bitecount] times!")
|
||||
to_chat(user, "<span class='notice'>[src] was bitten [bitecount] times!</span>")
|
||||
else
|
||||
to_chat(user, "\blue \The [src] was bitten multiple times!")
|
||||
to_chat(user, "<span class='notice'>[src] was bitten multiple times!</span>")
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/attackby(obj/item/weapon/W, mob/user, params)
|
||||
@@ -92,10 +92,10 @@
|
||||
"<span class='notice'>You scoop up some [src] with \the [U]!" \
|
||||
)
|
||||
|
||||
src.bitecount++
|
||||
bitecount++
|
||||
U.overlays.Cut()
|
||||
var/image/I = new(U.icon, "loadedfood")
|
||||
I.color = src.filling_color
|
||||
I.color = filling_color
|
||||
U.overlays += I
|
||||
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/collected = new type
|
||||
@@ -135,7 +135,7 @@
|
||||
else if(W.w_class <= 2 && istype(src,/obj/item/weapon/reagent_containers/food/snacks/sliceable))
|
||||
if(!iscarbon(user))
|
||||
return 1
|
||||
to_chat(user, "\red You slip [W] inside [src].")
|
||||
to_chat(user, "<span class='warning'>You slip [W] inside [src].</span>")
|
||||
user.unEquip(W)
|
||||
if((user.client && user.s_active != src))
|
||||
user.client.screen -= W
|
||||
@@ -146,28 +146,28 @@
|
||||
else
|
||||
return 1
|
||||
if( \
|
||||
!isturf(src.loc) || \
|
||||
!(locate(/obj/structure/table) in src.loc) && \
|
||||
!(locate(/obj/machinery/optable) in src.loc) && \
|
||||
!(locate(/obj/item/weapon/storage/bag/tray) in src.loc) \
|
||||
!isturf(loc) || \
|
||||
!(locate(/obj/structure/table) in loc) && \
|
||||
!(locate(/obj/machinery/optable) in loc) && \
|
||||
!(locate(/obj/item/weapon/storage/bag/tray) in loc) \
|
||||
)
|
||||
to_chat(user, "\red You cannot slice [src] here! You need a table or at least a tray to do it.")
|
||||
to_chat(user, "<span class='warning'>You cannot slice [src] here! You need a table or at least a tray to do it.</span>")
|
||||
return 1
|
||||
var/slices_lost = 0
|
||||
if(!inaccurate)
|
||||
user.visible_message( \
|
||||
"\blue [user] slices \the [src]!", \
|
||||
"\blue You slice \the [src]!" \
|
||||
"<span class='notice'>[user] slices [src]!</span>", \
|
||||
"<span class='notice'>You slice [src]!</span>" \
|
||||
)
|
||||
else
|
||||
user.visible_message( \
|
||||
"\blue [user] crudely slices \the [src] with [W]!", \
|
||||
"\blue You crudely slice \the [src] with your [W]!" \
|
||||
"<span class='notice'>[user] crudely slices [src] with [W]!</span>", \
|
||||
"<span class='notice'>You crudely slice [src] with your [W]</span>!" \
|
||||
)
|
||||
slices_lost = rand(1,min(1,round(slices_num/2)))
|
||||
var/reagents_per_slice = reagents.total_volume/slices_num
|
||||
for(var/i=1 to (slices_num-slices_lost))
|
||||
var/obj/slice = new slice_path (src.loc)
|
||||
var/obj/slice = new slice_path (loc)
|
||||
reagents.trans_to(slice,reagents_per_slice)
|
||||
qdel(src)
|
||||
|
||||
@@ -184,19 +184,19 @@
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
if(iscorgi(M))
|
||||
if(bitecount >= 4)
|
||||
M.visible_message("[M] [pick("burps from enjoyment", "yaps for more", "woofs twice", "looks at the area where \the [src] was")].","<span class=\"notice\">You swallow up the last part of \the [src].")
|
||||
playsound(src.loc,'sound/items/eatfood.ogg', rand(10,50), 1)
|
||||
M.visible_message("[M] [pick("burps from enjoyment", "yaps for more", "woofs twice", "looks at the area where [src] was")].","<span class='notice'>You swallow up the last part of [src].</span>")
|
||||
playsound(loc,'sound/items/eatfood.ogg', rand(10,50), 1)
|
||||
var/mob/living/simple_animal/pet/corgi/C = M
|
||||
C.adjustBruteLoss(-5)
|
||||
C.adjustFireLoss(-5)
|
||||
qdel(src)
|
||||
else
|
||||
M.visible_message("[M] takes a bite of \the [src].","<span class=\"notice\">You take a bite of \the [src].")
|
||||
playsound(src.loc,'sound/items/eatfood.ogg', rand(10,50), 1)
|
||||
M.visible_message("[M] takes a bite of [src].","<span class='notice'>You take a bite of [src].</span>")
|
||||
playsound(loc,'sound/items/eatfood.ogg', rand(10,50), 1)
|
||||
bitecount++
|
||||
else if(ismouse(M))
|
||||
var/mob/living/simple_animal/mouse/N = M
|
||||
to_chat(N, text("\blue You nibble away at [src]."))
|
||||
to_chat(N, text("<span class='notice'>You nibble away at [src].</span>"))
|
||||
if(prob(50))
|
||||
N.visible_message("[N] nibbles away at [src].", "")
|
||||
//N.emote("nibbles away at the [src]")
|
||||
@@ -752,8 +752,8 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/pie/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
new/obj/effect/decal/cleanable/pie_smudge(src.loc)
|
||||
src.visible_message("\red [src.name] splats.","\red You hear a splat.")
|
||||
new/obj/effect/decal/cleanable/pie_smudge(loc)
|
||||
visible_message("<span class='warning'>[src] splats.</span>","<span class='warning'>You hear a splat.</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/berryclafoutis
|
||||
@@ -902,7 +902,7 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/popcorn/On_Consume(mob/M, mob/user)
|
||||
if(prob(unpopped)) //lol ...what's the point?
|
||||
to_chat(user, "\red You bite down on an un-popped kernel!")
|
||||
to_chat(user, "<span class='userdanger'>You bite down on an un-popped kernel!</span>")
|
||||
unpopped = max(0, unpopped-1)
|
||||
..()
|
||||
|
||||
@@ -1728,9 +1728,9 @@
|
||||
if(istype(W,/obj/item/weapon/kitchen/rollingpin))
|
||||
user.visible_message( \
|
||||
"[user] flattens the dough with the rolling pin!", \
|
||||
"\blue You flatten the dough with your rolling pin!" \
|
||||
"<span class='notice'>You flatten the dough with your rolling pin!</span>" \
|
||||
)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough(src.loc)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough(loc)
|
||||
qdel(src)
|
||||
|
||||
/////////////////////////////////////////////////Sliceable////////////////////////////////////////
|
||||
@@ -2124,7 +2124,7 @@
|
||||
"[user] cuts the raw cutlet with the knife!", \
|
||||
"<span class ='notice'>You cut the raw cutlet with your knife!</span>" \
|
||||
)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/raw_bacon(src.loc)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/raw_bacon(loc)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -2264,8 +2264,8 @@
|
||||
/obj/item/pizzabox/attack_hand(mob/user)
|
||||
if(open && pizza)
|
||||
user.put_in_hands(pizza)
|
||||
to_chat(user, "\red You take the [src.pizza] out of the [src].")
|
||||
src.pizza = null
|
||||
to_chat(user, "<span class='warning'>You take the [pizza] out of the [src].</span>")
|
||||
pizza = null
|
||||
update_icon()
|
||||
return
|
||||
|
||||
@@ -2278,7 +2278,7 @@
|
||||
boxes -= box
|
||||
|
||||
user.put_in_hands( box )
|
||||
to_chat(user, "\red You remove the topmost [src] from your hand.")
|
||||
to_chat(user, "<span class='warning'>You remove the topmost [src] from your hand.</span>")
|
||||
box.update_icon()
|
||||
update_icon()
|
||||
return
|
||||
@@ -2311,16 +2311,16 @@
|
||||
|
||||
box.loc = src
|
||||
box.boxes = list() // Clear the box boxes so we don't have boxes inside boxes. - Xzibit
|
||||
src.boxes.Add( boxestoadd )
|
||||
boxes.Add( boxestoadd )
|
||||
|
||||
box.update_icon()
|
||||
update_icon()
|
||||
|
||||
to_chat(user, "\red You put the [box] ontop of the [src]!")
|
||||
to_chat(user, "<span class='warning'>You put the [box] ontop of the [src]!</span>")
|
||||
else
|
||||
to_chat(user, "\red The stack is too high!")
|
||||
to_chat(user, "<span class='warning'>The stack is too high!</span>")
|
||||
else
|
||||
to_chat(user, "\red Close the [box] first!")
|
||||
to_chat(user, "<span class='warning'>Close the [box] first!</span>")
|
||||
|
||||
return
|
||||
|
||||
@@ -2329,18 +2329,18 @@
|
||||
if(open)
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
src.pizza = I
|
||||
pizza = I
|
||||
|
||||
update_icon()
|
||||
|
||||
to_chat(user, "\red You put the [I] in the [src]!")
|
||||
to_chat(user, "<span class='warning'>You put the [I] in the [src]!</span>")
|
||||
else
|
||||
to_chat(user, "\red You try to push the [I] through the lid but it doesn't work!")
|
||||
to_chat(user, "<span class='warning'>You try to push the [I] through the lid but it doesn't work!</span>")
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/weapon/pen/))
|
||||
|
||||
if( src.open )
|
||||
if(open)
|
||||
return
|
||||
|
||||
var/t = input("Enter what you want to add to the tag:", "Write", null, null) as text
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
return
|
||||
|
||||
user.visible_message("<span class='danger'>[user] starts to put [victim] into the gibber!</span>")
|
||||
src.add_fingerprint(user)
|
||||
add_fingerprint(user)
|
||||
if(do_after(user, 30, target = victim) && user.Adjacent(src) && victim.Adjacent(user) && !occupant)
|
||||
user.visible_message("<span class='danger'>[user] stuffs [victim] into the gibber!</span>")
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
return
|
||||
|
||||
for(var/obj/O in src)
|
||||
O.loc = src.loc
|
||||
O.loc = loc
|
||||
|
||||
occupant.forceMove(get_turf(src))
|
||||
occupant = null
|
||||
@@ -212,11 +212,11 @@
|
||||
|
||||
/obj/machinery/gibber/proc/startgibbing(var/mob/user, var/UserOverride=0)
|
||||
if(!istype(user) && !UserOverride)
|
||||
log_debug("Some shit just went down with the gibber at X[x], Y[y], Z[z] with an invalid user. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
|
||||
log_debug("Some shit just went down with the gibber at X[x], Y[y], Z[z] with an invalid user. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
|
||||
return
|
||||
|
||||
if(UserOverride)
|
||||
msg_admin_attack("[key_name_admin(occupant)] was gibbed by an autogibber (\the [src]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
|
||||
msg_admin_attack("[key_name_admin(occupant)] was gibbed by an autogibber (\the [src]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
|
||||
|
||||
if(operating)
|
||||
return
|
||||
@@ -236,7 +236,7 @@
|
||||
var/slab_name = occupant.name
|
||||
var/slab_count = 3
|
||||
var/slab_type = /obj/item/weapon/reagent_containers/food/snacks/meat/human //gibber can only gib humans on paracode, no need to check meat type
|
||||
var/slab_nutrition = src.occupant.nutrition / 15
|
||||
var/slab_nutrition = occupant.nutrition / 15
|
||||
|
||||
slab_nutrition /= slab_count
|
||||
|
||||
@@ -367,7 +367,7 @@
|
||||
if(O.flags & NODROP)
|
||||
qdel(O) //they are already dead by now
|
||||
H.unEquip(O)
|
||||
O.loc = src.loc
|
||||
O.loc = loc
|
||||
O.throw_at(get_edge_target_turf(src,gib_throw_dir),rand(1,5),15)
|
||||
sleep(1)
|
||||
|
||||
@@ -375,7 +375,7 @@
|
||||
if(C.flags & NODROP)
|
||||
qdel(C)
|
||||
H.unEquip(C)
|
||||
C.loc = src.loc
|
||||
C.loc = loc
|
||||
C.throw_at(get_edge_target_turf(src,gib_throw_dir),rand(1,5),15)
|
||||
sleep(1)
|
||||
|
||||
@@ -385,7 +385,7 @@
|
||||
var/spats = 0 //keeps track of how many items get spit out. Don't show a message if none are found.
|
||||
for(var/obj/O in src)
|
||||
if(istype(O))
|
||||
O.loc = src.loc
|
||||
O.loc = loc
|
||||
O.throw_at(get_edge_target_turf(src,gib_throw_dir),rand(1,5),15)
|
||||
spats++
|
||||
sleep(1)
|
||||
|
||||
@@ -99,7 +99,7 @@ var/list/ingredients_source = list(
|
||||
if(ingredients[ICECREAM_VANILLA] > 0)
|
||||
var/flavour_name = get_icecream_flavour_string(dispense_flavour)
|
||||
if(dispense_flavour < 11 && ingredients[dispense_flavour] > 0)
|
||||
src.visible_message("[bicon(src)] <span class='info'>[user] scoops delicious [flavour_name] flavoured icecream into [I].</span>")
|
||||
visible_message("[bicon(src)] <span class='info'>[user] scoops delicious [flavour_name] flavoured icecream into [I].</span>")
|
||||
ingredients[dispense_flavour] -= 1
|
||||
ingredients[ICECREAM_VANILLA] -= 1
|
||||
|
||||
@@ -127,7 +127,7 @@ var/list/ingredients_source = list(
|
||||
else
|
||||
var/obj/item/weapon/reagent_containers/R = O
|
||||
if(R.reagents)
|
||||
src.visible_message("<span class='info'>[user] has emptied all of [R] into [src].</span>")
|
||||
visible_message("<span class='info'>[user] has emptied all of [R] into [src].</span>")
|
||||
for(var/datum/reagent/current_reagent in R.reagents.reagent_list)
|
||||
if(ingredients_source[current_reagent.id])
|
||||
add(ingredients_source[current_reagent.id], current_reagent.volume / 2)
|
||||
@@ -151,7 +151,7 @@ var/list/ingredients_source = list(
|
||||
ingredients[INGR_FLOUR] -= amount
|
||||
ingredients[INGR_SUGAR] -= amount
|
||||
ingredients[CONE_WAFFLE] += amount
|
||||
src.visible_message("<span class='info'>[user] cooks up some waffle cones.</span>")
|
||||
visible_message("<span class='info'>[user] cooks up some waffle cones.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You require sugar and flour to make waffle cones.</span>")
|
||||
if(CONE_CHOC)
|
||||
@@ -160,7 +160,7 @@ var/list/ingredients_source = list(
|
||||
ingredients[CONE_WAFFLE] -= amount
|
||||
ingredients[FLAVOUR_CHOCOLATE] -= amount
|
||||
ingredients[CONE_CHOC] += amount
|
||||
src.visible_message("<span class='info'>[user] cooks up some chocolate cones.</span>")
|
||||
visible_message("<span class='info'>[user] cooks up some chocolate cones.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You require waffle cones and chocolate flavouring to make chocolate cones.</span>")
|
||||
if(ICECREAM_VANILLA)
|
||||
@@ -169,7 +169,7 @@ var/list/ingredients_source = list(
|
||||
ingredients[INGR_ICE] -= amount
|
||||
ingredients[INGR_MILK] -= amount
|
||||
ingredients[ICECREAM_VANILLA] += amount
|
||||
src.visible_message("<span class='info'>[user] whips up some vanilla icecream.</span>")
|
||||
visible_message("<span class='info'>[user] whips up some vanilla icecream.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You require milk and ice to make vanilla icecream.</span>")
|
||||
updateDialog()
|
||||
@@ -179,7 +179,7 @@ var/list/ingredients_source = list(
|
||||
return
|
||||
if(href_list["dispense"])
|
||||
dispense_flavour = text2num(href_list["dispense"])
|
||||
src.visible_message("\blue[usr] sets [src] to dispense [get_icecream_flavour_string(dispense_flavour)] flavoured icecream.")
|
||||
visible_message("\blue[usr] sets [src] to dispense [get_icecream_flavour_string(dispense_flavour)] flavoured icecream.")
|
||||
|
||||
if(href_list["cone"])
|
||||
var/dispense_cone = text2num(href_list["cone"])
|
||||
@@ -187,11 +187,11 @@ var/list/ingredients_source = list(
|
||||
var/cone_name = get_icecream_flavour_string(dispense_cone)
|
||||
if(ingredients[dispense_cone] >= 1)
|
||||
ingredients[dispense_cone] -= 1
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/icecream/I = new(src.loc)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/icecream/I = new(loc)
|
||||
I.cone_type = cone_name
|
||||
I.icon_state = "icecream_cone_[cone_name]"
|
||||
I.desc = "Delicious [cone_name] cone, but no ice cream."
|
||||
src.visible_message("<span class='info'>[usr] dispenses a crunchy [cone_name] cone from [src].</span>")
|
||||
visible_message("<span class='info'>[usr] dispenses a crunchy [cone_name] cone from [src].</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>There are no [cone_name] cones left!</span>")
|
||||
updateDialog()
|
||||
@@ -202,7 +202,7 @@ var/list/ingredients_source = list(
|
||||
|
||||
if(href_list["eject"])
|
||||
if(held_container)
|
||||
held_container.forceMove(src.loc)
|
||||
held_container.forceMove(loc)
|
||||
held_container = null
|
||||
updateDialog()
|
||||
|
||||
@@ -231,7 +231,7 @@ var/list/ingredients_source = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/icecream/proc/add_ice_cream(var/flavour)
|
||||
var/flavour_name = get_icecream_flavour_string(flavour)
|
||||
name = "[flavour_name] icecream"
|
||||
src.overlays += "icecream_[flavour_name]"
|
||||
overlays += "icecream_[flavour_name]"
|
||||
desc = "Delicious [cone_type] cone with a dollop of [flavour_name] ice cream."
|
||||
ice_creamed = 1
|
||||
|
||||
|
||||
@@ -46,9 +46,9 @@
|
||||
return 0
|
||||
O.forceMove(src)
|
||||
beaker = O
|
||||
src.verbs += /obj/machinery/juicer/verb/detach
|
||||
verbs += /obj/machinery/juicer/verb/detach
|
||||
update_icon()
|
||||
src.updateUsrDialog()
|
||||
updateUsrDialog()
|
||||
return 0
|
||||
if(!is_type_in_list(O, allowed_items))
|
||||
to_chat(user, "It doesn't look like that contains any juice.")
|
||||
@@ -57,7 +57,7 @@
|
||||
to_chat(user, "<span class='notice'>\the [O] is stuck to your hand, you cannot put it in \the [src]</span>")
|
||||
return 0
|
||||
O.forceMove(src)
|
||||
src.updateUsrDialog()
|
||||
updateUsrDialog()
|
||||
return 0
|
||||
|
||||
/obj/machinery/juicer/attack_ai(mob/user as mob)
|
||||
@@ -74,7 +74,7 @@
|
||||
var/beaker_contents = ""
|
||||
|
||||
for(var/i in allowed_items)
|
||||
for(var/obj/item/O in src.contents)
|
||||
for(var/obj/item/O in contents)
|
||||
if(!istype(O,i))
|
||||
continue
|
||||
processing_chamber+= "some <B>[O]</B><BR>"
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
if("detach")
|
||||
detach()
|
||||
src.updateUsrDialog()
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/juicer/verb/detach()
|
||||
@@ -130,8 +130,8 @@
|
||||
return
|
||||
if(!beaker)
|
||||
return
|
||||
src.verbs -= /obj/machinery/juicer/verb/detach
|
||||
beaker.forceMove(src.loc)
|
||||
verbs -= /obj/machinery/juicer/verb/detach
|
||||
beaker.forceMove(loc)
|
||||
beaker = null
|
||||
update_icon()
|
||||
|
||||
@@ -159,8 +159,8 @@
|
||||
return
|
||||
if(!beaker || beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
return
|
||||
playsound(src.loc, 'sound/machines/juicer.ogg', 50, 1)
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/O in src.contents)
|
||||
playsound(loc, 'sound/machines/juicer.ogg', 50, 1)
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/O in contents)
|
||||
var/r_id = get_juice_id(O)
|
||||
beaker.reagents.add_reagent(r_id,get_juice_amount(O))
|
||||
qdel(O)
|
||||
|
||||
@@ -77,8 +77,8 @@
|
||||
|
||||
default_deconstruction_crowbar(O)
|
||||
|
||||
if(src.broken > 0)
|
||||
if(src.broken == 2 && istype(O, /obj/item/weapon/screwdriver)) // If it's broken and they're using a screwdriver
|
||||
if(broken > 0)
|
||||
if(broken == 2 && istype(O, /obj/item/weapon/screwdriver)) // If it's broken and they're using a screwdriver
|
||||
user.visible_message( \
|
||||
"<span class='notice'>[user] starts to fix part of \the [src].</span>", \
|
||||
"<span class='notice'>You start to fix part of \the [src].</span>" \
|
||||
@@ -88,8 +88,8 @@
|
||||
"<span class='notice'>[user] fixes part of \the [src].</span>", \
|
||||
"<span class='notice'>You have fixed part of \the [src].</span>" \
|
||||
)
|
||||
src.broken = 1 // Fix it a bit
|
||||
else if(src.broken == 1 && istype(O, /obj/item/weapon/wrench)) // If it's broken and they're doing the wrench
|
||||
broken = 1 // Fix it a bit
|
||||
else if(broken == 1 && istype(O, /obj/item/weapon/wrench)) // If it's broken and they're doing the wrench
|
||||
user.visible_message( \
|
||||
"<span class='notice'>[user] starts to fix part of \the [src].</span>", \
|
||||
"<span class='notice'>You start to fix part of \the [src].</span>" \
|
||||
@@ -99,14 +99,14 @@
|
||||
"<span class='notice'>[user] fixes \the [src].</span>", \
|
||||
"<span class='notice'>You have fixed \the [src].</span>" \
|
||||
)
|
||||
src.icon_state = off_icon
|
||||
src.broken = 0 // Fix it!
|
||||
src.dirty = 0 // just to be sure
|
||||
src.flags = OPENCONTAINER
|
||||
icon_state = off_icon
|
||||
broken = 0 // Fix it!
|
||||
dirty = 0 // just to be sure
|
||||
flags = OPENCONTAINER
|
||||
else
|
||||
to_chat(user, "<span class='alert'>It's broken!</span>")
|
||||
return 1
|
||||
else if(src.dirty==100) // The machine is all dirty so can't be used!
|
||||
else if(dirty==100) // The machine is all dirty so can't be used!
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/spray/cleaner) || istype(O, /obj/item/weapon/soap)) // If they're trying to clean it then let them
|
||||
user.visible_message( \
|
||||
"<span class='notice'>[user] starts to clean \the [src].</span>", \
|
||||
@@ -117,10 +117,10 @@
|
||||
"<span class='notice'>[user] has cleaned \the [src].</span>", \
|
||||
"<span class='notice'>You have cleaned \the [src].</span>" \
|
||||
)
|
||||
src.dirty = 0 // It's clean!
|
||||
src.broken = 0 // just to be sure
|
||||
src.icon_state = off_icon
|
||||
src.flags = OPENCONTAINER
|
||||
dirty = 0 // It's clean!
|
||||
broken = 0 // just to be sure
|
||||
icon_state = off_icon
|
||||
flags = OPENCONTAINER
|
||||
else //Otherwise bad luck!!
|
||||
to_chat(user, "<span class='alert'>It's dirty!</span>")
|
||||
return 1
|
||||
@@ -161,7 +161,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='alert'>You have no idea what you can cook with this [O].</span>")
|
||||
return 1
|
||||
src.updateUsrDialog()
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/kitchen_machine/attack_ai(mob/user as mob)
|
||||
return 0
|
||||
@@ -178,11 +178,11 @@
|
||||
if(panel_open || !anchored)
|
||||
return
|
||||
var/dat = ""
|
||||
if(src.broken > 0)
|
||||
if(broken > 0)
|
||||
dat = {"<TT>Bzzzzttttt</TT>"}
|
||||
else if(src.operating)
|
||||
dat = {"<TT>[pick(src.cook_verbs)] in progress!<BR>Please wait...!</TT>"}
|
||||
else if(src.dirty==100)
|
||||
else if(operating)
|
||||
dat = {"<TT>[pick(cook_verbs)] in progress!<BR>Please wait...!</TT>"}
|
||||
else if(dirty==100)
|
||||
dat = {"<TT>This [src] is dirty!<BR>Please clean it before use!</TT>"}
|
||||
else
|
||||
var/list/items_counts = new
|
||||
@@ -237,7 +237,7 @@
|
||||
var/datum/browser/popup = new(user, name, name, 400, 400)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
onclose(user, "[src.name]")
|
||||
onclose(user, "[name]")
|
||||
return
|
||||
|
||||
|
||||
@@ -298,7 +298,7 @@
|
||||
byproduct = recipe.get_byproduct()
|
||||
stop()
|
||||
if(cooked)
|
||||
cooked.forceMove(src.loc)
|
||||
cooked.forceMove(loc)
|
||||
for(var/i=1,i<efficiency,i++)
|
||||
cooked = new cooked.type(loc)
|
||||
if(byproduct)
|
||||
@@ -323,54 +323,54 @@
|
||||
return 0
|
||||
|
||||
/obj/machinery/kitchen_machine/proc/start()
|
||||
src.visible_message("<span class='notice'>\The [src] turns on.</span>", "<span class='notice'>You hear \a [src].</span>")
|
||||
src.operating = 1
|
||||
src.icon_state = on_icon
|
||||
src.updateUsrDialog()
|
||||
visible_message("<span class='notice'>\The [src] turns on.</span>", "<span class='notice'>You hear \a [src].</span>")
|
||||
operating = 1
|
||||
icon_state = on_icon
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/kitchen_machine/proc/abort()
|
||||
src.operating = 0 // Turn it off again aferwards
|
||||
src.icon_state = off_icon
|
||||
src.updateUsrDialog()
|
||||
operating = 0 // Turn it off again aferwards
|
||||
icon_state = off_icon
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/kitchen_machine/proc/stop()
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
src.operating = 0 // Turn it off again aferwards
|
||||
src.icon_state = off_icon
|
||||
src.updateUsrDialog()
|
||||
playsound(loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
operating = 0 // Turn it off again aferwards
|
||||
icon_state = off_icon
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/kitchen_machine/proc/dispose()
|
||||
for(var/obj/O in contents)
|
||||
O.forceMove(src.loc)
|
||||
if(src.reagents.total_volume)
|
||||
src.dirty++
|
||||
src.reagents.clear_reagents()
|
||||
O.forceMove(loc)
|
||||
if(reagents.total_volume)
|
||||
dirty++
|
||||
reagents.clear_reagents()
|
||||
to_chat(usr, "<span class='notice'>You dispose of \the [src]'s contents.</span>")
|
||||
src.updateUsrDialog()
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/kitchen_machine/proc/muck_start()
|
||||
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) // Play a splat sound
|
||||
src.icon_state = dirty_icon // Make it look dirty!!
|
||||
playsound(loc, 'sound/effects/splat.ogg', 50, 1) // Play a splat sound
|
||||
icon_state = dirty_icon // Make it look dirty!!
|
||||
|
||||
/obj/machinery/kitchen_machine/proc/muck_finish()
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
src.visible_message("<span class='alert'>\The [src] gets covered in muck!</span>")
|
||||
src.dirty = 100 // Make it dirty so it can't be used util cleaned
|
||||
src.flags = null //So you can't add condiments
|
||||
src.icon_state = dirty_icon // Make it look dirty too
|
||||
src.operating = 0 // Turn it off again aferwards
|
||||
src.updateUsrDialog()
|
||||
playsound(loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
visible_message("<span class='alert'>\The [src] gets covered in muck!</span>")
|
||||
dirty = 100 // Make it dirty so it can't be used util cleaned
|
||||
flags = null //So you can't add condiments
|
||||
icon_state = dirty_icon // Make it look dirty too
|
||||
operating = 0 // Turn it off again aferwards
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/kitchen_machine/proc/broke()
|
||||
var/datum/effect/system/spark_spread/s = new
|
||||
s.set_up(2, 1, src)
|
||||
s.start()
|
||||
src.icon_state = broken_icon // Make it look all busted up and shit
|
||||
src.visible_message("<span class='alert'>The [src] breaks!</span>") //Let them know they're stupid
|
||||
src.broken = 2 // Make it broken so it can't be used util fixed
|
||||
src.flags = null //So you can't add condiments
|
||||
src.operating = 0 // Turn it off again aferwards
|
||||
src.updateUsrDialog()
|
||||
icon_state = broken_icon // Make it look all busted up and shit
|
||||
visible_message("<span class='alert'>The [src] breaks!</span>") //Let them know they're stupid
|
||||
broken = 2 // Make it broken so it can't be used util fixed
|
||||
flags = null //So you can't add condiments
|
||||
operating = 0 // Turn it off again aferwards
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/kitchen_machine/proc/fail()
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/badrecipe/ffuu = new(src)
|
||||
@@ -382,7 +382,7 @@
|
||||
if(id)
|
||||
amount+=O.reagents.get_reagent_amount(id)
|
||||
qdel(O)
|
||||
src.reagents.clear_reagents()
|
||||
reagents.clear_reagents()
|
||||
ffuu.reagents.add_reagent("carbon", amount)
|
||||
ffuu.reagents.add_reagent("????", amount/10)
|
||||
ffuu.forceMove(get_turf(src))
|
||||
@@ -392,8 +392,8 @@
|
||||
return
|
||||
|
||||
usr.set_machine(src)
|
||||
if(src.operating)
|
||||
src.updateUsrDialog()
|
||||
if(operating)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
switch(href_list["action"])
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
cycle_through = 0
|
||||
to_chat(user, "<span class='notice'>You change the monkeycube type to [initial(cube_type.name)].</span>")
|
||||
|
||||
if(src.stat != 0) //NOPOWER etc
|
||||
if(stat != 0) //NOPOWER etc
|
||||
return
|
||||
if(istype(O, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = O
|
||||
@@ -76,11 +76,11 @@
|
||||
user.drop_item()
|
||||
qdel(target)
|
||||
to_chat(user, "<span class='notice'>You stuff the monkey in the machine.</span>")
|
||||
playsound(src.loc, 'sound/machines/juicer.ogg', 50, 1)
|
||||
playsound(loc, 'sound/machines/juicer.ogg', 50, 1)
|
||||
var/offset = prob(50) ? -2 : 2
|
||||
animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 200) //start shaking
|
||||
use_power(500)
|
||||
src.grinded++
|
||||
grinded++
|
||||
sleep(50)
|
||||
pixel_x = initial(pixel_x)
|
||||
to_chat(user, "<span class='notice'>The machine now has [grinded] monkey\s worth of material stored.</span>")
|
||||
@@ -91,14 +91,14 @@
|
||||
return
|
||||
|
||||
/obj/machinery/monkey_recycler/attack_hand(var/mob/user as mob)
|
||||
if(src.stat != 0) //NOPOWER etc
|
||||
if(stat != 0) //NOPOWER etc
|
||||
return
|
||||
if(grinded >= required_grind)
|
||||
to_chat(user, "<span class='notice'>The machine hisses loudly as it condenses the grinded monkey meat. After a moment, it dispenses a brand new monkey cube.</span>")
|
||||
playsound(src.loc, 'sound/machines/hiss.ogg', 50, 1)
|
||||
playsound(loc, 'sound/machines/hiss.ogg', 50, 1)
|
||||
grinded -= required_grind
|
||||
for(var/i = 0, i < cube_production, i++) // Forgot to fix this bit the first time through
|
||||
new cube_type(src.loc)
|
||||
new cube_type(loc)
|
||||
to_chat(user, "<span class='notice'>The machine's display flashes that it has [grinded] monkey\s worth of material left.</span>")
|
||||
else // I'm not sure if the \s macro works with a word in between; I'll play it safe
|
||||
to_chat(user, "<span class='warning'>The machine needs at least [required_grind] monkey\s worth of material to compress [cube_production] monkey\s. It only has [grinded].</span>")
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
food_choices.Remove(U)
|
||||
for(var/U in subtypesof(/obj/item/weapon/reagent_containers/food/snacks/customizable/cook))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/customizable/cook/V = new U
|
||||
src.food_choices += V
|
||||
food_choices += V
|
||||
return
|
||||
|
||||
/obj/machinery/cooking/candy
|
||||
@@ -75,5 +75,5 @@
|
||||
food_choices.Remove(U)
|
||||
for(var/U in subtypesof(/obj/item/weapon/reagent_containers/food/snacks/customizable/candy))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/customizable/candy/V = new U
|
||||
src.food_choices += V
|
||||
food_choices += V
|
||||
return
|
||||
|
||||
@@ -58,9 +58,9 @@
|
||||
var/time = 40
|
||||
|
||||
/datum/food_processor_process/proc/process_food(loc, what, obj/machinery/processor/processor)
|
||||
if(src.output && loc && processor)
|
||||
if(output && loc && processor)
|
||||
for(var/i = 0, i < processor.rating_amount, i++)
|
||||
new src.output(loc)
|
||||
new output(loc)
|
||||
if(what)
|
||||
qdel(what)
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
|
||||
/obj/machinery/processor/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
|
||||
if(src.processing)
|
||||
if(processing)
|
||||
to_chat(user, "<span class='warning'>\the [src] is already processing something!</span>")
|
||||
return 1
|
||||
|
||||
@@ -195,21 +195,21 @@
|
||||
if(stat & (NOPOWER|BROKEN)) //no power or broken
|
||||
return
|
||||
|
||||
if(src.processing)
|
||||
if(processing)
|
||||
to_chat(user, "<span class='warning'>\the [src] is already processing something!</span>")
|
||||
return 1
|
||||
|
||||
if(src.contents.len == 0)
|
||||
if(contents.len == 0)
|
||||
to_chat(user, "<span class='warning'>\the [src] is empty.</span>")
|
||||
return 1
|
||||
src.processing = 1
|
||||
processing = 1
|
||||
user.visible_message("[user] turns on [src].", \
|
||||
"<span class='notice'>You turn on [src].</span>", \
|
||||
"<span class='italics'>You hear a food processor.</span>")
|
||||
playsound(src.loc, 'sound/machines/blender.ogg', 50, 1)
|
||||
playsound(loc, 'sound/machines/blender.ogg', 50, 1)
|
||||
use_power(500)
|
||||
var/total_time = 0
|
||||
for(var/O in src.contents)
|
||||
for(var/O in contents)
|
||||
var/datum/food_processor_process/P = select_recipe(O)
|
||||
if(!P)
|
||||
log_debug("The [O] in processor([src]) does not have a suitable recipe, but it was somehow put inside of the processor anyways.")
|
||||
@@ -217,14 +217,14 @@
|
||||
total_time += P.time
|
||||
sleep(total_time / rating_speed)
|
||||
|
||||
for(var/O in src.contents)
|
||||
for(var/O in contents)
|
||||
var/datum/food_processor_process/P = select_recipe(O)
|
||||
if(!P)
|
||||
log_debug("The [O] in processor([src]) does not have a suitable recipe, but it was somehow put inside of the processor anyways.")
|
||||
continue
|
||||
P.process_food(src.loc, O, src)
|
||||
src.processing = 0
|
||||
P.process_food(loc, O, src)
|
||||
processing = 0
|
||||
|
||||
src.visible_message("<span class='notice'>\the [src] has finished processing.</span>", \
|
||||
visible_message("<span class='notice'>\the [src] has finished processing.</span>", \
|
||||
"<span class='notice'>\the [src] has finished processing.</span>", \
|
||||
"<span class='notice'>You hear a food processor stopping.</span>")
|
||||
|
||||
@@ -170,10 +170,10 @@
|
||||
/obj/machinery/smartfridge/process()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
if(src.seconds_electrified > 0)
|
||||
src.seconds_electrified--
|
||||
if(src.shoot_inventory && prob(2))
|
||||
src.throw_item()
|
||||
if(seconds_electrified > 0)
|
||||
seconds_electrified--
|
||||
if(shoot_inventory && prob(2))
|
||||
throw_item()
|
||||
|
||||
/obj/machinery/smartfridge/power_change()
|
||||
var/old_stat = stat
|
||||
@@ -194,7 +194,7 @@
|
||||
|
||||
/obj/machinery/smartfridge/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(istype(O, /obj/item/weapon/screwdriver) && anchored)
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
panel_open = !panel_open
|
||||
to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.")
|
||||
overlays.Cut()
|
||||
@@ -275,7 +275,7 @@
|
||||
return 0
|
||||
|
||||
/obj/machinery/smartfridge/attack_ghost(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/smartfridge/attack_hand(mob/user as mob)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
@@ -336,7 +336,7 @@
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "smartfridge.tmpl", src.name, 400, 500)
|
||||
ui = new(user, src, ui_key, "smartfridge.tmpl", name, 400, 500)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
@@ -346,7 +346,7 @@
|
||||
var/mob/user = usr
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
||||
|
||||
src.add_fingerprint(user)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(href_list["close"])
|
||||
user.unset_machine()
|
||||
@@ -387,7 +387,7 @@
|
||||
item_quants[O]--
|
||||
for(var/obj/T in contents)
|
||||
if(T.name == O)
|
||||
T.forceMove(src.loc)
|
||||
T.forceMove(loc)
|
||||
throw_item = T
|
||||
break
|
||||
break
|
||||
@@ -395,7 +395,7 @@
|
||||
return 0
|
||||
spawn(0)
|
||||
throw_item.throw_at(target,16,3,src)
|
||||
src.visible_message("<span class='warning'>[src] launches [throw_item.name] at [target.name]!</span>")
|
||||
visible_message("<span class='warning'>[src] launches [throw_item.name] at [target.name]!</span>")
|
||||
return 1
|
||||
|
||||
/************************
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/candy/nougat
|
||||
|
||||
/datum/recipe/candy/nougat/make_food(obj/container)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/candy/nougat/being_cooked = ..(container)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/candy/nougat/being_cooked = ..()
|
||||
being_cooked.reagents.del_reagent("egg")
|
||||
return being_cooked
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/fishfingers
|
||||
|
||||
/datum/recipe/grill/fishfingers/make_food(obj/container)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/fishfingers/being_cooked = ..(container)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/fishfingers/being_cooked = ..()
|
||||
being_cooked.reagents.del_reagent("egg")
|
||||
return being_cooked
|
||||
|
||||
|
||||
@@ -205,10 +205,11 @@
|
||||
reagents = list("water" = 5, "vodka" = 5)
|
||||
fruit = list("amanita" = 3)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/amanitajelly
|
||||
make_food(var/obj/container as obj)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/amanitajelly/being_cooked = ..(container)
|
||||
being_cooked.reagents.del_reagent("amanitin")
|
||||
return being_cooked
|
||||
|
||||
/datum/recipe/microwave/amanitajelly/make_food(obj/container)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/amanitajelly/being_cooked = ..()
|
||||
being_cooked.reagents.del_reagent("amanitin")
|
||||
return being_cooked
|
||||
|
||||
/datum/recipe/microwave/meatballsoup
|
||||
reagents = list("water" = 10)
|
||||
@@ -538,10 +539,11 @@ datum/recipe/microwave/slimesandwich
|
||||
/datum/recipe/microwave/herbsalad
|
||||
fruit = list("ambrosia" = 3, "apple" = 1)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/herbsalad
|
||||
make_food(var/obj/container as obj)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/herbsalad/being_cooked = ..(container)
|
||||
being_cooked.reagents.del_reagent("toxin")
|
||||
return being_cooked
|
||||
|
||||
/datum/recipe/microwave/herbsalad/make_food(obj/container)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/herbsalad/being_cooked = ..()
|
||||
being_cooked.reagents.del_reagent("toxin")
|
||||
return being_cooked
|
||||
|
||||
/datum/recipe/microwave/aesirsalad
|
||||
fruit = list("ambrosiadeus" = 3, "goldapple" = 1)
|
||||
@@ -553,10 +555,11 @@ datum/recipe/microwave/slimesandwich
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meatball,
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/validsalad
|
||||
make_food(var/obj/container as obj)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/validsalad/being_cooked = ..(container)
|
||||
being_cooked.reagents.del_reagent("toxin")
|
||||
return being_cooked
|
||||
|
||||
/datum/recipe/microwave/validsalad/make_food(obj/container)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/validsalad/being_cooked = ..()
|
||||
being_cooked.reagents.del_reagent("toxin")
|
||||
return being_cooked
|
||||
|
||||
////////////////////////////FOOD ADDITTIONS///////////////////////////////
|
||||
|
||||
|
||||
@@ -176,20 +176,22 @@
|
||||
/obj/item/weapon/paper,
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/fortunecookie
|
||||
make_food(var/obj/container as obj)
|
||||
|
||||
/datum/recipe/oven/fortunecookie/make_food(obj/container)
|
||||
var/obj/item/weapon/paper/paper = locate() in container
|
||||
paper.loc = null //prevent deletion
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/fortunecookie/being_cooked = ..()
|
||||
paper.loc = being_cooked
|
||||
being_cooked.trash = paper //so the paper is left behind as trash without special-snowflake(TM Nodrak) code ~carn
|
||||
return being_cooked
|
||||
|
||||
/datum/recipe/oven/fortunecookie/check_items(obj/container)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/obj/item/weapon/paper/paper = locate() in container
|
||||
paper.loc = null //prevent deletion
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/fortunecookie/being_cooked = ..(container)
|
||||
paper.loc = being_cooked
|
||||
being_cooked.trash = paper //so the paper is left behind as trash without special-snowflake(TM Nodrak) code ~carn
|
||||
return being_cooked
|
||||
check_items(var/obj/container as obj)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/obj/item/weapon/paper/paper = locate() in container
|
||||
if(!paper || !paper.info)
|
||||
return -1
|
||||
return .
|
||||
if(!paper || !paper.info)
|
||||
return -1
|
||||
return .
|
||||
|
||||
/datum/recipe/oven/pizzamargherita
|
||||
fruit = list("tomato" = 1)
|
||||
@@ -294,7 +296,7 @@
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/sliceable/bread
|
||||
|
||||
/datum/recipe/oven/bread/make_food(obj/container)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/sliceable/bread/being_cooked = ..(container)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/sliceable/bread/being_cooked = ..()
|
||||
being_cooked.reagents.del_reagent("egg")
|
||||
return being_cooked
|
||||
|
||||
@@ -383,7 +385,7 @@
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/appletart
|
||||
|
||||
/datum/recipe/oven/appletart/make_food(obj/container)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/appletart/being_cooked = ..(container)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/appletart/being_cooked = ..()
|
||||
being_cooked.reagents.del_reagent("egg")
|
||||
return being_cooked
|
||||
|
||||
@@ -403,7 +405,7 @@
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/sugarcookie
|
||||
|
||||
/datum/recipe/oven/sugarcookie/make_food(obj/container)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/sugarcookie/being_cooked = ..(container)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/sugarcookie/being_cooked = ..()
|
||||
being_cooked.reagents.del_reagent("egg")
|
||||
return being_cooked
|
||||
|
||||
|
||||
Reference in New Issue
Block a user