mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Added feedback messages for when service bot auto-refills their drink containers.
Tweaked battery charge usage for refilling, and fixed bug where it would not refill if you empty it completely.
This commit is contained in:
@@ -93,15 +93,27 @@
|
|||||||
user << "\red [target] is full."
|
user << "\red [target] is full."
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var/datum/reagent/refill
|
||||||
|
var/datum/reagent/refillName
|
||||||
|
if(isrobot(user))
|
||||||
|
refill = reagents.get_master_reagent_id()
|
||||||
|
refillName = reagents.get_master_reagent_name()
|
||||||
|
|
||||||
var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||||
user << "\blue You transfer [trans] units of the solution to [target]."
|
user << "\blue You transfer [trans] units of the solution to [target]."
|
||||||
|
|
||||||
if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell
|
if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell
|
||||||
var/mob/living/silicon/robot/bro = user
|
var/mob/living/silicon/robot/bro = user
|
||||||
bro.cell.use(30)
|
var/chargeAmount = max(30,4*trans)
|
||||||
var/refill = reagents.get_master_reagent_id()
|
bro.cell.use(chargeAmount)
|
||||||
spawn(600)
|
user << "Now synthesizing [trans] units of [refillName]..."
|
||||||
|
|
||||||
|
|
||||||
|
spawn(300)
|
||||||
reagents.add_reagent(refill, trans)
|
reagents.add_reagent(refill, trans)
|
||||||
|
user << "Cyborg [src] refilled."
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user