mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-30 20:13:53 +00:00
More hardsuit fixes, ion rifle fix
Fixes modules being usable when destroyed. Fixes charge display for fractional charge values. Fixes ion rifles EMPing themselves.
This commit is contained in:
@@ -138,6 +138,7 @@
|
||||
|
||||
if(damage >= 2)
|
||||
usr << "<span class='warning'>The [interface_name] is damaged beyond use!</span>"
|
||||
return 0
|
||||
|
||||
if(world.time < next_use)
|
||||
usr << "<span class='warning'>You cannot use the [interface_name] again so soon.</span>"
|
||||
@@ -147,7 +148,7 @@
|
||||
usr << "<span class='warning'>The suit is not initialized.</span>"
|
||||
return 0
|
||||
|
||||
if(usr.lying || usr.stat || usr.stunned || usr.paralysis)
|
||||
if(usr.lying || usr.stat || usr.stunned || usr.paralysis || usr.weakened)
|
||||
usr << "<span class='warning'>You cannot use the suit in this state.</span>"
|
||||
return 0
|
||||
|
||||
@@ -157,7 +158,7 @@
|
||||
|
||||
if(holder.security_check_enabled && !holder.check_suit_access(usr))
|
||||
usr << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
return 0
|
||||
|
||||
if(!holder.check_power_cost(usr, use_power_cost, 0, src, (istype(usr,/mob/living/silicon ? 1 : 0) ) ) )
|
||||
return 0
|
||||
|
||||
@@ -313,8 +313,9 @@
|
||||
|
||||
if(!istype(wearer) || loc != wearer || wearer.back != src || canremove || !cell || cell.charge <= 0)
|
||||
if(!cell || cell.charge <= 0)
|
||||
if(electrified >0)
|
||||
if(electrified > 0)
|
||||
electrified = 0
|
||||
malfunction_delay = 0 //ensures that people aren't stuck in their suit if the cell runs out while malfunctioning.
|
||||
if(!offline)
|
||||
if(istype(wearer))
|
||||
if(!canremove)
|
||||
@@ -338,7 +339,6 @@
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
module.deactivate()
|
||||
offline = 2
|
||||
malfunction_delay = 0 //ensures that people aren't stuck in their suit if the cell runs out while malfunctioning.
|
||||
chest.slowdown = offline_slowdown
|
||||
return
|
||||
|
||||
@@ -409,7 +409,7 @@
|
||||
data["boots"] = (boots ? "[boots.name]" : "None.")
|
||||
data["chest"] = (chest ? "[chest.name]" : "None.")
|
||||
|
||||
data["charge"] = cell ? cell.charge : 0
|
||||
data["charge"] = cell ? round(cell.charge,1) : 0
|
||||
data["maxcharge"] = cell ? cell.maxcharge : 0
|
||||
data["chargestatus"] = cell ? Floor((cell.charge/cell.maxcharge)*50) : 0
|
||||
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
projectile_type = /obj/item/projectile/ion
|
||||
|
||||
/obj/item/weapon/gun/energy/ionrifle/emp_act(severity)
|
||||
if(severity > 2)
|
||||
return //so it doesn't EMP itself, I guess
|
||||
..()
|
||||
..(max(severity, 2)) //so it doesn't EMP itself, I guess
|
||||
|
||||
/obj/item/weapon/gun/energy/ionrifle/update_icon()
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user