mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
mech counterplay ahoy
This commit is contained in:
@@ -76,6 +76,9 @@
|
|||||||
return 0
|
return 0
|
||||||
if(energy_drain && !chassis.has_charge(energy_drain))
|
if(energy_drain && !chassis.has_charge(energy_drain))
|
||||||
return 0
|
return 0
|
||||||
|
if(chassis.equipment_disabled)
|
||||||
|
to_chat(chassis.occupant, "<span=warn>Error -- Equipment control unit is unresponsive.</span>")
|
||||||
|
return 0
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/proc/action(atom/target)
|
/obj/item/mecha_parts/mecha_equipment/proc/action(atom/target)
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
var/last_message = 0
|
var/last_message = 0
|
||||||
var/add_req_access = 1
|
var/add_req_access = 1
|
||||||
var/maint_access = 0
|
var/maint_access = 0
|
||||||
|
var/equipment_disabled = 0 //disabled due to EMP
|
||||||
var/dna_lock //dna-locking the mech
|
var/dna_lock //dna-locking the mech
|
||||||
var/list/proc_res = list() //stores proc owners, like proc_res["functionname"] = owner reference
|
var/list/proc_res = list() //stores proc owners, like proc_res["functionname"] = owner reference
|
||||||
var/datum/effect_system/spark_spread/spark_system = new
|
var/datum/effect_system/spark_spread/spark_system = new
|
||||||
@@ -143,7 +144,6 @@
|
|||||||
diag_hud_set_mechhealth()
|
diag_hud_set_mechhealth()
|
||||||
diag_hud_set_mechcell()
|
diag_hud_set_mechcell()
|
||||||
diag_hud_set_mechstat()
|
diag_hud_set_mechstat()
|
||||||
diag_hud_set_mechtracking()
|
|
||||||
|
|
||||||
/obj/mecha/get_cell()
|
/obj/mecha/get_cell()
|
||||||
return cell
|
return cell
|
||||||
@@ -205,6 +205,15 @@
|
|||||||
GLOB.mechas_list -= src //global mech list
|
GLOB.mechas_list -= src //global mech list
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
|
/obj/mecha/proc/restore_equipment()
|
||||||
|
equipment_disabled = 0
|
||||||
|
if(istype(src, /obj/mecha/combat))
|
||||||
|
mouse_pointer = 'icons/mecha/mecha_mouse.dmi'
|
||||||
|
if(occupant)
|
||||||
|
SEND_SOUND(occupant, sound('sound/items/timer.ogg', volume=50))
|
||||||
|
to_chat(occupant, "<span=notice>Equipment control unit has been rebooted successfuly.</span>")
|
||||||
|
occupant.update_mouse_pointer()
|
||||||
|
|
||||||
/obj/mecha/CheckParts(list/parts_list)
|
/obj/mecha/CheckParts(list/parts_list)
|
||||||
..()
|
..()
|
||||||
cell = locate(/obj/item/stock_parts/cell) in contents
|
cell = locate(/obj/item/stock_parts/cell) in contents
|
||||||
@@ -394,8 +403,6 @@
|
|||||||
diag_hud_set_mechhealth()
|
diag_hud_set_mechhealth()
|
||||||
diag_hud_set_mechcell()
|
diag_hud_set_mechcell()
|
||||||
diag_hud_set_mechstat()
|
diag_hud_set_mechstat()
|
||||||
diag_hud_set_mechtracking()
|
|
||||||
|
|
||||||
|
|
||||||
/obj/mecha/proc/drop_item()//Derpfix, but may be useful in future for engineering exosuits.
|
/obj/mecha/proc/drop_item()//Derpfix, but may be useful in future for engineering exosuits.
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
var/obj/mecha/M = new result(drop_location())
|
var/obj/mecha/M = new result(drop_location())
|
||||||
QDEL_NULL(M.cell)
|
QDEL_NULL(M.cell)
|
||||||
|
|
||||||
var/atom/parent_atom = parent
|
var/obj/item/mecha_parts/chassis/parent_chassis = parent
|
||||||
M.CheckParts(parent_atom.contents)
|
M.CheckParts(parent_chassis.contents)
|
||||||
|
|
||||||
SSblackbox.record_feedback("tally", "mechas_created", 1, M.name)
|
SSblackbox.record_feedback("tally", "mechas_created", 1, M.name)
|
||||||
QDEL_NULL(parent)
|
QDEL_NULL(parent)
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
if(answer)
|
if(answer)
|
||||||
dat += {"<hr>[answer]<br/>
|
dat += {"<hr>[answer]<br/>
|
||||||
<a href='?src=[REF(src)];send_message=[REF(TR)]'>Send message</a><br/>
|
<a href='?src=[REF(src)];send_message=[REF(TR)]'>Send message</a><br/>
|
||||||
<a href='?src=[REF(src)];get_log=[REF(TR)]'>Show exosuit log</a> | <a style='color: #f00;' href='?src=[REF(src)];shock=[REF(TR)]'>(EMP pulse)</a><br>"}
|
[TR.recharging?"Recharging EMP Pulse...<br>":"<a style='color: #f00;' href='?src=[REF(src)];shock=[REF(TR)]'>(EMP Pulse)</a><br>"]"}
|
||||||
|
|
||||||
if(screen==1)
|
if(screen==1)
|
||||||
dat += "<h3>Log contents</h3>"
|
dat += "<h3>Log contents</h3>"
|
||||||
@@ -65,6 +65,7 @@
|
|||||||
icon_state = "motion2"
|
icon_state = "motion2"
|
||||||
w_class = WEIGHT_CLASS_SMALL
|
w_class = WEIGHT_CLASS_SMALL
|
||||||
var/ai_beacon = FALSE //If this beacon allows for AI control. Exists to avoid using istype() on checking.
|
var/ai_beacon = FALSE //If this beacon allows for AI control. Exists to avoid using istype() on checking.
|
||||||
|
var/recharging = 0
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_tracking/proc/get_mecha_info()
|
/obj/item/mecha_parts/mecha_tracking/proc/get_mecha_info()
|
||||||
if(!in_mecha())
|
if(!in_mecha())
|
||||||
@@ -102,10 +103,16 @@
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_tracking/proc/shock()
|
/obj/item/mecha_parts/mecha_tracking/proc/shock()
|
||||||
|
if(recharging)
|
||||||
|
return
|
||||||
var/obj/mecha/M = in_mecha()
|
var/obj/mecha/M = in_mecha()
|
||||||
if(M)
|
if(M)
|
||||||
M.emp_act(EMP_LIGHT)
|
M.emp_act(EMP_HEAVY)
|
||||||
qdel(src)
|
addtimer(CALLBACK(src, /obj/item/mecha_parts/mecha_tracking/proc/recharge), 5 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)
|
||||||
|
recharging = 1
|
||||||
|
|
||||||
|
/obj/item/mecha_parts/mecha_tracking/proc/recharge()
|
||||||
|
recharging = 0
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_tracking/proc/get_mecha_log()
|
/obj/item/mecha_parts/mecha_tracking/proc/get_mecha_log()
|
||||||
if(!ismecha(loc))
|
if(!ismecha(loc))
|
||||||
|
|||||||
@@ -149,7 +149,14 @@
|
|||||||
use_power((cell.charge/3)/(severity*2))
|
use_power((cell.charge/3)/(severity*2))
|
||||||
take_damage(30 / severity, BURN, "energy", 1)
|
take_damage(30 / severity, BURN, "energy", 1)
|
||||||
log_message("EMP detected", color="red")
|
log_message("EMP detected", color="red")
|
||||||
check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),1)
|
|
||||||
|
if(istype(src, /obj/mecha/combat))
|
||||||
|
mouse_pointer = 'icons/mecha/mecha_mouse-disable.dmi'
|
||||||
|
occupant?.update_mouse_pointer()
|
||||||
|
if(!equipment_disabled && occupant) //prevent spamming this message with back-to-back EMPs
|
||||||
|
to_chat(occupant, "<span=danger>Error -- Connection to equipment control unit has been lost.</span>")
|
||||||
|
addtimer(CALLBACK(src, /obj/mecha/proc/restore_equipment), 3 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)
|
||||||
|
equipment_disabled = 1
|
||||||
|
|
||||||
/obj/mecha/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
/obj/mecha/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||||
if(exposed_temperature>max_temperature)
|
if(exposed_temperature>max_temperature)
|
||||||
|
|||||||
@@ -1,8 +1,3 @@
|
|||||||
/obj/mecha/medical/Initialize()
|
|
||||||
. = ..()
|
|
||||||
trackers += new /obj/item/mecha_parts/mecha_tracking(src)
|
|
||||||
|
|
||||||
|
|
||||||
/obj/mecha/medical/mechturn(direction)
|
/obj/mecha/medical/mechturn(direction)
|
||||||
setDir(direction)
|
setDir(direction)
|
||||||
playsound(src,'sound/mecha/mechmove01.ogg',40,1)
|
playsound(src,'sound/mecha/mechmove01.ogg',40,1)
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
/obj/mecha/working
|
/obj/mecha/working
|
||||||
internal_damage_threshold = 60
|
internal_damage_threshold = 60
|
||||||
|
|
||||||
/obj/mecha/working/Initialize()
|
|
||||||
. = ..()
|
|
||||||
trackers += new /obj/item/mecha_parts/mecha_tracking(src)
|
|
||||||
|
|||||||
BIN
icons/mecha/mecha_mouse-disable.dmi
Normal file
BIN
icons/mecha/mecha_mouse-disable.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 580 B |
Reference in New Issue
Block a user