Skip to content

Commit

Permalink
explosives
Browse files Browse the repository at this point in the history
  • Loading branch information
ihatethisengine committed Apr 24, 2024
1 parent 2f6f811 commit 8fead53
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion code/game/turfs/transit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
return 4

/atom/movable/proc/handle_paradrop(turf/target, dropship_name)
clear_active_explosives()
ADD_TRAIT(src, TRAIT_IMMOBILIZED, TRAIT_SOURCE_DROPSHIP_INTERACTION)
ADD_TRAIT(src, TRAIT_UNDENSE, TRAIT_SOURCE_DROPSHIP_INTERACTION)
var/image/cables = image('icons/obj/structures/droppod_32x64.dmi', src, "chute_cables_static")
Expand Down Expand Up @@ -165,7 +166,14 @@
overlays -= cables
overlays -= chute

/atom/movable/proc/clear_active_explosives()
for(var/obj/item/explosive/explosive in contents)
if(!explosive.active)
continue
explosive.deconstruct(FALSE)

/atom/movable/proc/handle_airdrop(turf/target, dropship_name)
clear_active_explosives()
ADD_TRAIT(src, TRAIT_IMMOBILIZED, TRAIT_SOURCE_DROPSHIP_INTERACTION)
pixel_z = 360
forceMove(target)
Expand All @@ -189,11 +197,17 @@
..()
if(QDELETED(src))
return
if(!indestructible && w_class == SIZE_SMALL) //small items will be lost, good riddance
if(!indestructible && w_class < SIZE_MEDIUM) //tiny and small items will be lost, good riddance
deconstruct(FALSE)
return
explosion_throw(200) // give it a bit of a kick

/obj/item/explosive/handle_airdrop(turf/target, dropship_name)
if(active)
deconstruct(FALSE)
return
..()

/mob/living/handle_airdrop(turf/target, dropship_name)
..()
playsound(target, "punch", rand(20, 70), TRUE)
Expand Down

0 comments on commit 8fead53

Please sign in to comment.