mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Cyborgs can now open task dispenser UI (#13844)
* Jank * Should be better * Update code/game/objects/structures/tank_dispenser.dm Co-authored-by: Byemoh <baiomurang@gmail.com> * Update code/game/objects/structures/tank_dispenser.dm Co-authored-by: Byemoh <baiomurang@gmail.com> Co-authored-by: Byemoh <baiomurang@gmail.com>
This commit is contained in:
@@ -38,6 +38,10 @@
|
|||||||
if(5 to TANK_DISPENSER_CAPACITY)
|
if(5 to TANK_DISPENSER_CAPACITY)
|
||||||
add_overlay("plasma-5")
|
add_overlay("plasma-5")
|
||||||
|
|
||||||
|
/obj/structure/tank_dispenser/attack_ai(mob/user)
|
||||||
|
. = ..()
|
||||||
|
return ui_interact(user)
|
||||||
|
|
||||||
/obj/structure/tank_dispenser/attackby(obj/item/I, mob/user, params)
|
/obj/structure/tank_dispenser/attackby(obj/item/I, mob/user, params)
|
||||||
var/full
|
var/full
|
||||||
if(istype(I, /obj/item/tank/internals/plasma))
|
if(istype(I, /obj/item/tank/internals/plasma))
|
||||||
@@ -90,13 +94,19 @@
|
|||||||
if("plasma")
|
if("plasma")
|
||||||
var/obj/item/tank/internals/plasma/tank = locate() in src
|
var/obj/item/tank/internals/plasma/tank = locate() in src
|
||||||
if(tank && Adjacent(usr))
|
if(tank && Adjacent(usr))
|
||||||
usr.put_in_hands(tank)
|
if(iscyborg(usr))
|
||||||
|
usr.transferItemToLoc(tank, src.loc)
|
||||||
|
else
|
||||||
|
usr.put_in_hands(tank)
|
||||||
plasmatanks--
|
plasmatanks--
|
||||||
. = TRUE
|
. = TRUE
|
||||||
if("oxygen")
|
if("oxygen")
|
||||||
var/obj/item/tank/internals/oxygen/tank = locate() in src
|
var/obj/item/tank/internals/oxygen/tank = locate() in src
|
||||||
if(tank && Adjacent(usr))
|
if(tank && Adjacent(usr))
|
||||||
usr.put_in_hands(tank)
|
if(iscyborg(usr))
|
||||||
|
usr.transferItemToLoc(tank,src.loc)
|
||||||
|
else
|
||||||
|
usr.put_in_hands(tank)
|
||||||
oxygentanks--
|
oxygentanks--
|
||||||
. = TRUE
|
. = TRUE
|
||||||
update_icon()
|
update_icon()
|
||||||
@@ -110,4 +120,4 @@
|
|||||||
new /obj/item/stack/sheet/metal (loc, 2)
|
new /obj/item/stack/sheet/metal (loc, 2)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
#undef TANK_DISPENSER_CAPACITY
|
#undef TANK_DISPENSER_CAPACITY
|
||||||
|
|||||||
Reference in New Issue
Block a user