mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
Merge pull request #2211 from Crazylemon64/stickier_beakers
Stickier cyborg beakers
This commit is contained in:
@@ -217,10 +217,13 @@
|
||||
return
|
||||
|
||||
beaker = item
|
||||
user.drop_item()
|
||||
item.loc = src
|
||||
user.visible_message("[user] adds \a [item] to \the [src]!", "You add \a [item] to \the [src]!")
|
||||
return
|
||||
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
|
||||
else if (!istype(item, /obj/item/weapon/grab))
|
||||
return
|
||||
var/obj/item/weapon/grab/G = item
|
||||
|
||||
@@ -299,12 +299,14 @@
|
||||
/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)
|
||||
beaker = G
|
||||
user.drop_item()
|
||||
G.loc = src
|
||||
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
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()
|
||||
return
|
||||
else
|
||||
user << "\The [G] is stuck to you!"
|
||||
else
|
||||
user << "\red The sleeper has a beaker already."
|
||||
return
|
||||
@@ -611,4 +613,4 @@
|
||||
qdel(O)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
return
|
||||
return
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
if(istype(P, /obj/item))
|
||||
var/success
|
||||
for(var/I in req_components)
|
||||
if(istype(P, I) && (req_components[I] > 0))
|
||||
if(istype(P, I) && (req_components[I] > 0) && !(P.flags & NODROP))
|
||||
success=1
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
|
||||
@@ -279,9 +279,11 @@
|
||||
return
|
||||
|
||||
beaker = G
|
||||
user.drop_item()
|
||||
G.loc = src
|
||||
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
|
||||
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
|
||||
user << "The [G] is stuck to you!"
|
||||
|
||||
if (istype(G, /obj/item/weapon/screwdriver))
|
||||
if(occupant || on)
|
||||
|
||||
@@ -63,12 +63,14 @@
|
||||
user << "There is already a reagent container loaded!"
|
||||
return
|
||||
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
src.beaker = W
|
||||
user << "You attach \the [W] to \the [src]."
|
||||
src.update_icon()
|
||||
return
|
||||
if(user.drop_item())
|
||||
W.forceMove(src)
|
||||
src.beaker = W
|
||||
user << "You attach \the [W] to \the [src]."
|
||||
src.update_icon()
|
||||
return
|
||||
else
|
||||
user << "\The [W] is stuck to you!"
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -167,4 +169,4 @@
|
||||
else
|
||||
user << "\blue No chemicals are attached."
|
||||
|
||||
user << "\blue [attached ? attached : "No one"] is attached."
|
||||
user << "\blue [attached ? attached : "No one"] is attached."
|
||||
|
||||
@@ -218,15 +218,17 @@
|
||||
|
||||
if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B, /obj/item/weapon/reagent_containers/food/drinks))
|
||||
src.beaker = B
|
||||
user.drop_item()
|
||||
B.loc = 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
|
||||
return
|
||||
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
|
||||
return
|
||||
else
|
||||
user << "\The [B] is stuck to you!"
|
||||
|
||||
/obj/machinery/chem_dispenser/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob, params)
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user