mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-23-10-2025
This commit is contained in:
@@ -5,8 +5,9 @@
|
||||
icon_state = "bloodpack"
|
||||
volume = 200
|
||||
fill_icon_thresholds = list(10, 20, 30, 40, 50, 60, 70, 80, 90, 100)
|
||||
obj_flags = UNIQUE_RENAME | RENAME_NO_DESC
|
||||
var/blood_type = null
|
||||
var/labelled = FALSE
|
||||
var/labeled = FALSE
|
||||
|
||||
/obj/item/reagent_containers/blood/Initialize(mapload, vol)
|
||||
. = ..()
|
||||
@@ -21,7 +22,7 @@
|
||||
|
||||
/obj/item/reagent_containers/blood/update_name(updates)
|
||||
. = ..()
|
||||
if(!labelled)
|
||||
if(!labeled)
|
||||
name = "blood pack[blood_type ? " - [blood_type]" : ""]"
|
||||
|
||||
/obj/item/reagent_containers/blood/random
|
||||
@@ -81,27 +82,7 @@
|
||||
/obj/item/reagent_containers/blood/universal
|
||||
blood_type = BLOOD_TYPE_UNIVERSAL
|
||||
|
||||
/obj/item/reagent_containers/blood/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
|
||||
if(!IS_WRITING_UTENSIL(tool))
|
||||
return NONE
|
||||
|
||||
if(!user.can_write(tool))
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
var/custom_label = tgui_input_text(user, "What would you like to label the blood pack?", "Blood Pack", name, max_length = MAX_NAME_LEN)
|
||||
if(!user.can_perform_action(src))
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
if(user.get_active_held_item() != tool)
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
if(!custom_label)
|
||||
labelled = FALSE
|
||||
update_name()
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
labelled = TRUE
|
||||
name = "blood pack - [custom_label]"
|
||||
/obj/item/reagent_containers/blood/nameformat(input, user)
|
||||
playsound(src, SFX_WRITING_PEN, 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE, SOUND_FALLOFF_EXPONENT + 3, ignore_walls = FALSE)
|
||||
balloon_alert(user, "new label set")
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
labeled = TRUE
|
||||
return "blood pack[input? " - [input]" : null]"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
fill_icon_state = "bottle"
|
||||
inhand_icon_state = "atoxinbottle"
|
||||
worn_icon_state = "bottle"
|
||||
obj_flags = UNIQUE_RENAME | RENAME_NO_DESC
|
||||
possible_transfer_amounts = list(5, 10, 15, 25, 50)
|
||||
volume = 50
|
||||
fill_icon_thresholds = list(0, 1, 20, 40, 60, 80, 100)
|
||||
@@ -260,6 +261,11 @@
|
||||
desc = "A small bottle of basic buffer."
|
||||
list_reagents = list(/datum/reagent/reaction_agent/basic_buffer = 30)
|
||||
|
||||
/obj/item/reagent_containers/cup/bottle/inversing_buffer
|
||||
name = "Chiral inversing buffer bottle"
|
||||
desc = "A small bottle of chiral inversing buffer."
|
||||
list_reagents = list(/datum/reagent/reaction_agent/inversing_buffer = 30)
|
||||
|
||||
/obj/item/reagent_containers/cup/bottle/romerol
|
||||
name = "romerol bottle"
|
||||
desc = "A small bottle of Romerol. The REAL zombie powder."
|
||||
@@ -524,26 +530,14 @@
|
||||
|
||||
//when you attack the syrup bottle with a container it refills it
|
||||
/obj/item/reagent_containers/cup/bottle/syrup_bottle/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
|
||||
if(IS_WRITING_UTENSIL(tool))
|
||||
return writing_utensil_act(user, tool)
|
||||
if(is_open_container() && tool.is_refillable())
|
||||
return refillable_act(user, tool)
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/cup/bottle/syrup_bottle/proc/writing_utensil_act(mob/user, obj/item/tool)
|
||||
if(!user.can_write(tool))
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
var/input_name = tgui_input_text(user, "What would you like to label the syrup bottle?", "Syrup Bottle Labelling", max_length = MAX_NAME_LEN)
|
||||
if(!user.can_perform_action(src))
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
/obj/item/reagent_containers/cup/bottle/syrup_bottle/nameformat(input, user)
|
||||
playsound(src, SFX_WRITING_PEN, 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE, SOUND_FALLOFF_EXPONENT + 3, ignore_walls = FALSE)
|
||||
if(input_name)
|
||||
name = "[input_name] bottle"
|
||||
else
|
||||
name = initial(name)
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
return "[input? "[input] " : null]bottle"
|
||||
|
||||
|
||||
/obj/item/reagent_containers/cup/bottle/syrup_bottle/proc/refillable_act(mob/user, obj/item/tool)
|
||||
if(!reagents.total_volume)
|
||||
|
||||
Reference in New Issue
Block a user