Updates SDQL2 to the latest TG version and adds variable protection. (#17997)

* SDQL2 update

* fix that verb

* cl

* fix that

* toworld

* this is pointless

* update info

* siiiiick..

* vv edit update

* fix that

* fix editing vars

* fix VV

* discord protection

---------

Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
Matt Atlas
2023-12-25 17:10:35 +00:00
committed by GitHub
co-authored by Matt Atlas
parent af318acfc1
commit 12487c94bb
53 changed files with 2014 additions and 1042 deletions
+4 -4
View File
@@ -48,7 +48,7 @@
if(damage > min_broken_damage)
var/scarring = damage / max_damage
scarring = 1 - 0.5 * scarring ** 2 // Between ~15 and 50 percent loss.
var/new_max_dam = Floor(scarring * max_damage)
var/new_max_dam = FLOOR(scarring * max_damage)
if(new_max_dam < max_damage)
to_chat(user, SPAN_WARNING("Not every part of [src] could be saved; some dead tissue had to be removed, making it more susceptible to future damage."))
set_max_damage(new_max_dam)
@@ -97,9 +97,9 @@
return damage
/obj/item/organ/internal/proc/set_max_damage(var/ndamage)
max_damage = Floor(ndamage)
min_broken_damage = Floor(0.75 * max_damage)
min_bruised_damage = Floor(0.25 * max_damage)
max_damage = FLOOR(ndamage)
min_broken_damage = FLOOR(0.75 * max_damage)
min_bruised_damage = FLOOR(0.25 * max_damage)
/obj/item/organ/internal/proc/take_internal_damage(amount, var/silent=0)
if(BP_IS_ROBOTIC(src))
+1 -1
View File
@@ -183,7 +183,7 @@
var/blood_volume = owner.get_blood_oxygenation()
if(blood_volume < BLOOD_VOLUME_BAD)
to_chat(user, "<span class='danger'>Parts of [src] didn't survive the procedure due to lack of air supply!</span>")
set_max_damage(Floor(max_damage - 0.25*damage))
set_max_damage(FLOOR(max_damage - 0.25*damage))
heal_damage(damage)
/obj/item/organ/internal/brain/get_scarring_level()
+1 -1
View File
@@ -146,7 +146,7 @@
blood_max += ((W.damage / 40) * species.bleed_mod)
if(temp.status & ORGAN_ARTERY_CUT)
var/bleed_amount = Floor((owner.vessel.total_volume / (temp.applied_pressure || !open_wound ? 450 : 250)) * temp.arterial_bleed_severity)
var/bleed_amount = FLOOR((owner.vessel.total_volume / (temp.applied_pressure || !open_wound ? 450 : 250)) * temp.arterial_bleed_severity)
if(bleed_amount)
if(CE_BLOODCLOT in owner.chem_effects)
bleed_amount *= 0.8 // won't do much, but it'll help
+1 -1
View File
@@ -54,7 +54,7 @@
return !isnull(get_devour_time(food))
/obj/item/organ/internal/stomach/proc/is_full(var/atom/movable/food)
var/total = Floor(ingested.total_volume / 10)
var/total = FLOOR(ingested.total_volume / 10)
if(species.gluttonous & GLUT_MESSY)
return FALSE //Don't need to check if the stomach is full if we're not using the contents.
for(var/a in contents + food)