mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-21 03:56:47 +01:00
@@ -334,6 +334,7 @@
|
||||
|
||||
var/atom/interfaced_with // Currently draining power from this device.
|
||||
var/total_power_drained = 0
|
||||
var/drain_loc
|
||||
|
||||
/obj/item/rig_module/power_sink/deactivate()
|
||||
|
||||
@@ -373,6 +374,7 @@
|
||||
|
||||
H << "<span class = 'danger'>You begin draining power from [target]!</span>"
|
||||
interfaced_with = target
|
||||
drain_loc = interfaced_with.loc
|
||||
|
||||
holder.spark_system.start()
|
||||
playsound(H.loc, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
@@ -406,7 +408,7 @@
|
||||
drain_complete(H)
|
||||
return
|
||||
|
||||
if(!interfaced_with || !interfaced_with.Adjacent(H))
|
||||
if(!interfaced_with || !interfaced_with.Adjacent(H) || !(interfaced_with.loc == drain_loc))
|
||||
H << "<span class = 'warning'>Your power sink retracts into its casing.</span>"
|
||||
drain_complete(H)
|
||||
return
|
||||
@@ -427,8 +429,6 @@
|
||||
holder.cell.give(target_drained * CELLRATE)
|
||||
total_power_drained += target_drained
|
||||
|
||||
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/power_sink/proc/drain_complete(var/mob/living/M)
|
||||
@@ -439,5 +439,6 @@
|
||||
if(M) M << "<font color='blue'><b>Total power drained from [interfaced_with]:</b> [round(total_power_drained/1000)]kJ.</font>"
|
||||
interfaced_with.drain_power(0,1,0) // Damage the victim.
|
||||
|
||||
drain_loc = null
|
||||
interfaced_with = null
|
||||
total_power_drained = 0
|
||||
@@ -147,6 +147,14 @@
|
||||
usr << "<span class='warning'>The suit is not initialized.</span>"
|
||||
return 0
|
||||
|
||||
if(usr.lying || usr.stat || usr.stunned || usr.paralysis)
|
||||
usr << "<span class='warning'>You cannot use the suit in this state.</span>"
|
||||
return 0
|
||||
|
||||
if(holder.wearer && holder.wearer.lying)
|
||||
usr << "<span class='warning'>The suit cannot function while the wearer is prone.</span>"
|
||||
return 0
|
||||
|
||||
if(holder.security_check_enabled && !holder.check_suit_access(usr))
|
||||
usr << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
use_power_cost = 5
|
||||
active_power_cost = 1
|
||||
passive_power_cost = 0
|
||||
module_cooldown = 30
|
||||
|
||||
activate_string = "Enable Cloak"
|
||||
deactivate_string = "Disable Cloak"
|
||||
|
||||
@@ -251,13 +251,13 @@
|
||||
else
|
||||
helmet.flags &= ~AIRTIGHT
|
||||
helmet.update_light(wearer)
|
||||
|
||||
|
||||
//sealed pieces become airtight, protecting against diseases
|
||||
if (!seal_target)
|
||||
piece.armor["bio"] = 100
|
||||
else
|
||||
piece.armor["bio"] = src.armor["bio"]
|
||||
|
||||
|
||||
else
|
||||
failed_to_seal = 1
|
||||
|
||||
@@ -515,6 +515,8 @@
|
||||
return
|
||||
|
||||
if(href_list["toggle_piece"])
|
||||
if(ishuman(usr) && (usr.stat || usr.stunned || usr.lying))
|
||||
return 0
|
||||
toggle_piece(href_list["toggle_piece"], usr)
|
||||
else if(href_list["toggle_seals"])
|
||||
toggle_seals(usr)
|
||||
@@ -543,7 +545,7 @@
|
||||
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/rig/proc/notify_ai(var/message)
|
||||
if(!message || !installed_modules || !installed_modules.len)
|
||||
@@ -579,6 +581,9 @@
|
||||
if(!istype(wearer) || !wearer.back == src)
|
||||
return
|
||||
|
||||
if(usr == wearer && (usr.stat||usr.paralysis||usr.stunned)) // If the usr isn't wearing the suit it's probably an AI.
|
||||
return
|
||||
|
||||
var/obj/item/check_slot
|
||||
var/equip_to
|
||||
var/obj/item/use_obj
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
installed_modules -= removed
|
||||
update_icon()
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
// If we've gotten this far, all we have left to do before we pass off to root procs
|
||||
// is check if any of the loaded modules want to use the item we've been given.
|
||||
|
||||
@@ -120,8 +120,8 @@
|
||||
|
||||
/obj/item/weapon/rig/verb/toggle_seals_verb()
|
||||
|
||||
set name = "Toggle Seals"
|
||||
set desc = "Activates or deactivates your rig seals."
|
||||
set name = "Toggle Hardsuit"
|
||||
set desc = "Activates or deactivates your rig."
|
||||
set category = "Hardsuit"
|
||||
set src = usr.contents
|
||||
|
||||
@@ -208,6 +208,8 @@
|
||||
var/obj/item/rig_module/module = input("Which module do you wish to select?") as null|anything in selectable
|
||||
|
||||
if(!istype(module))
|
||||
selected_module = null
|
||||
usr << "<font color='blue'><b>Primary system is now: deselected.</b></font>"
|
||||
return
|
||||
|
||||
selected_module = module
|
||||
|
||||
Reference in New Issue
Block a user