things with stuff (#6233)

* buncha things from upstream

* datums globals, onclick

* datums

* game folder, holy shit mirror bot why

* modules

* icons

* dme

* compiles cleanly

* tools purge

* updates maps

* double check just because. and wew lad

* incidentally, this needs more work first

* some things

* weh

* sound cleanup and icons

* reeeee

* compile issues

* oh look, fresh code sync

* cleans up some unused icons

* dirty vars

* reeeeeeeeeeeeeeee

* wew lad. fuck off with this already
This commit is contained in:
Poojawa
2018-04-02 03:53:25 -05:00
committed by deathride58
parent 832939d3ac
commit 5fa001c10f
838 changed files with 25446 additions and 23273 deletions
+31 -27
View File
@@ -19,6 +19,7 @@
var/burnstate = 0
var/brute_dam = 0
var/burn_dam = 0
var/stamina_dam = 0
var/max_damage = 0
var/list/embedded_objects = list()
var/held_index = 0 //are we a hand? if so, which one!
@@ -116,52 +117,54 @@
//Applies brute and burn damage to the organ. Returns 1 if the damage-icon states changed at all.
//Damage will not exceed max_damage using this proc
//Cannot apply negative damage
/obj/item/bodypart/proc/receive_damage(brute, burn, updating_health = 1)
/obj/item/bodypart/proc/receive_damage(brute = 0, burn = 0, stamina = 0, updating_health = TRUE)
if(owner && (owner.status_flags & GODMODE))
return 0 //godmode
return FALSE //godmode
var/dmg_mlt = CONFIG_GET(number/damage_multiplier)
brute = max(brute * dmg_mlt, 0)
burn = max(burn * dmg_mlt, 0)
stamina = max(stamina * dmg_mlt, 0)
if(status == BODYPART_ROBOTIC) //This makes robolimbs not damageable by chems and makes it stronger
brute = max(0, brute - 5)
burn = max(0, burn - 4)
//No stamina scaling.. for now..
if(!brute && !burn && !stamina)
return FALSE
switch(animal_origin)
if(ALIEN_BODYPART,LARVA_BODYPART) //aliens take double burn
burn *= 2
var/can_inflict = max_damage - (brute_dam + burn_dam)
if(!can_inflict)
return 0
if(can_inflict <= 0)
return FALSE
var/total_damage = brute + burn
if(total_damage > can_inflict)
var/excess = total_damage - can_inflict
brute = brute * (excess / total_damage)
burn = burn * (excess / total_damage)
brute_dam += brute
burn_dam += burn
//We've dealt the physical damages, if there's room lets apply the stamina damage.
var/current_damage = brute_dam + burn_dam + stamina_dam //This time around, count stamina loss too.
var/available_damage = max_damage - current_damage
stamina_dam += CLAMP(stamina, 0, available_damage)
if((brute + burn) < can_inflict)
brute_dam += brute
burn_dam += burn
else
if(brute > 0)
if(burn > 0)
brute = round( (brute/(brute+burn)) * can_inflict, 1 )
burn = can_inflict - brute //gets whatever damage is left over
brute_dam += brute
burn_dam += burn
else
brute_dam += can_inflict
else
if(burn > 0)
burn_dam += can_inflict
else
return 0
if(owner && updating_health)
owner.updatehealth()
if(stamina)
owner.update_stamina()
return update_bodypart_damage_state()
//Heals brute and burn damage for the organ. Returns 1 if the damage-icon states changed at all.
//Damage cannot go below zero.
//Cannot remove negative damage (i.e. apply damage)
/obj/item/bodypart/proc/heal_damage(brute, burn, only_robotic = 0, only_organic = 1, updating_health = 1)
/obj/item/bodypart/proc/heal_damage(brute, burn, stamina, only_robotic = FALSE, only_organic = TRUE, updating_health = TRUE)
if(only_robotic && status != BODYPART_ROBOTIC) //This makes organic limbs not heal when the proc is in Robotic mode.
return
@@ -171,6 +174,7 @@
brute_dam = max(brute_dam - brute, 0)
burn_dam = max(burn_dam - burn, 0)
stamina_dam = max(stamina_dam - stamina, 0)
if(owner && updating_health)
owner.updatehealth()
return update_bodypart_damage_state()
@@ -189,8 +193,8 @@
if((tbrute != brutestate) || (tburn != burnstate))
brutestate = tbrute
burnstate = tburn
return 1
return 0
return TRUE
return FALSE
+2 -2
View File
@@ -32,5 +32,5 @@
else
return 0
else
to_chat(user, "<span class='warning'>There aren't any cores left in [target]!</span>")
return 1
to_chat(user, "<span class='warning'>There aren't any cores left in [target]!</span>")
return 1
+1 -1
View File
@@ -26,4 +26,4 @@
return returnorg
/mob/living/carbon/getorganslot(slot)
return internal_organs_slot[slot]
return internal_organs_slot[slot]
+1 -1
View File
@@ -305,7 +305,7 @@
cooldown = COOLDOWN_DAMAGE
for(var/V in listeners)
var/mob/living/L = V
L.heal_overall_damage(10 * power_multiplier, 10 * power_multiplier, 0, 0)
L.heal_overall_damage(10 * power_multiplier, 10 * power_multiplier, 0, FALSE, FALSE)
//BRUTE DAMAGE
else if((findtext(message, hurt_words)))
-1
View File
@@ -67,7 +67,6 @@
SSblackbox.record_feedback("tally", "surgeries_completed", 1, type)
qdel(src)
/datum/surgery/proc/get_propability_multiplier()
var/propability = 0.5
var/turf/T = get_turf(target)