[READY]Refactors reagent container types
This commit is contained in:
committed by
CitadelStationBot
parent
d5708c981a
commit
522b8383d8
@@ -5,7 +5,7 @@
|
||||
icon_state = "cart"
|
||||
anchored = FALSE
|
||||
density = TRUE
|
||||
container_type = OPENCONTAINER_1
|
||||
container_type = OPENCONTAINER
|
||||
//copypaste sorry
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
var/obj/item/storage/bag/trash/mybag = null
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "mopbucket"
|
||||
density = TRUE
|
||||
<<<<<<< HEAD
|
||||
container_type = OPENCONTAINER_1
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
|
||||
@@ -21,4 +22,23 @@
|
||||
to_chat(user, "<span class='notice'>You wet [I] in [src].</span>")
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
else
|
||||
=======
|
||||
container_type = OPENCONTAINER
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
|
||||
|
||||
/obj/structure/mopbucket/New()
|
||||
create_reagents(100)
|
||||
..()
|
||||
|
||||
/obj/structure/mopbucket/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/mop))
|
||||
if(reagents.total_volume < 1)
|
||||
to_chat(user, "[src] is out of water!</span>")
|
||||
else
|
||||
reagents.trans_to(I, 5)
|
||||
to_chat(user, "<span class='notice'>You wet [I] in [src].</span>")
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
else
|
||||
>>>>>>> 40699a8... [READY]Refactors reagent container types (#33470)
|
||||
return ..()
|
||||
@@ -483,9 +483,9 @@
|
||||
|
||||
if(istype(O, /obj/item/reagent_containers))
|
||||
var/obj/item/reagent_containers/RG = O
|
||||
if(RG.container_type & OPENCONTAINER_1)
|
||||
if(RG.is_refillable())
|
||||
if(!RG.reagents.holder_full())
|
||||
RG.reagents.add_reagent("[dispensedreagent]", min(RG.volume - RG.reagents.total_volume, RG.amount_per_transfer_from_this))
|
||||
RG.reagents.add_reagent(dispensedreagent, min(RG.volume - RG.reagents.total_volume, RG.amount_per_transfer_from_this))
|
||||
to_chat(user, "<span class='notice'>You fill [RG] from [src].</span>")
|
||||
return TRUE
|
||||
to_chat(user, "<span class='notice'>\The [RG] is full.</span>")
|
||||
@@ -533,7 +533,7 @@
|
||||
O.clean_blood()
|
||||
O.acid_level = 0
|
||||
create_reagents(5)
|
||||
reagents.add_reagent("[dispensedreagent]", 5)
|
||||
reagents.add_reagent(dispensedreagent, 5)
|
||||
reagents.reaction(O, TOUCH)
|
||||
user.visible_message("<span class='notice'>[user] washes [O] using [src].</span>", \
|
||||
"<span class='notice'>You wash [O] using [src].</span>")
|
||||
|
||||
Reference in New Issue
Block a user