mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
Merge pull request #2273 from Crazylemon64/stickier_beakers_II
Stickier beakers ii
This commit is contained in:
@@ -120,10 +120,10 @@
|
||||
!istype(O,/obj/item/weapon/stock_parts) && \
|
||||
!istype(O,/obj/item/stack/cable_coil) && \
|
||||
O != beaker)
|
||||
O.loc = get_turf(src)//Ejects items that manage to get in there (exluding the components and beaker)
|
||||
O.forceMove(get_turf(src))//Ejects items that manage to get in there (exluding the components and beaker)
|
||||
if(!occupant)
|
||||
for(var/mob/M in src)//Failsafe so you can get mobs out
|
||||
M.loc = get_turf(src)
|
||||
M.forceMove(get_turf(src))
|
||||
|
||||
/obj/machinery/dna_scannernew/verb/move_inside()
|
||||
set src in oview(1)
|
||||
@@ -146,7 +146,7 @@
|
||||
usr.stop_pulling()
|
||||
usr.client.perspective = EYE_PERSPECTIVE
|
||||
usr.client.eye = src
|
||||
usr.loc = src
|
||||
usr.forceMove(src)
|
||||
src.occupant = usr
|
||||
src.icon_state = "scanner_occupied"
|
||||
src.add_fingerprint(usr)
|
||||
@@ -208,7 +208,7 @@
|
||||
if(istype(item, /obj/item/weapon/crowbar))
|
||||
if(panel_open)
|
||||
for(var/obj/I in contents) // in case there is something in the scanner
|
||||
I.loc = src.loc
|
||||
I.forceMove(src.loc)
|
||||
default_deconstruction_crowbar(item)
|
||||
return
|
||||
else if(istype(item, /obj/item/weapon/reagent_containers/glass))
|
||||
@@ -216,14 +216,14 @@
|
||||
user << "\red A beaker is already loaded into the machine."
|
||||
return
|
||||
|
||||
if(!user.drop_item())
|
||||
user << "<span class='warning'>\The [item] is stuck to you!</span>"
|
||||
return
|
||||
|
||||
beaker = item
|
||||
if(user.drop_item())
|
||||
item.forceMove(src)
|
||||
user.visible_message("[user] adds \a [item] to \the [src]!", "You add \a [item] to \the [src]!")
|
||||
return
|
||||
else
|
||||
user << "\The [item] is stuck to you!"
|
||||
return
|
||||
item.forceMove(src)
|
||||
user.visible_message("[user] adds \a [item] to \the [src]!", "You add \a [item] to \the [src]!")
|
||||
return
|
||||
else if (!istype(item, /obj/item/weapon/grab))
|
||||
return
|
||||
var/obj/item/weapon/grab/G = item
|
||||
@@ -247,7 +247,7 @@
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
M.forceMove(src)
|
||||
src.occupant = M
|
||||
src.icon_state = "scanner_occupied"
|
||||
|
||||
@@ -275,7 +275,7 @@
|
||||
if (src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
src.occupant.forceMove(src.loc)
|
||||
src.occupant = null
|
||||
src.icon_state = "scanner_open"
|
||||
return
|
||||
@@ -284,7 +284,7 @@
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
ex_act(severity)
|
||||
//Foreach goto(35)
|
||||
//SN src = null
|
||||
@@ -293,7 +293,7 @@
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
ex_act(severity)
|
||||
//Foreach goto(108)
|
||||
//SN src = null
|
||||
@@ -302,7 +302,7 @@
|
||||
if(3.0)
|
||||
if (prob(25))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
ex_act(severity)
|
||||
//Foreach goto(181)
|
||||
//SN src = null
|
||||
@@ -314,7 +314,7 @@
|
||||
/obj/machinery/dna_scannernew/blob_act()
|
||||
if(prob(75))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
qdel(src)
|
||||
|
||||
// Checks if occupants can be irradiated/mutated - prevents exploits where wearing full rad protection would still let you gain mutations
|
||||
@@ -365,7 +365,7 @@
|
||||
if (istype(I, /obj/item/weapon/disk/data)) //INSERT SOME diskS
|
||||
if (!src.disk)
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
I.forceMove(src)
|
||||
src.disk = I
|
||||
user << "You insert [I]."
|
||||
nanomanager.update_uis(src) // update all UIs attached to src()
|
||||
@@ -796,7 +796,7 @@
|
||||
if(href_list["ejectBeaker"])
|
||||
if(connected.beaker)
|
||||
var/obj/item/weapon/reagent_containers/glass/B = connected.beaker
|
||||
B.loc = connected.loc
|
||||
B.forceMove(connected.loc)
|
||||
connected.beaker = null
|
||||
return 1
|
||||
|
||||
@@ -821,7 +821,7 @@
|
||||
if (bufferOption == "ejectDisk")
|
||||
if (!src.disk)
|
||||
return
|
||||
src.disk.loc = get_turf(src)
|
||||
src.disk.forceMove(get_turf(src))
|
||||
src.disk = null
|
||||
return 1
|
||||
|
||||
@@ -930,7 +930,7 @@
|
||||
I.buf = buf
|
||||
waiting_for_user_input=0
|
||||
if(success)
|
||||
I.loc = src.loc
|
||||
I.forceMove(src.loc)
|
||||
I.name += " ([buf.name])"
|
||||
src.injector_ready = 0
|
||||
spawn(300)
|
||||
@@ -959,4 +959,4 @@
|
||||
return 1
|
||||
|
||||
|
||||
/////////////////////////// DNA MACHINES
|
||||
/////////////////////////// DNA MACHINES
|
||||
@@ -290,7 +290,7 @@
|
||||
/obj/machinery/sleeper/blob_act()
|
||||
if(prob(75))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
A.blob_act()
|
||||
qdel(src)
|
||||
return
|
||||
@@ -299,14 +299,16 @@
|
||||
/obj/machinery/sleeper/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob, params)
|
||||
if(istype(G, /obj/item/weapon/reagent_containers/glass))
|
||||
if(!beaker)
|
||||
if (user.drop_item())
|
||||
beaker = G
|
||||
G.forceMove(src)
|
||||
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
|
||||
src.updateUsrDialog()
|
||||
if (!user.drop_item())
|
||||
user << "<span class='warning'>\The [G] is stuck to you!</span>"
|
||||
return
|
||||
else
|
||||
user << "\The [G] is stuck to you!"
|
||||
|
||||
beaker = G
|
||||
G.forceMove(src)
|
||||
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
else
|
||||
user << "\red The sleeper has a beaker already."
|
||||
return
|
||||
@@ -363,7 +365,7 @@
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
M.forceMove(src)
|
||||
src.occupant = M
|
||||
src.icon_state = "sleeper"
|
||||
M << "\blue <b>You feel cool air surround you. You go numb as your senses turn inward.</b>"
|
||||
@@ -380,21 +382,21 @@
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if(prob(50))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if(prob(25))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
@@ -439,7 +441,7 @@
|
||||
if(src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
src.occupant.forceMove(src.loc)
|
||||
src.occupant = null
|
||||
icon_state = "sleeper-open"
|
||||
return
|
||||
@@ -510,7 +512,7 @@
|
||||
return
|
||||
if(beaker)
|
||||
filtering = 0
|
||||
beaker.loc = usr.loc
|
||||
beaker.forceMove(usr.loc)
|
||||
beaker = null
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
@@ -566,7 +568,7 @@
|
||||
if(L.client)
|
||||
L.client.perspective = EYE_PERSPECTIVE
|
||||
L.client.eye = src
|
||||
L.loc = src
|
||||
L.forceMove(src)
|
||||
src.occupant = L
|
||||
src.icon_state = "sleeper"
|
||||
L << "\blue <b>You feel cool air surround you. You go numb as your senses turn inward.</b>"
|
||||
@@ -605,7 +607,7 @@
|
||||
usr.stop_pulling()
|
||||
usr.client.perspective = EYE_PERSPECTIVE
|
||||
usr.client.eye = src
|
||||
usr.loc = src
|
||||
usr.forceMove(src)
|
||||
src.occupant = usr
|
||||
src.icon_state = "sleeper"
|
||||
|
||||
@@ -613,4 +615,4 @@
|
||||
qdel(O)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
return
|
||||
return
|
||||
@@ -70,8 +70,10 @@
|
||||
user << "<span class='warning'>A container is already loaded into the machine.</span>"
|
||||
return
|
||||
else
|
||||
user.unEquip(O)
|
||||
O.loc = src
|
||||
if(!user.drop_item())
|
||||
user << "<span class='warning'>\The [O] is stuck to you!</span>"
|
||||
return
|
||||
O.forceMove(src)
|
||||
beaker = O
|
||||
user << "<span class='notice'>You add the container to the machine.</span>"
|
||||
updateUsrDialog()
|
||||
@@ -82,7 +84,7 @@
|
||||
if(default_deconstruction_screwdriver(user, "biogen-empty-o", "biogen-empty", O))
|
||||
if(beaker)
|
||||
var/obj/item/weapon/reagent_containers/glass/B = beaker
|
||||
B.loc = loc
|
||||
B.forceMove(loc)
|
||||
beaker = null
|
||||
return
|
||||
|
||||
@@ -104,7 +106,7 @@
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
|
||||
if(i >= max_items)
|
||||
break
|
||||
G.loc = src
|
||||
G.forceMove(src)
|
||||
i++
|
||||
if(i < max_items)
|
||||
user << "<span class='info'>You empty the plant bag into the biogenerator.</span>"
|
||||
@@ -123,7 +125,7 @@
|
||||
user << "<span class='warning'>The biogenerator is full! Activate it.</span>"
|
||||
else
|
||||
user.unEquip(O)
|
||||
O.loc = src
|
||||
O.forceMove(src)
|
||||
user << "<span class='info'>You put [O.name] in [src.name]</span>"
|
||||
|
||||
|
||||
@@ -339,7 +341,7 @@
|
||||
|
||||
/obj/machinery/biogenerator/proc/detach()
|
||||
if(beaker)
|
||||
beaker.loc = src.loc
|
||||
beaker.forceMove(src.loc)
|
||||
beaker = null
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
use_beaker = !use_beaker
|
||||
|
||||
else if (href_list["eject"] && (!isnull(reagent_glass)))
|
||||
reagent_glass.loc = get_turf(src)
|
||||
reagent_glass.forceMove(get_turf(src))
|
||||
reagent_glass = null
|
||||
|
||||
else if (href_list["togglevoice"])
|
||||
@@ -240,8 +240,10 @@
|
||||
user << "<span class='notice'>There is already a beaker loaded.</span>"
|
||||
return
|
||||
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
if(!user.drop_item())
|
||||
user << "<span class='warning'>\The [W] is stuck to your hand!</span>"
|
||||
return
|
||||
W.forceMove(src)
|
||||
reagent_glass = W
|
||||
user << "<span class='notice'>You insert [W].</span>"
|
||||
updateUsrDialog()
|
||||
@@ -512,7 +514,7 @@
|
||||
new /obj/item/device/healthanalyzer(Tsec)
|
||||
|
||||
if(reagent_glass)
|
||||
reagent_glass.loc = Tsec
|
||||
reagent_glass.forceMove(Tsec)
|
||||
reagent_glass = null
|
||||
|
||||
if (prob(50))
|
||||
@@ -577,8 +579,7 @@
|
||||
else
|
||||
switch(build_step)
|
||||
if(0)
|
||||
if(istype(W, /obj/item/device/healthanalyzer))
|
||||
user.drop_item()
|
||||
if(istype(W, /obj/item/device/healthanalyzer) && user.drop_item())
|
||||
qdel(W)
|
||||
build_step++
|
||||
user << "<span class='notice'>You add the health sensor to [src].</span>"
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
T.contents += contents
|
||||
var/obj/item/weapon/reagent_containers/glass/B = beaker
|
||||
if(beaker)
|
||||
B.loc = get_step(T, SOUTH) //Beaker is carefully ejected from the wreckage of the cryotube
|
||||
B.forceMove(get_step(T, SOUTH)) //Beaker is carefully ejected from the wreckage of the cryotube
|
||||
beaker = null
|
||||
return ..()
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
|
||||
if(href_list["ejectBeaker"])
|
||||
if(beaker)
|
||||
beaker.loc = get_step(loc, SOUTH)
|
||||
beaker.forceMove(get_step(loc, SOUTH))
|
||||
beaker = null
|
||||
|
||||
if(href_list["ejectOccupant"])
|
||||
@@ -279,11 +279,11 @@
|
||||
return
|
||||
|
||||
beaker = G
|
||||
if(user.drop_item())
|
||||
G.forceMove(src)
|
||||
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
|
||||
else
|
||||
if(!user.drop_item())
|
||||
user << "The [G] is stuck to you!"
|
||||
return
|
||||
G.forceMove(src)
|
||||
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
|
||||
|
||||
if (istype(G, /obj/item/weapon/screwdriver))
|
||||
if(occupant || on)
|
||||
@@ -412,15 +412,12 @@
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/proc/go_out()
|
||||
if(!( occupant ))
|
||||
return
|
||||
//for(var/obj/O in src)
|
||||
// O.loc = loc
|
||||
if (occupant.client)
|
||||
occupant.client.eye = occupant.client.mob
|
||||
occupant.client.perspective = MOB_PERSPECTIVE
|
||||
occupant.loc = get_step(loc, SOUTH) //this doesn't account for walls or anything, but i don't forsee that being a problem.
|
||||
occupant.forceMove(get_step(loc, SOUTH)) //this doesn't account for walls or anything, but i don't forsee that being a problem.
|
||||
if (occupant.bodytemperature < 261 && occupant.bodytemperature >= 70) //Patch by Aranclanos to stop people from taking burn damage after being ejected
|
||||
occupant.bodytemperature = 261
|
||||
// occupant.metabslow = 0
|
||||
occupant = null
|
||||
update_icon()
|
||||
return
|
||||
@@ -441,7 +438,7 @@
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.stop_pulling()
|
||||
M.loc = src
|
||||
M.forceMove(src)
|
||||
if(M.health > -100 && (M.health < 0 || M.sleeping))
|
||||
M << "\blue <b>You feel a cold liquid surround you. Your skin starts to freeze up.</b>"
|
||||
occupant = M
|
||||
@@ -494,4 +491,4 @@
|
||||
return
|
||||
|
||||
/datum/data/function/proc/display()
|
||||
return
|
||||
return
|
||||
@@ -116,9 +116,11 @@ var/list/ingredients_source = list(
|
||||
if(held_container)
|
||||
user << "<span class='notice'>You must remove [held_container] from [src] first.</span>"
|
||||
else
|
||||
if(!user.drop_item())
|
||||
user << "<span class='warning'>\The [O] is stuck to your hand!</span>"
|
||||
return
|
||||
O.forceMove(src)
|
||||
user << "<span class='info'>You insert [O] into [src].</span>"
|
||||
user.drop_item()
|
||||
O.loc = src
|
||||
held_container = O
|
||||
else
|
||||
var/obj/item/weapon/reagent_containers/R = O
|
||||
@@ -198,7 +200,7 @@ var/list/ingredients_source = list(
|
||||
|
||||
if(href_list["eject"])
|
||||
if(held_container)
|
||||
held_container.loc = src.loc
|
||||
held_container.forceMove(src.loc)
|
||||
held_container = null
|
||||
updateDialog()
|
||||
|
||||
@@ -241,4 +243,4 @@ var/list/ingredients_source = list(
|
||||
#undef INGR_FLOUR
|
||||
#undef INGR_SUGAR
|
||||
#undef INGR_ICE
|
||||
#undef MUCK
|
||||
#undef MUCK
|
||||
@@ -44,7 +44,7 @@
|
||||
if(!user.unEquip(O))
|
||||
user << "<span class='notice'>\the [O] is stuck to your hand, you cannot put it in \the [src]</span>"
|
||||
return 0
|
||||
O.loc = src
|
||||
O.forceMove(src)
|
||||
beaker = O
|
||||
src.verbs += /obj/machinery/juicer/verb/detach
|
||||
update_icon()
|
||||
@@ -56,7 +56,7 @@
|
||||
if(!user.unEquip(O))
|
||||
user << "<span class='notice'>\the [O] is stuck to your hand, you cannot put it in \the [src]</span>"
|
||||
return 0
|
||||
O.loc = src
|
||||
O.forceMove(src)
|
||||
src.updateUsrDialog()
|
||||
return 0
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
if (!beaker)
|
||||
return
|
||||
src.verbs -= /obj/machinery/juicer/verb/detach
|
||||
beaker.loc = src.loc
|
||||
beaker.forceMove(src.loc)
|
||||
beaker = null
|
||||
update_icon()
|
||||
|
||||
@@ -180,5 +180,4 @@
|
||||
new/obj/item/weapon/reagent_containers/food/snacks/grown/tomato(src)
|
||||
new/obj/item/weapon/reagent_containers/food/snacks/grown/carrot(src)
|
||||
new/obj/item/weapon/reagent_containers/food/snacks/grown/berries(src)
|
||||
new/obj/item/weapon/reagent_containers/food/snacks/grown/banana(src)
|
||||
|
||||
new/obj/item/weapon/reagent_containers/food/snacks/grown/banana(src)
|
||||
@@ -135,11 +135,11 @@
|
||||
"<span class='notice'>[user] has added one of [O] to \the [src].</span>", \
|
||||
"<span class='notice'>You add one of [O] to \the [src].</span>")
|
||||
else
|
||||
// user.unEquip(O) //This just causes problems so far as I can tell. -Pete
|
||||
if(!user.drop_item())
|
||||
user << "<span class='notice'>\The [O] is stuck to your hand, you cannot put it in \the [src]</span>"
|
||||
return 0
|
||||
O.loc = src
|
||||
|
||||
O.forceMove(src)
|
||||
user.visible_message( \
|
||||
"<span class='notice'>[user] has added \the [O] to \the [src].</span>", \
|
||||
"<span class='notice'>You add \the [O] to \the [src].</span>")
|
||||
@@ -296,7 +296,7 @@
|
||||
byproduct = recipe.get_byproduct()
|
||||
stop()
|
||||
if(cooked)
|
||||
cooked.loc = src.loc
|
||||
cooked.forceMove(src.loc)
|
||||
for(var/i=1,i<efficiency,i++)
|
||||
cooked = new cooked.type(loc)
|
||||
if(byproduct)
|
||||
@@ -339,7 +339,7 @@
|
||||
|
||||
/obj/machinery/kitchen_machine/proc/dispose()
|
||||
for (var/obj/O in contents)
|
||||
O.loc = src.loc
|
||||
O.forceMove(src.loc)
|
||||
if (src.reagents.total_volume)
|
||||
src.dirty++
|
||||
src.reagents.clear_reagents()
|
||||
@@ -383,7 +383,7 @@
|
||||
src.reagents.clear_reagents()
|
||||
ffuu.reagents.add_reagent("carbon", amount)
|
||||
ffuu.reagents.add_reagent("????", amount/10)
|
||||
ffuu.loc = get_turf(src)
|
||||
ffuu.forceMove(get_turf(src))
|
||||
|
||||
/obj/machinery/kitchen_machine/Topic(href, href_list)
|
||||
if(..() || panel_open)
|
||||
|
||||
@@ -200,8 +200,11 @@
|
||||
user << "<span class='notice'>\The [src] is full.</span>"
|
||||
return 1
|
||||
else
|
||||
user.remove_from_mob(O)
|
||||
O.loc = src
|
||||
if(!user.drop_item())
|
||||
user << "<span class='warning'>\The [O] is stuck to you!</span>"
|
||||
return
|
||||
|
||||
O.forceMove(src)
|
||||
if(item_quants[O.name])
|
||||
item_quants[O.name]++
|
||||
else
|
||||
@@ -338,7 +341,7 @@
|
||||
var/i = amount
|
||||
for(var/obj/O in contents)
|
||||
if(O.name == K)
|
||||
O.loc = loc
|
||||
O.forceMove(loc)
|
||||
i--
|
||||
if(i <= 0)
|
||||
return 1
|
||||
@@ -359,7 +362,7 @@
|
||||
item_quants[O]--
|
||||
for(var/obj/T in contents)
|
||||
if(T.name == O)
|
||||
T.loc = src.loc
|
||||
T.forceMove(src.loc)
|
||||
throw_item = T
|
||||
break
|
||||
break
|
||||
|
||||
@@ -34,9 +34,11 @@
|
||||
if(beaker)
|
||||
user << "<span class='notice'>A container is already inside [src].</span>"
|
||||
return
|
||||
if(!user.drop_item())
|
||||
user << "<span class='warning'>\The [I] is stuck to you!</span>"
|
||||
return
|
||||
beaker = I
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
I.forceMove(src)
|
||||
user << "<span class='notice'>You add [I] to [src]</span>"
|
||||
updateUsrDialog()
|
||||
return
|
||||
@@ -105,7 +107,7 @@
|
||||
|
||||
else if(href_list["eject"])
|
||||
if(beaker)
|
||||
A.loc = loc
|
||||
A.forceMove(loc)
|
||||
beaker = null
|
||||
reagents.trans_to(A,reagents.total_volume)
|
||||
|
||||
@@ -248,4 +250,4 @@
|
||||
dat += show_toppings()
|
||||
var/datum/browser/popup = new(user, "cream_master","Cream-Master Deluxe", 700, 400, src)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
popup.open()
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
if(href_list["ejectBeaker"])
|
||||
if(beaker)
|
||||
var/obj/item/weapon/reagent_containers/glass/B = beaker
|
||||
B.loc = loc
|
||||
B.forceMove(loc)
|
||||
beaker = null
|
||||
overlays.Cut()
|
||||
add_fingerprint(usr)
|
||||
@@ -202,33 +202,35 @@
|
||||
return
|
||||
|
||||
if(broken_requirements.len && B.type == broken_requirements[1])
|
||||
broken_requirements -= broken_requirements[1]
|
||||
user << "<span class='notice'>You fix [src].</span>"
|
||||
if(istype(B,/obj/item/stack))
|
||||
var/obj/item/stack/S = B
|
||||
S.use(1)
|
||||
else
|
||||
user.drop_item()
|
||||
if(!user.drop_item())
|
||||
user << "<span class='warning'>\The [B] is stuck to you!</span>"
|
||||
return
|
||||
qdel(B)
|
||||
broken_requirements -= broken_requirements[1]
|
||||
user << "<span class='notice'>You fix [src].</span>"
|
||||
return
|
||||
|
||||
if(src.beaker)
|
||||
user << "Something is already loaded into the machine."
|
||||
user << "<span class='warning'>Something is already loaded into the machine.</span>"
|
||||
return
|
||||
|
||||
if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B, /obj/item/weapon/reagent_containers/food/drinks))
|
||||
src.beaker = B
|
||||
if(user.drop_item())
|
||||
B.forceMove(src)
|
||||
user << "You set [B] on the machine."
|
||||
nanomanager.update_uis(src) // update all UIs attached to src
|
||||
if(!icon_beaker)
|
||||
icon_beaker = image('icons/obj/chemical.dmi', src, "disp_beaker") //randomize beaker overlay position.
|
||||
icon_beaker.pixel_x = rand(-10,5)
|
||||
overlays += icon_beaker
|
||||
if(!user.drop_item())
|
||||
user << "<span class='warning'>\The [B] is stuck to you!</span>"
|
||||
return
|
||||
else
|
||||
user << "\The [B] is stuck to you!"
|
||||
B.forceMove(src)
|
||||
user << "<span class='notice'>You set [B] on the machine.</span>"
|
||||
nanomanager.update_uis(src) // update all UIs attached to src
|
||||
if(!icon_beaker)
|
||||
icon_beaker = image('icons/obj/chemical.dmi', src, "disp_beaker") //randomize beaker overlay position.
|
||||
icon_beaker.pixel_x = rand(-10,5)
|
||||
overlays += icon_beaker
|
||||
return
|
||||
|
||||
/obj/machinery/chem_dispenser/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob, params)
|
||||
..()
|
||||
@@ -358,16 +360,16 @@
|
||||
playsound(src, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(anchored)
|
||||
anchored = 0
|
||||
user << "<span class='caution'>The [src] can now be moved.</span>"
|
||||
user << "<span class='caution'>\The [src] can now be moved.</span>"
|
||||
else if(!anchored)
|
||||
anchored = 1
|
||||
user << "<span class='caution'>The [src] is now secured.</span>"
|
||||
user << "<span class='caution'>\The [src] is now secured.</span>"
|
||||
|
||||
if(panel_open)
|
||||
if(istype(I, /obj/item/weapon/crowbar))
|
||||
if(beaker)
|
||||
var/obj/item/weapon/reagent_containers/glass/B = beaker
|
||||
B.loc = loc
|
||||
B.forceMove(loc)
|
||||
beaker = null
|
||||
default_deconstruction_crowbar(I)
|
||||
return 1
|
||||
@@ -427,25 +429,29 @@
|
||||
if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B, /obj/item/weapon/reagent_containers/food/drinks/drinkingglass))
|
||||
|
||||
if(src.beaker)
|
||||
user << "A beaker is already loaded into the machine."
|
||||
user << "<span class='warning'>A beaker is already loaded into the machine.</span>"
|
||||
return
|
||||
if(!user.drop_item())
|
||||
user << "<span class='warning'>\The [B] is stuck to you!</span>"
|
||||
return
|
||||
src.beaker = B
|
||||
user.drop_item()
|
||||
B.loc = src
|
||||
user << "You add the beaker to the machine!"
|
||||
B.forceMove(src)
|
||||
user << "<span class='notice'>You add the beaker to the machine!</span>"
|
||||
src.updateUsrDialog()
|
||||
icon_state = "mixer1"
|
||||
|
||||
else if(istype(B, /obj/item/weapon/storage/pill_bottle))
|
||||
|
||||
if(src.loaded_pill_bottle)
|
||||
user << "A pill bottle is already loaded into the machine."
|
||||
user << "<span class='warning'>A pill bottle is already loaded into the machine.</span>"
|
||||
return
|
||||
|
||||
if(!user.drop_item())
|
||||
user << "<span class='warning'>\The [B] is stuck to you!</span>"
|
||||
return
|
||||
src.loaded_pill_bottle = B
|
||||
user.drop_item()
|
||||
B.loc = src
|
||||
user << "You add the pill bottle into the dispenser slot!"
|
||||
B.forceMove(src)
|
||||
user << "<span class='notice'>You add the pill bottle into the dispenser slot!</span>"
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
@@ -459,7 +465,7 @@
|
||||
|
||||
if (href_list["ejectp"])
|
||||
if(loaded_pill_bottle)
|
||||
loaded_pill_bottle.loc = src.loc
|
||||
loaded_pill_bottle.forceMove(src.loc)
|
||||
loaded_pill_bottle = null
|
||||
else if(href_list["close"])
|
||||
usr << browse(null, "window=chem_master")
|
||||
@@ -579,7 +585,7 @@
|
||||
reagents.trans_to(P,amount_per_pill)
|
||||
if(src.loaded_pill_bottle)
|
||||
if(loaded_pill_bottle.contents.len < loaded_pill_bottle.storage_slots)
|
||||
P.loc = loaded_pill_bottle
|
||||
P.forceMove(loaded_pill_bottle)
|
||||
src.updateUsrDialog()
|
||||
else
|
||||
var/name = reject_bad_text(input(usr,"Name:","Name your bag!",reagents.get_master_reagent_name()))
|
||||
@@ -816,15 +822,17 @@
|
||||
if (beaker)
|
||||
return 1
|
||||
else
|
||||
if(!user.drop_item())
|
||||
user << "<span class='warning'>\The [O] is stuck to you!</span>"
|
||||
return
|
||||
src.beaker = O
|
||||
user.drop_item()
|
||||
O.loc = src
|
||||
O.forceMove(src)
|
||||
update_icon()
|
||||
src.updateUsrDialog()
|
||||
return 0
|
||||
|
||||
if(holdingitems && holdingitems.len >= limit)
|
||||
usr << "The machine cannot hold anymore items."
|
||||
usr << "<span class='warning'>The machine cannot hold anymore items.</span>"
|
||||
return 1
|
||||
|
||||
//Fill machine with the plantbag!
|
||||
@@ -832,25 +840,25 @@
|
||||
|
||||
for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
|
||||
O.contents -= G
|
||||
G.loc = src
|
||||
G.forceMove(src)
|
||||
holdingitems += G
|
||||
if(holdingitems && holdingitems.len >= limit) //Sanity checking so the blender doesn't overfill
|
||||
user << "You fill the All-In-One grinder to the brim."
|
||||
user << "<span class='notice>You fill the All-In-One grinder to the brim.</span>"
|
||||
break
|
||||
|
||||
if(!O.contents.len)
|
||||
user << "You empty the plant bag into the All-In-One grinder."
|
||||
user << "<span class='notice'>You empty the plant bag into the All-In-One grinder.</span>"
|
||||
|
||||
src.updateUsrDialog()
|
||||
return 0
|
||||
|
||||
|
||||
if (!is_type_in_list(O, blend_items) && !is_type_in_list(O, juice_items))
|
||||
user << "Cannot refine into a reagent."
|
||||
user << "<span class='warning'>Cannot refine into a reagent.</span>"
|
||||
return 1
|
||||
|
||||
user.unEquip(O)
|
||||
O.loc = src
|
||||
O.forceMove(src)
|
||||
holdingitems += O
|
||||
src.updateUsrDialog()
|
||||
return 0
|
||||
@@ -929,7 +937,7 @@
|
||||
return
|
||||
if (!beaker)
|
||||
return
|
||||
beaker.loc = src.loc
|
||||
beaker.forceMove(src.loc)
|
||||
beaker = null
|
||||
update_icon()
|
||||
|
||||
@@ -941,7 +949,7 @@
|
||||
return
|
||||
|
||||
for(var/obj/item/O in holdingitems)
|
||||
O.loc = src.loc
|
||||
O.forceMove(src.loc)
|
||||
holdingitems -= O
|
||||
holdingitems = list()
|
||||
|
||||
@@ -1146,4 +1154,4 @@
|
||||
var/amount = O.reagents.total_volume
|
||||
O.reagents.trans_to(beaker, amount)
|
||||
if(!O.reagents.total_volume)
|
||||
remove_object(O)
|
||||
remove_object(O)
|
||||
@@ -60,11 +60,11 @@
|
||||
/obj/item/weapon/gun/dartgun/examine(mob/user)
|
||||
if(..(user, 2))
|
||||
if(beakers.len)
|
||||
user << "\blue [src] contains:"
|
||||
user << "<span class='notice>[src] contains:</span>"
|
||||
for(var/obj/item/weapon/reagent_containers/glass/beaker/B in beakers)
|
||||
if(B.reagents && B.reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in B.reagents.reagent_list)
|
||||
user << "\blue [R.volume] units of [R.name]"
|
||||
user << "<span class='notice>[R.volume] units of [R.name]</span>"
|
||||
|
||||
/obj/item/weapon/gun/dartgun/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/weapon/dart_cartridge))
|
||||
@@ -72,34 +72,36 @@
|
||||
var/obj/item/weapon/dart_cartridge/D = I
|
||||
|
||||
if(!D.darts)
|
||||
user << "\blue [D] is empty."
|
||||
user << "<span class='warning'>[D] is empty.</span>"
|
||||
return 0
|
||||
|
||||
if(cartridge)
|
||||
if(cartridge.darts <= 0)
|
||||
src.remove_cartridge()
|
||||
else
|
||||
user << "\blue There's already a cartridge in [src]."
|
||||
user << "<span class='warning'>There's already a cartridge in [src].</span>"
|
||||
return 0
|
||||
|
||||
user.drop_item()
|
||||
cartridge = D
|
||||
D.loc = src
|
||||
user << "\blue You slot [D] into [src]."
|
||||
D.forceMove(src)
|
||||
user << "<span class='notice'>You slot [D] into [src].</span>"
|
||||
update_icon()
|
||||
return
|
||||
if(istype(I, /obj/item/weapon/reagent_containers/glass))
|
||||
if(!istype(I, container_type))
|
||||
user << "\blue [I] doesn't seem to fit into [src]."
|
||||
user << "<span class='warning'>[I] doesn't seem to fit into [src].</span>"
|
||||
return
|
||||
if(beakers.len >= max_beakers)
|
||||
user << "\blue [src] already has [max_beakers] beakers in it - another one isn't going to fit!"
|
||||
user << "<span class='warning'>[src] already has [max_beakers] beakers in it - another one isn't going to fit!</span>"
|
||||
return
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B = I
|
||||
user.drop_item()
|
||||
B.loc = src
|
||||
if(!user.drop_item())
|
||||
user << "<span class='warning'>\The [B] is stuck to you!</span>"
|
||||
return
|
||||
B.forceMove(src)
|
||||
beakers += B
|
||||
user << "\blue You slot [B] into [src]."
|
||||
user << "<span class='notice>You slot [B] into [src].</span>"
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/item/weapon/gun/dartgun/can_fire()
|
||||
@@ -113,9 +115,9 @@
|
||||
|
||||
/obj/item/weapon/gun/dartgun/proc/remove_cartridge()
|
||||
if(cartridge)
|
||||
usr << "\blue You pop the cartridge out of [src]."
|
||||
usr << "<span class='notice'>You pop the cartridge out of [src].</span>"
|
||||
var/obj/item/weapon/dart_cartridge/C = cartridge
|
||||
C.loc = get_turf(src)
|
||||
C.forceMove(get_turf(src))
|
||||
C.update_icon()
|
||||
cartridge = null
|
||||
src.update_icon()
|
||||
@@ -143,10 +145,10 @@
|
||||
var/obj/effect/syringe_gun_dummy/D = new/obj/effect/syringe_gun_dummy(get_turf(src))
|
||||
var/obj/item/weapon/reagent_containers/syringe/S = get_mixed_syringe()
|
||||
if(!S)
|
||||
user << "\red There are no darts in [src]!"
|
||||
user << "<span class='warning'>There are no darts in [src]!</span>"
|
||||
return
|
||||
if(!S.reagents)
|
||||
user << "\red There are no reagents available!"
|
||||
user << "<span class='warning'>There are no reagents available!</span>"
|
||||
return
|
||||
cartridge.darts--
|
||||
src.update_icon()
|
||||
@@ -269,10 +271,10 @@
|
||||
if(index <= beakers.len)
|
||||
if(beakers[index])
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B = beakers[index]
|
||||
usr << "You remove [B] from [src]."
|
||||
usr << "<span class='notice'>You remove [B] from [src].</span>"
|
||||
mixing -= B
|
||||
beakers -= B
|
||||
B.loc = get_turf(src)
|
||||
B.forceMove(get_turf(src))
|
||||
else if (href_list["eject_cart"])
|
||||
remove_cartridge()
|
||||
src.updateUsrDialog()
|
||||
@@ -282,7 +284,7 @@
|
||||
if(cartridge)
|
||||
spawn(0) fire_dart(target,user)
|
||||
else
|
||||
usr << "\red [src] is empty."
|
||||
usr << "<span class='warning'>[src] is empty.</span>"
|
||||
|
||||
|
||||
/obj/item/weapon/gun/dartgun/vox
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
/obj/machinery/chem_heater/proc/eject_beaker()
|
||||
if(beaker)
|
||||
beaker.loc = get_turf(src)
|
||||
beaker.forceMove(get_turf(src))
|
||||
beaker.reagents.handle_reactions()
|
||||
beaker = null
|
||||
icon_state = "mixer0b"
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
if(user.drop_item())
|
||||
beaker = I
|
||||
I.loc = src
|
||||
I.forceMove(src)
|
||||
user << "<span class='notice'>You add the beaker to the machine!</span>"
|
||||
icon_state = "mixer1b"
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
@@ -18,9 +18,12 @@
|
||||
user << "\The [src] is already loaded."
|
||||
return
|
||||
|
||||
if(!user.drop_item())
|
||||
user << "<span class='warning'>\The [O] is stuck to you!</span>"
|
||||
return
|
||||
|
||||
sample = O
|
||||
user.drop_item()
|
||||
O.loc = src
|
||||
O.forceMove(src)
|
||||
|
||||
user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!")
|
||||
nanomanager.update_uis(src)
|
||||
@@ -140,7 +143,7 @@
|
||||
|
||||
if("sample")
|
||||
if(sample)
|
||||
sample.loc = src.loc
|
||||
sample.forceMove(src.loc)
|
||||
sample = null
|
||||
return 1
|
||||
|
||||
@@ -210,4 +213,4 @@
|
||||
<u>Additional Notes:</u> <field>
|
||||
"}
|
||||
|
||||
state("The nearby computer prints out a pathology report.")
|
||||
state("The nearby computer prints out a pathology report.")
|
||||
@@ -11,14 +11,13 @@
|
||||
/obj/machinery/computer/curer/attackby(var/obj/I as obj, var/mob/user as mob, params)
|
||||
if(istype(I,/obj/item/weapon/reagent_containers))
|
||||
var/mob/living/carbon/C = user
|
||||
if(!container)
|
||||
if(!container && C.drop_item())
|
||||
container = I
|
||||
C.drop_item()
|
||||
I.loc = src
|
||||
I.forceMove(src)
|
||||
return
|
||||
if(istype(I,/obj/item/weapon/virusdish))
|
||||
if(virusing)
|
||||
user << "<b>The pathogen materializer is still recharging.."
|
||||
user << "<b>The pathogen materializer is still recharging..</b>"
|
||||
return
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/product = new(src.loc)
|
||||
|
||||
@@ -88,7 +87,7 @@
|
||||
if (href_list["antibody"])
|
||||
curing = 10
|
||||
else if(href_list["eject"])
|
||||
container.loc = src.loc
|
||||
container.forceMove(src.loc)
|
||||
container = null
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
@@ -105,4 +104,4 @@
|
||||
data["antibodies"] = B.data["antibodies"]
|
||||
product.reagents.add_reagent("antibodies",30,data)
|
||||
|
||||
state("\The [src.name] buzzes", "blue")
|
||||
state("\The [src.name] buzzes", "blue")
|
||||
@@ -18,12 +18,15 @@
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/glass) || istype(O,/obj/item/weapon/reagent_containers/syringe))
|
||||
|
||||
if(beaker)
|
||||
user << "\The [src] is already loaded."
|
||||
user << "<span class='warning'>\The [src] is already loaded.</span>"
|
||||
return
|
||||
|
||||
if(!user.drop_item())
|
||||
user << "<span class='warning'>\The [O] is stuck to you!</span>"
|
||||
return
|
||||
|
||||
beaker = O
|
||||
user.drop_item()
|
||||
O.loc = src
|
||||
O.forceMove(src)
|
||||
|
||||
user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!")
|
||||
nanomanager.update_uis(src)
|
||||
@@ -37,9 +40,11 @@
|
||||
user << "The dish tray is aleady full!"
|
||||
return
|
||||
|
||||
if(!user.drop_item())
|
||||
user << "<span class='warning'>\The [O] is stuck to you!</span>"
|
||||
return
|
||||
dish = O
|
||||
user.drop_item()
|
||||
O.loc = src
|
||||
O.forceMove(src)
|
||||
|
||||
user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!")
|
||||
nanomanager.update_uis(src)
|
||||
@@ -152,7 +157,7 @@
|
||||
|
||||
if (href_list["ejectchem"])
|
||||
if(beaker)
|
||||
beaker.loc = src.loc
|
||||
beaker.forceMove(src.loc)
|
||||
beaker = null
|
||||
return 1
|
||||
|
||||
@@ -164,7 +169,7 @@
|
||||
|
||||
if (href_list["ejectdish"])
|
||||
if(dish)
|
||||
dish.loc = src.loc
|
||||
dish.forceMove(src.loc)
|
||||
dish = null
|
||||
return 1
|
||||
|
||||
@@ -200,4 +205,4 @@
|
||||
ping("\The [src] pings, \"Injection complete.\"")
|
||||
return 1
|
||||
|
||||
return 0
|
||||
return 0
|
||||
Reference in New Issue
Block a user