mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 13:07:46 +01:00
Small container transfer rate change improvements (#18780)
* Avoid extraneous warning on `set_APTFT()` cancel * Add `set_APTFT()` success feedback message * Standardize `possible_transfer_amounts` * Cryptic var names begone * Unhardcode "It will transfer X units" examine note * Fix grammar
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
icon_state = null
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/amount_per_transfer_from_this = 5
|
||||
var/visible_transfer_rate = TRUE
|
||||
var/possible_transfer_amounts = list(5,10,15,25,30)
|
||||
var/volume = 30
|
||||
var/list/list_reagents = null
|
||||
@@ -25,7 +26,9 @@
|
||||
var/default = null
|
||||
if(amount_per_transfer_from_this in possible_transfer_amounts)
|
||||
default = amount_per_transfer_from_this
|
||||
var/N = input("Amount per transfer from this:", "[src]", default) as null|anything in possible_transfer_amounts
|
||||
var/new_transfer_rate = input("Amount per transfer from this:", "[src]", default) as null|anything in possible_transfer_amounts
|
||||
if(!new_transfer_rate)
|
||||
return
|
||||
|
||||
if(!usr.Adjacent(src))
|
||||
to_chat(usr, "<span class='warning'>You have moved too far away!</span>")
|
||||
@@ -34,8 +37,8 @@
|
||||
to_chat(usr, "<span class='warning'>You can't use your hands!</span>")
|
||||
return
|
||||
|
||||
if(N)
|
||||
amount_per_transfer_from_this = N
|
||||
amount_per_transfer_from_this = new_transfer_rate
|
||||
to_chat(usr, "<span class='notice'>[src] will now transfer [amount_per_transfer_from_this] units at a time.</span>")
|
||||
|
||||
/obj/item/reagent_containers/AltClick()
|
||||
set_APTFT()
|
||||
@@ -100,8 +103,9 @@
|
||||
/obj/item/reagent_containers/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
// Food has no valid possible_transfer_amounts, and we don't want to show
|
||||
// this message on examining food.
|
||||
if(visible_transfer_rate)
|
||||
. += "<span class='notice'>It will transfer [amount_per_transfer_from_this] unit[amount_per_transfer_from_this != 1 ? "s" : ""] at a time.</span>"
|
||||
|
||||
// Items that have no valid possible_transfer_amounts shouldn't say their transfer rate is variable
|
||||
if(possible_transfer_amounts)
|
||||
. += "<span class='notice'>It will transfer [amount_per_transfer_from_this] unit[amount_per_transfer_from_this > 1 ? "s" : ""] at a time.</span>"
|
||||
. += "<span class='notice'>Alt-click to change the transfer amount.</span>"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
item_state = "mender"
|
||||
volume = 200
|
||||
possible_transfer_amounts = null
|
||||
visible_transfer_rate = FALSE
|
||||
resistance_flags = ACID_PROOF
|
||||
container_type = REFILLABLE | AMOUNT_VISIBLE
|
||||
temperature_min = 270
|
||||
|
||||
@@ -240,7 +240,7 @@
|
||||
desc = "A baggie. Can hold up to 10 units."
|
||||
icon_state = "baggie"
|
||||
amount_per_transfer_from_this = 2
|
||||
possible_transfer_amounts = 2
|
||||
possible_transfer_amounts = null
|
||||
volume = 10
|
||||
container_type = OPENCONTAINER
|
||||
can_assembly = 0
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
name = "combat stimulant injector"
|
||||
desc = "A modified air-needle autoinjector, used by support operatives to quickly heal injuries in combat."
|
||||
amount_per_transfer_from_this = 15
|
||||
possible_transfer_amounts = list(15)
|
||||
possible_transfer_amounts = null
|
||||
icon_state = "combat_hypo"
|
||||
volume = 90
|
||||
ignore_flags = 1 // So they can heal their comrades.
|
||||
@@ -104,7 +104,7 @@
|
||||
item_state = "autoinjector"
|
||||
belt_icon = "autoinjector"
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(10)
|
||||
possible_transfer_amounts = null
|
||||
volume = 10
|
||||
ignore_flags = TRUE //so you can medipen through hardsuits
|
||||
container_type = DRAWABLE
|
||||
@@ -151,7 +151,6 @@
|
||||
desc = "Rapidly stimulates and regenerates the body's organ system."
|
||||
icon_state = "stimpen"
|
||||
amount_per_transfer_from_this = 50
|
||||
possible_transfer_amounts = list(50)
|
||||
volume = 50
|
||||
list_reagents = list("stimulants" = 50)
|
||||
|
||||
@@ -168,7 +167,6 @@
|
||||
desc = "After a short period of time the nanites will slow the body's systems and assist with bone repair. Nanomachines son."
|
||||
icon_state = "bonepen"
|
||||
amount_per_transfer_from_this = 30
|
||||
possible_transfer_amounts = list(30)
|
||||
volume = 30
|
||||
list_reagents = list("nanocalcium" = 30)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
icon_state = "0"
|
||||
belt_icon = "syringe"
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list()
|
||||
possible_transfer_amounts = null
|
||||
volume = 15
|
||||
sharp = TRUE
|
||||
var/busy = FALSE
|
||||
|
||||
Reference in New Issue
Block a user