mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
Mech Balance V2 (#43055)
* mechs have exit times, sleep pilot on death * fixes edge case on mech destruction * Revert "Update code/game/mecha/mecha.dm" This reverts commit a4c466f3ab157ebbd6beb336d2851eccfa9753d3. * Update code/game/mecha/mecha.dm Co-Authored-By: py01 <pyronetics01@gmail.com> * trying to fix giant diff * Update mecha.dm * readds changes to mecha.dm
This commit is contained in:
@@ -4,3 +4,5 @@
|
||||
internal_damage_threshold = 50
|
||||
armor = list("melee" = 30, "bullet" = 30, "laser" = 15, "energy" = 20, "bomb" = 20, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
mouse_pointer = 'icons/mecha/mecha_mouse.dmi'
|
||||
destruction_sleep_duration = 40
|
||||
exit_delay = 40
|
||||
@@ -27,6 +27,7 @@
|
||||
internals_req_access = list(ACCESS_SYNDICATE)
|
||||
wreckage = /obj/structure/mecha_wreckage/gygax/dark
|
||||
max_equip = 4
|
||||
destruction_sleep_duration = 20
|
||||
|
||||
/obj/mecha/combat/gygax/dark/loaded/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
internals_req_access = list(ACCESS_SYNDICATE)
|
||||
wreckage = /obj/structure/mecha_wreckage/mauler
|
||||
max_equip = 5
|
||||
destruction_sleep_duration = 20
|
||||
|
||||
/obj/mecha/combat/marauder/mauler/loaded/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -80,6 +80,8 @@
|
||||
return 0
|
||||
if(energy_drain && !chassis.has_charge(energy_drain))
|
||||
return 0
|
||||
if(chassis.is_currently_ejecting)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/action(atom/target)
|
||||
|
||||
@@ -84,9 +84,12 @@
|
||||
var/silicon_pilot = FALSE //set to true if an AI or MMI is piloting.
|
||||
|
||||
var/enter_delay = 40 //Time taken to enter the mech
|
||||
var/exit_delay = 20 //Time to exit mech
|
||||
var/destruction_sleep_duration = 20 //Time that mech pilot is put to sleep for if mech is destroyed
|
||||
var/enclosed = TRUE //Set to false for open-cockpit mechs
|
||||
var/silicon_icon_state = null //if the mech has a different icon when piloted by an AI or MMI
|
||||
|
||||
var/is_currently_ejecting = FALSE //Mech cannot use equiptment when true, set to true if pilot is trying to exit mech
|
||||
|
||||
//Action datums
|
||||
var/datum/action/innate/mecha/mech_eject/eject_action = new
|
||||
var/datum/action/innate/mecha/mech_toggle_internals/internals_action = new
|
||||
@@ -162,6 +165,8 @@
|
||||
return cell
|
||||
|
||||
/obj/mecha/Destroy()
|
||||
if(occupant)
|
||||
occupant.SetSleeping(destruction_sleep_duration)
|
||||
go_out()
|
||||
var/mob/living/silicon/ai/AI
|
||||
for(var/mob/M in src) //Let's just be ultra sure
|
||||
@@ -171,8 +176,6 @@
|
||||
else
|
||||
M.forceMove(loc)
|
||||
if(wreckage)
|
||||
if(prob(30))
|
||||
explosion(get_turf(src), 0, 0, 1, 3)
|
||||
var/obj/structure/mecha_wreckage/WR = new wreckage(loc, AI)
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/E in equipment)
|
||||
if(E.salvageable && prob(30))
|
||||
@@ -451,6 +454,8 @@
|
||||
return
|
||||
if(completely_disabled)
|
||||
return
|
||||
if(is_currently_ejecting)
|
||||
return
|
||||
if(phasing)
|
||||
occupant_message("Unable to interact with objects while phasing")
|
||||
return
|
||||
|
||||
@@ -44,7 +44,14 @@
|
||||
return
|
||||
if(!chassis || chassis.occupant != owner)
|
||||
return
|
||||
chassis.go_out()
|
||||
chassis.is_currently_ejecting = TRUE
|
||||
to_chat(owner, "<span class='notice'>You begin the ejection procedure. Equipment is disabled during this process. Hold still to finish ejecting.<span>")
|
||||
if(do_after(chassis.occupant,chassis.exit_delay, target = chassis))
|
||||
to_chat(owner, "<span class='notice'>You exit the mech.<span>")
|
||||
chassis.go_out()
|
||||
else
|
||||
to_chat(owner, "<span class='notice'>You stop exiting the mech. Weapons are enabled again.<span>")
|
||||
chassis.is_currently_ejecting = FALSE
|
||||
|
||||
|
||||
/datum/action/innate/mecha/mech_toggle_internals
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
var/hides = 0
|
||||
enclosed = FALSE //Normal ripley has an open cockpit design
|
||||
enter_delay = 10 //can enter in a quarter of the time of other mechs
|
||||
exit_delay = 10
|
||||
opacity = FALSE //Ripley has a window
|
||||
|
||||
/obj/mecha/working/ripley/Move()
|
||||
|
||||
Reference in New Issue
Block a user