mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-15 00:54:16 +01:00
Merge pull request #7583 from atlantiscze/cellrate-hardsuit-stuff
Hardsuit Powersink Adjustments
This commit is contained in:
@@ -182,7 +182,7 @@ var/list/robot_verbs_default = list(
|
||||
lawsync()
|
||||
photosync()
|
||||
|
||||
/mob/living/silicon/robot/drain_power(var/drain_check)
|
||||
/mob/living/silicon/robot/drain_power(var/drain_check, var/surge, var/amount = 0)
|
||||
|
||||
if(drain_check)
|
||||
return 1
|
||||
@@ -190,14 +190,15 @@ var/list/robot_verbs_default = list(
|
||||
if(!cell || !cell.charge)
|
||||
return 0
|
||||
|
||||
if(cell.charge)
|
||||
src << "<span class='danger'>Warning: Unauthorized access through power channel 12 detected.</span>"
|
||||
var/drained_power = rand(200,400)
|
||||
if(cell.charge < drained_power)
|
||||
drained_power = cell.charge
|
||||
cell.use(drained_power)
|
||||
return drained_power
|
||||
// Actual amount to drain from cell, using CELLRATE
|
||||
var/cell_amount = amount * CELLRATE
|
||||
|
||||
if(cell.charge > cell_amount)
|
||||
// Spam Protection
|
||||
if(prob(10))
|
||||
src << "<span class='danger'>Warning: Unauthorized access through power channel [rand(11,29)] detected!</span>"
|
||||
cell.use(cell_amount)
|
||||
return amount
|
||||
return 0
|
||||
|
||||
// setup the PDA and its name
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
// If drain_check is set it will not actually drain power, just return a value.
|
||||
// If surge is set, it will destroy/damage the recipient and not return any power.
|
||||
// Not sure where to define this, so it can sit here for the rest of time.
|
||||
/atom/proc/drain_power(var/drain_check,var/surge)
|
||||
/atom/proc/drain_power(var/drain_check,var/surge, var/amount = 0)
|
||||
return -1
|
||||
|
||||
// Show a message to all mobs in earshot of this one
|
||||
|
||||
Reference in New Issue
Block a user