mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-15 17:15:25 +01:00
Fixes suit breach_threshold not being applied.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
//They can be healed with plastic or metal sheeting.
|
||||
|
||||
/datum/breach
|
||||
var/class = 0 // Size. Lower is smaller.
|
||||
var/class = 0 // Size. Lower is smaller. Uses floating point values!
|
||||
var/descriptor // 'gaping hole' etc.
|
||||
var/damtype = BURN // Punctured or melted
|
||||
var/obj/item/clothing/suit/space/holder // Suit containing the list of breaches holding this instance.
|
||||
@@ -12,8 +12,8 @@
|
||||
|
||||
var/can_breach = 1 // Set to 0 to disregard all breaching.
|
||||
var/list/breaches = list() // Breach datum container.
|
||||
var/resilience = 0.2 // Multiplier that turns damage into breach class. 1 is 100% of damage to breach, 0.1 is 10%.
|
||||
var/breach_threshold = 3 // Min damage before a breach is possible.
|
||||
var/resilience = 0.2 // Multiplier that turns damage into breach class. 1 is 100% of damage to breach, 0.1 is 10%. 0.2 -> 50 brute/burn damage to cause 10 breach damage
|
||||
var/breach_threshold = 3 // Min damage before a breach is possible. Damage is subtracted by this amount, it determines the "hardness" of the suit.
|
||||
var/damage = 0 // Current total damage
|
||||
var/brute_damage = 0 // Specifically brute damage.
|
||||
var/burn_damage = 0 // Specifically burn damage.
|
||||
@@ -44,7 +44,7 @@ var/global/list/breach_burn_descriptors = list(
|
||||
/datum/breach/proc/update_descriptor()
|
||||
|
||||
//Sanity...
|
||||
class = max(1,min(class,5))
|
||||
class = between(1, round(class), 5)
|
||||
//Apply the correct descriptor.
|
||||
if(damtype == BURN)
|
||||
descriptor = breach_burn_descriptors[class]
|
||||
@@ -86,7 +86,10 @@ var/global/list/breach_burn_descriptors = list(
|
||||
|
||||
/obj/item/clothing/suit/space/proc/create_breaches(var/damtype, var/amount)
|
||||
|
||||
if(!can_breach || !amount)
|
||||
amount -= src.breach_threshold
|
||||
amount *= src.resilience
|
||||
|
||||
if(!can_breach || amount <= 0)
|
||||
return
|
||||
|
||||
if(!breaches)
|
||||
@@ -98,14 +101,14 @@ var/global/list/breach_burn_descriptors = list(
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T) return
|
||||
|
||||
amount = amount * src.resilience
|
||||
|
||||
//Increase existing breaches.
|
||||
for(var/datum/breach/existing in breaches)
|
||||
|
||||
if(existing.damtype != damtype)
|
||||
continue
|
||||
|
||||
//keep in mind that 10 breach damage == full pressure loss.
|
||||
//a breach can have at most 5 breach damage
|
||||
if (existing.class < 5)
|
||||
var/needs = 5 - existing.class
|
||||
if(amount < needs)
|
||||
|
||||
@@ -38,7 +38,9 @@
|
||||
flags_inv = HIDEJUMPSUIT|HIDETAIL
|
||||
flags = STOPSPRESSUREDMAGE | THICKMATERIAL | AIRTIGHT
|
||||
slowdown = 0
|
||||
breach_threshold = 35
|
||||
//With 0.2 resiliance, will reach 10 breach damage after 9 laser carbine blasts. Completely immune to smg hits.
|
||||
breach_threshold = 28
|
||||
resilience = 0.1
|
||||
can_breach = 1
|
||||
supporting_limbs = list()
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
)
|
||||
|
||||
//Breach thresholds, should ideally be inherited by most (if not all) voidsuits.
|
||||
//With 0.2 resiliance, will reach 10 breach damage after 3 laser carbine blasts or 8 smg hits.
|
||||
breach_threshold = 18
|
||||
can_breach = 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user