mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-2025-11-12
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
return
|
||||
|
||||
// capping damage so splashing a beaker on a moth is not an instant crit
|
||||
var/damage = min(round(0.4 * reac_volume * (1 - touch_protection), 0.1), 12)
|
||||
var/damage = min(round(reac_volume * (1 - touch_protection), 0.1), 20)
|
||||
if(damage < 1)
|
||||
return
|
||||
|
||||
|
||||
@@ -41,15 +41,18 @@
|
||||
if (SEND_SIGNAL(target, COMSIG_LIVING_DROP_LOOT, spawn_loot, gibbed) & COMPONENT_NO_LOOT_DROP)
|
||||
return
|
||||
|
||||
var/list/all_loot = list()
|
||||
for(var/thing_to_spawn in spawn_loot)
|
||||
for(var/i in 1 to (spawn_loot[thing_to_spawn] || 1))
|
||||
create_loot(thing_to_spawn, loot_loc, target, gibbed, spread_px = spawn_loot.len * 3)
|
||||
all_loot += create_loot(thing_to_spawn, loot_loc, target, gibbed, spread_px = spawn_loot.len * 3)
|
||||
|
||||
list_clear_nulls(all_loot) // in case of gibbed corpses
|
||||
SEND_SIGNAL(target, COMSIG_LIVING_DROPPED_LOOT, all_loot, gibbed)
|
||||
|
||||
/// Handles creating the loots
|
||||
/datum/element/death_drops/proc/create_loot(typepath, atom/loot_loc, mob/living/dead, gibbed, spread_px = 4)
|
||||
if(ispath(typepath, /obj/effect/mob_spawn/corpse))
|
||||
handle_corpse(typepath, loot_loc, dead, gibbed)
|
||||
return
|
||||
return handle_corpse(typepath, loot_loc, dead, gibbed)
|
||||
|
||||
var/drop = new typepath(loot_loc)
|
||||
if(isitem(drop) && spread_px)
|
||||
@@ -57,6 +60,7 @@
|
||||
var/clamped_px = clamp(spread_px, 0, 16)
|
||||
dropped_item.pixel_x = rand(-clamped_px, clamped_px)
|
||||
dropped_item.pixel_y = rand(-clamped_px, clamped_px)
|
||||
return drop
|
||||
|
||||
/// Handles snowflake case of mob corpses
|
||||
/datum/element/death_drops/proc/handle_corpse(typepath, atom/loot_loc, mob/living/dead, gibbed)
|
||||
@@ -68,7 +72,8 @@
|
||||
// if gibbed, dispose of the body
|
||||
if(gibbed)
|
||||
body.gib(DROP_ALL_REMAINS)
|
||||
return
|
||||
return null
|
||||
// otherwise continue with the rest of the damage types
|
||||
body.setToxLoss(dead.getToxLoss())
|
||||
body.setOxyLoss(dead.getOxyLoss())
|
||||
return body
|
||||
|
||||
@@ -41,6 +41,10 @@
|
||||
SIGNAL_HANDLER
|
||||
if (!istype(swimmer))
|
||||
return
|
||||
if(QDELETED(swimmer))
|
||||
return
|
||||
if(HAS_TRAIT(swimmer, TRAIT_IMMERSED))
|
||||
return
|
||||
RegisterSignal(swimmer, SIGNAL_ADDTRAIT(TRAIT_IMMERSED), PROC_REF(dip_in))
|
||||
if(HAS_TRAIT(swimmer, TRAIT_IMMERSED))
|
||||
dip_in(swimmer)
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
/datum/element/watery_tile/proc/enter_water(atom/source, atom/movable/entered)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(QDELETED(entered))
|
||||
return
|
||||
if(HAS_TRAIT(entered, TRAIT_IMMERSED) || HAS_TRAIT(entered, TRAIT_WALLMOUNTED))
|
||||
return
|
||||
RegisterSignal(entered, SIGNAL_ADDTRAIT(TRAIT_IMMERSED), PROC_REF(dip_in))
|
||||
if(isliving(entered))
|
||||
RegisterSignal(entered, SIGNAL_REMOVETRAIT(TRAIT_IMMERSED), PROC_REF(dip_out))
|
||||
|
||||
Reference in New Issue
Block a user