mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-14 19:51:59 +00:00
Driving any vehicle into the supermatter will dust all passengers (#82137)
## About The Pull Request Fixes #82135 All occupants of vehicles (including mobs you can ride) will now die if anyone drives that vehicle into the supermatter crystal. ## Why It's Good For The Game It may not be canonically true that driving the clown car into the supermatter dusts all occupants but by god, it should be. This is the result that you expect to occur upon doing such a thing. ## Changelog 🆑 fix: Driving a vehicle into the supermatter will kill everyone riding the vehicle /🆑 --------- Co-authored-by: san7890 <the@san7890.com>
This commit is contained in:
@@ -61,6 +61,9 @@
|
||||
/// from /obj/machinery/power/supermatter_crystal/process_atmos(); when the SM sounds an audible alarm
|
||||
#define COMSIG_SUPERMATTER_DELAM_ALARM "sm_delam_alarm"
|
||||
|
||||
/// from /datum/component/supermatter_crystal/proc/consume()
|
||||
/// called on the thing consumed, passes the thing which consumed it
|
||||
#define COMSIG_SUPERMATTER_CONSUMED "sm_consumed_this"
|
||||
|
||||
// /obj/machinery/cryo_cell signals
|
||||
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
RegisterSignal(parent, COMSIG_BUCKLED_CAN_Z_MOVE, PROC_REF(riding_can_z_move))
|
||||
RegisterSignals(parent, GLOB.movement_type_addtrait_signals, PROC_REF(on_movement_type_trait_gain))
|
||||
RegisterSignals(parent, GLOB.movement_type_removetrait_signals, PROC_REF(on_movement_type_trait_loss))
|
||||
RegisterSignal(parent, COMSIG_SUPERMATTER_CONSUMED, PROC_REF(on_entered_supermatter))
|
||||
if(!can_force_unbuckle)
|
||||
RegisterSignal(parent, COMSIG_ATOM_ATTACK_HAND, PROC_REF(force_unbuckle))
|
||||
|
||||
@@ -314,3 +315,9 @@
|
||||
if((living_hitter in source.buckled_mobs))
|
||||
return
|
||||
return COMPONENT_CANCEL_ATTACK_CHAIN
|
||||
|
||||
/// When we touch a crystal, kill everything inside us
|
||||
/datum/component/riding/proc/on_entered_supermatter(atom/movable/ridden, atom/movable/supermatter)
|
||||
SIGNAL_HANDLER
|
||||
for (var/mob/passenger as anything in ridden.buckled_mobs)
|
||||
passenger.Bump(supermatter)
|
||||
|
||||
@@ -288,15 +288,23 @@
|
||||
consume(atom_source, nom)
|
||||
|
||||
/datum/component/supermatter_crystal/proc/consume(atom/source, atom/movable/consumed_object)
|
||||
if(consumed_object.flags_1 & SUPERMATTER_IGNORES_1)
|
||||
return
|
||||
if(isliving(consumed_object))
|
||||
var/mob/living/consumed_mob = consumed_object
|
||||
if(consumed_mob.status_flags & GODMODE)
|
||||
return
|
||||
|
||||
var/atom/atom_source = source
|
||||
SEND_SIGNAL(consumed_object, COMSIG_SUPERMATTER_CONSUMED, atom_source)
|
||||
|
||||
var/object_size = 0
|
||||
var/matter_increase = 0
|
||||
var/damage_increase = 0
|
||||
|
||||
if(isliving(consumed_object))
|
||||
var/mob/living/consumed_mob = consumed_object
|
||||
object_size = consumed_mob.mob_size + 2
|
||||
if(consumed_mob.status_flags & GODMODE)
|
||||
return
|
||||
message_admins("[atom_source] has consumed [key_name_admin(consumed_mob)] [ADMIN_JMP(atom_source)].")
|
||||
atom_source.investigate_log("has consumed [key_name(consumed_mob)].", INVESTIGATE_ENGINE)
|
||||
consumed_mob.investigate_log("has been dusted by [atom_source].", INVESTIGATE_DEATHS)
|
||||
@@ -312,8 +320,6 @@
|
||||
if(is_clown_job(consumed_mob.mind?.assigned_role))
|
||||
damage_increase += rand(-30, 30) // HONK
|
||||
consume_returns(matter_increase, damage_increase)
|
||||
else if(consumed_object.flags_1 & SUPERMATTER_IGNORES_1)
|
||||
return
|
||||
else if(isobj(consumed_object))
|
||||
if(!iseffect(consumed_object))
|
||||
var/suspicion = ""
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
///Determines which occupants provide access when bumping into doors
|
||||
var/access_provider_flags = VEHICLE_CONTROL_DRIVE
|
||||
|
||||
/obj/vehicle/sealed/Initialize(mapload)
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_SUPERMATTER_CONSUMED, PROC_REF(on_entered_supermatter))
|
||||
|
||||
/obj/vehicle/sealed/generate_actions()
|
||||
. = ..()
|
||||
initialize_passenger_action_type(/datum/action/vehicle/sealed/climb_out)
|
||||
@@ -158,3 +162,9 @@
|
||||
/// Sinced sealed vehicles (cars and mechs) don't have riding components, the actual movement is handled here from [/obj/vehicle/sealed/proc/relaymove]
|
||||
/obj/vehicle/sealed/proc/vehicle_move(direction)
|
||||
return FALSE
|
||||
|
||||
/// When we touch a crystal, kill everything inside us
|
||||
/obj/vehicle/sealed/proc/on_entered_supermatter(atom/movable/vehicle, atom/movable/supermatter)
|
||||
SIGNAL_HANDLER
|
||||
for (var/mob/passenger as anything in occupants)
|
||||
passenger.Bump(supermatter)
|
||||
|
||||
Reference in New Issue
Block a user