Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions code/game/turfs/turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -622,9 +622,22 @@ GLOBAL_LIST_EMPTY(station_turfs)
AddElement(/datum/element/rust)

/turf/handle_fall(mob/faller)
if(has_gravity(src))
playsound(src, SFX_BODYFALL, 50, TRUE)
faller.drop_all_held_items()
if(!has_gravity(src))
return
playsound(src, SFX_BODYFALL, 50, TRUE)
if(!iscarbon(faller))
faller.drop_all_held_items()
return

var/mob/living/carbon/carbon_faller = faller
var/is_staggered = carbon_faller.has_status_effect(/datum/status_effect/staggered)
for(var/obj/item/bodypart/arm/arm in carbon_faller.bodyparts)
var/obj/item/held = faller.get_item_for_held_index(arm.held_index)
if(isnull(held))
continue
if(!prob((0.3 * ((is_staggered ? 10 : 0) + (5 * held.w_class) + arm.get_modified_pain())) ** 1.5))
continue
faller.dropItemToGround(held)

/turf/proc/photograph(limit=20)
var/image/I = new()
Expand Down
5 changes: 2 additions & 3 deletions code/modules/mob/living/living_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -724,10 +724,9 @@
//Take their lunch money
var/target_held_item = target.get_active_held_item()
var/append_message = weapon ? " with [weapon]" : ""
if(!is_type_in_typecache(target_held_item, GLOB.shove_disarming_types)) //It's too expensive we'll get caught
target_held_item = null
var/disarmable = is_type_in_typecache(target_held_item, GLOB.shove_disarming_types) || target.body_position == LYING_DOWN

if(target_held_item && target.get_timed_status_effect_duration(/datum/status_effect/staggered))
if(target_held_item && disarmable && target.has_status_effect(/datum/status_effect/staggered))
target.dropItemToGround(target_held_item)
append_message = "causing [target.p_them()] to drop [target_held_item]"
target.visible_message(span_danger("[target.name] drops \the [target_held_item]!"),
Expand Down
Loading