Refactoring APTFT altclick/verb options into flags

This commit is contained in:
Ghommie
2020-01-26 18:53:16 +01:00
parent 45ad9bc77d
commit 41ee00b7df
6 changed files with 25 additions and 43 deletions
@@ -110,7 +110,7 @@
item_state = "beaker"
materials = list(MAT_GLASS=500)
possible_transfer_amounts = list(5,10,15,20,25,30,50,60)
beaker_weakness_bitflag = PH_WEAK
container_flags = PH_WEAK|APTFT_ALTCLICK|APTFT_VERB
/obj/item/reagent_containers/glass/beaker/Initialize()
. = ..()
@@ -203,11 +203,7 @@
volume = 180
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,20,25,30,40,50,60,120,180)
/obj/item/reagent_containers/glass/beaker/plastic/Initialize()
beaker_weakness_bitflag &= ~PH_WEAK
beaker_weakness_bitflag |= TEMP_WEAK
. = ..()
container_flags = TEMP_WEAK|APTFT_ALTCLICK|APTFT_VERB
/obj/item/reagent_containers/glass/beaker/plastic/update_icon()
icon_state = "beakerlarge" // hack to lets us reuse the large beaker reagent fill states
@@ -222,10 +218,7 @@
volume = 240
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,20,25,30,40,50,60,120,200,240)
/obj/item/reagent_containers/glass/beaker/meta/Initialize() // why the fuck can't you just set the beaker weakness bitflags to nothing? fuck you
beaker_weakness_bitflag &= ~PH_WEAK
. = ..()
container_flags = APTFT_ALTCLICK|APTFT_VERB
/obj/item/reagent_containers/glass/beaker/noreact
name = "cryostasis beaker"
@@ -236,13 +229,9 @@
reagent_flags = OPENCONTAINER | NO_REACT
volume = 50
amount_per_transfer_from_this = 10
container_flags = APTFT_ALTCLICK|APTFT_VERB
container_HP = 10//shouldn't be needed
/obj/item/reagent_containers/glass/beaker/noreact/Initialize()
beaker_weakness_bitflag &= ~PH_WEAK
. = ..()
//reagents.set_reacting(FALSE) was this removed in a recent pr?
/obj/item/reagent_containers/glass/beaker/bluespace
name = "bluespace beaker"
desc = "A bluespace beaker, powered by experimental bluespace technology \
@@ -310,12 +299,9 @@
SLOT_L_STORE, SLOT_R_STORE,\
SLOT_GENERC_DEXTROUS_STORAGE
)
container_flags = APTFT_ALTCLICK|APTFT_VERB
container_HP = 1
/obj/item/reagent_containers/glass/bucket/Initialize()
beaker_weakness_bitflag |= TEMP_WEAK
. = ..()
/obj/item/reagent_containers/glass/bucket/attackby(obj/O, mob/user, params)
if(istype(O, /obj/item/mop))
if(reagents.total_volume < 1)
@@ -365,12 +351,9 @@
volume = 50
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,20,25,30,50)
container_flags = TEMP_WEAK|APTFT_ALTCLICK|APTFT_VERB
container_HP = 1
/obj/item/reagent_containers/glass/beaker/waterbottle/Initialize()
beaker_weakness_bitflag |= TEMP_WEAK
. = ..()
/obj/item/reagent_containers/glass/beaker/waterbottle/empty
list_reagents = list()
@@ -7,7 +7,7 @@
spillable = FALSE
volume = 10
possible_transfer_amounts = list(1,2,5,10)
APTFT_altclick = FALSE
container_flags = APTFT_VERB
obj_flags = UNIQUE_RENAME
unique_reskin = list("hypovial" = "hypovial",
"red hypovial" = "hypovial-b",
@@ -25,9 +25,6 @@
if(!icon_state)
icon_state = "hypovial"
update_icon()
// beaker_weakness_bitflag |= PH_WEAK // fuck you if you're using these like beakers
// beaker_weakness_bitflag |= TEMP_WEAK
/obj/item/reagent_containers/glass/bottle/vial/on_reagent_change()
update_icon()
@@ -8,7 +8,7 @@
reagent_flags = REFILLABLE | DRAINABLE
amount_per_transfer_from_this = 5
possible_transfer_amounts = list()
APTFT_altclick = FALSE
container_flags = APTFT_VERB
volume = 5
spillable = FALSE
var/wipe_sound
@@ -23,6 +23,7 @@
amount_per_transfer_from_this = 5
volume = 250
possible_transfer_amounts = list(5,10,15,20,25,30,50,100)
container_flags = NONE //APTFT is alternated between the initial value and stream_amount and shouldn't be exploited.
/obj/item/reagent_containers/spray/afterattack(atom/A, mob/user)
. = ..()