TG container_type refactor

This commit is contained in:
variableundefined
2018-10-13 08:20:52 +08:00
parent e963edf15b
commit 65c246c1c9
41 changed files with 205 additions and 201 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
icon_state = "cart"
anchored = 0
density = 1
flags = OPENCONTAINER
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
+1 -1
View File
@@ -4,7 +4,7 @@
icon = 'icons/obj/janitor.dmi'
icon_state = "mopbucket"
density = 1
flags = OPENCONTAINER
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()
+2 -2
View File
@@ -115,8 +115,8 @@
if(!open)
return
var/obj/item/reagent_containers/RG = I
if(RG.is_open_container())
if(RG.reagents.total_volume >= RG.volume)
if(RG.is_refillable())
if(RG.reagents.holder_full())
to_chat(user, "<span class='warning'>[RG] is full.</span>")
else
RG.reagents.add_reagent("toiletwater", min(RG.volume - RG.reagents.total_volume, RG.amount_per_transfer_from_this))