mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
51 lines
2.0 KiB
Plaintext
51 lines
2.0 KiB
Plaintext
/obj/item/weapon/reagent_containers
|
|
name = "Container"
|
|
desc = "..."
|
|
icon = 'icons/obj/chemical.dmi'
|
|
icon_state = null
|
|
w_class = 2
|
|
var/amount_per_transfer_from_this = 5
|
|
var/possible_transfer_amounts = list(5,10,15,25,30)
|
|
var/volume = 30
|
|
|
|
/obj/item/weapon/reagent_containers/verb/set_APTFT() //set amount_per_transfer_from_this
|
|
set name = "Set transfer amount"
|
|
set category = "Object"
|
|
set src in range(0)
|
|
var/N = input("Amount per transfer from this:","[src]") as null|anything in possible_transfer_amounts
|
|
if (N)
|
|
amount_per_transfer_from_this = N
|
|
|
|
/obj/item/weapon/reagent_containers/New()
|
|
..()
|
|
if (!possible_transfer_amounts)
|
|
src.verbs -= /obj/item/weapon/reagent_containers/verb/set_APTFT
|
|
var/datum/reagents/R = new/datum/reagents(volume)
|
|
reagents = R
|
|
R.my_atom = src
|
|
|
|
/obj/item/weapon/reagent_containers/attack_self(mob/user as mob)
|
|
return
|
|
|
|
/obj/item/weapon/reagent_containers/attack(mob/M as mob, mob/user as mob, def_zone)
|
|
if (can_operate(M)) //Checks if mob is lying down on table for surgery
|
|
if (do_surgery(M,user,src))
|
|
return
|
|
|
|
// this prevented pills, food, and other things from being picked up by bags.
|
|
// possibly intentional, but removing it allows us to not duplicate functionality.
|
|
// -Sayu (storage conslidation)
|
|
/*
|
|
/obj/item/weapon/reagent_containers/attackby(obj/item/I as obj, mob/user as mob)
|
|
return
|
|
*/
|
|
/obj/item/weapon/reagent_containers/afterattack(obj/target, mob/user , flag)
|
|
return
|
|
|
|
/obj/item/weapon/reagent_containers/proc/reagentlist(var/obj/item/weapon/reagent_containers/snack) //Attack logs for regents in pills
|
|
var/data
|
|
if(snack.reagents.reagent_list && snack.reagents.reagent_list.len) //find a reagent list if there is and check if it has entries
|
|
for (var/datum/reagent/R in snack.reagents.reagent_list) //no reagents will be left behind
|
|
data += "[R.id]([R.volume] units); " //Using IDs because SOME chemicals(I'm looking at you, chlorhydrate-beer) have the same names as other chemicals.
|
|
return data
|
|
else return "No reagents" |