mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
## About The Pull Request Turns out most mech actions only cared about the person attempting to use them being inside the mech, without checking for things such as the mob being alive. This fixes that, but required a slight refactoring to the `ui_status` proc of mechs to account for the three fundamentally different types of mobs that can pilot a mech. ## Why It's Good For The Game Fixes #88933 ## Changelog 🆑 fix: Corpses at the pilot seat of mechs can no longer toggle the lights, safeties, cabin sealing, strafing, overclocking, or durand shields, nor can they rename the mech or configure its equipment. /🆑
78 lines
2.4 KiB
Plaintext
78 lines
2.4 KiB
Plaintext
/obj/vehicle/sealed/mecha/phazon
|
|
desc = "This is a Phazon exosuit. The pinnacle of scientific research and pride of Nanotrasen, it uses cutting edge anomalous technology and expensive materials."
|
|
name = "\improper Phazon"
|
|
icon_state = "phazon"
|
|
base_icon_state = "phazon"
|
|
movedelay = 2
|
|
step_energy_drain = 4
|
|
max_integrity = 200
|
|
armor_type = /datum/armor/mecha_phazon
|
|
max_temperature = 25000
|
|
accesses = list(ACCESS_MECH_SCIENCE, ACCESS_MECH_SECURITY)
|
|
destruction_sleep_duration = 40
|
|
exit_delay = 40
|
|
wreckage = /obj/structure/mecha_wreckage/phazon
|
|
mech_type = EXOSUIT_MODULE_PHAZON
|
|
force = 15
|
|
max_equip_by_category = list(
|
|
MECHA_L_ARM = 1,
|
|
MECHA_R_ARM = 1,
|
|
MECHA_UTILITY = 3,
|
|
MECHA_POWER = 1,
|
|
MECHA_ARMOR = 2,
|
|
)
|
|
phase_state = "phazon-phase"
|
|
|
|
/datum/armor/mecha_phazon
|
|
melee = 30
|
|
bullet = 30
|
|
laser = 30
|
|
energy = 30
|
|
bomb = 30
|
|
fire = 100
|
|
acid = 100
|
|
|
|
/obj/vehicle/sealed/mecha/phazon/generate_actions()
|
|
. = ..()
|
|
initialize_passenger_action_type(/datum/action/vehicle/sealed/mecha/mech_toggle_phasing)
|
|
initialize_passenger_action_type(/datum/action/vehicle/sealed/mecha/mech_switch_damtype)
|
|
|
|
/datum/action/vehicle/sealed/mecha/mech_switch_damtype
|
|
name = "Reconfigure arm microtool arrays"
|
|
button_icon_state = "mech_damtype_brute"
|
|
|
|
/datum/action/vehicle/sealed/mecha/mech_switch_damtype/Trigger(trigger_flags)
|
|
if(!..())
|
|
return
|
|
if(!chassis || !(owner in chassis.occupants))
|
|
return
|
|
var/new_damtype
|
|
switch(chassis.damtype)
|
|
if(TOX)
|
|
new_damtype = BRUTE
|
|
chassis.balloon_alert(owner, "your punches will now deal brute damage")
|
|
if(BRUTE)
|
|
new_damtype = BURN
|
|
chassis.balloon_alert(owner, "your punches will now deal burn damage")
|
|
if(BURN)
|
|
new_damtype = TOX
|
|
chassis.balloon_alert(owner,"your punches will now deal toxin damage")
|
|
chassis.damtype = new_damtype
|
|
button_icon_state = "mech_damtype_[new_damtype]"
|
|
playsound(chassis, 'sound/vehicles/mecha/mechmove01.ogg', 50, TRUE)
|
|
build_all_button_icons()
|
|
|
|
/datum/action/vehicle/sealed/mecha/mech_toggle_phasing
|
|
name = "Toggle Phasing"
|
|
button_icon_state = "mech_phasing_off"
|
|
|
|
/datum/action/vehicle/sealed/mecha/mech_toggle_phasing/Trigger(trigger_flags)
|
|
if(!..())
|
|
return
|
|
if(!chassis || !(owner in chassis.occupants))
|
|
return
|
|
chassis.phasing = chassis.phasing ? "" : "phasing"
|
|
button_icon_state = "mech_phasing_[chassis.phasing ? "on" : "off"]"
|
|
chassis.balloon_alert(owner, "[chassis.phasing ? "enabled" : "disabled"] phasing")
|
|
build_all_button_icons()
|