Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Ghommie-cit229
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
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'
|
||||
var/spawn_tracked = TRUE
|
||||
|
||||
/obj/mecha/combat/Initialize()
|
||||
. = ..()
|
||||
if(spawn_tracked)
|
||||
trackers += new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
/obj/mecha/combat/proc/max_ammo() //Max the ammo stored for Nuke Ops mechs, or anyone else that calls this
|
||||
for(var/obj/item/I in equipment)
|
||||
if(istype(I, /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/))
|
||||
var/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/gun = I
|
||||
gun.projectiles_cache = gun.projectiles_cache_max
|
||||
@@ -30,7 +30,6 @@
|
||||
internals_req_access = list(ACCESS_SYNDICATE)
|
||||
wreckage = /obj/structure/mecha_wreckage/gygax/dark
|
||||
max_equip = 4
|
||||
spawn_tracked = FALSE
|
||||
|
||||
/obj/mecha/combat/gygax/dark/loaded/Initialize()
|
||||
. = ..()
|
||||
@@ -42,6 +41,7 @@
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay
|
||||
ME.attach(src)
|
||||
max_ammo()
|
||||
|
||||
/obj/mecha/combat/gygax/dark/add_cell(obj/item/stock_parts/cell/C=null)
|
||||
if(C)
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
force = 45
|
||||
max_equip = 4
|
||||
bumpsmash = 1
|
||||
spawn_tracked = FALSE
|
||||
|
||||
/obj/mecha/combat/marauder/GrantActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
@@ -41,6 +40,7 @@
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster(src)
|
||||
ME.attach(src)
|
||||
max_ammo()
|
||||
|
||||
/obj/mecha/combat/marauder/seraph
|
||||
desc = "Heavy-duty, command-type exosuit. This is a custom model, utilized only by high-ranking military personnel."
|
||||
@@ -68,6 +68,7 @@
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster(src)
|
||||
ME.attach(src)
|
||||
max_ammo()
|
||||
|
||||
/obj/mecha/combat/marauder/mauler
|
||||
desc = "Heavy-duty, combat exosuit, developed off of the existing Marauder model."
|
||||
@@ -90,5 +91,6 @@
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster(src)
|
||||
ME.attach(src)
|
||||
max_ammo()
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
internals_req_access = list()
|
||||
add_req_access = 0
|
||||
wreckage = /obj/structure/mecha_wreckage/durand/neovgre
|
||||
spawn_tracked = FALSE
|
||||
|
||||
/obj/mecha/combat/neovgre/GrantActions(mob/living/user, human_occupant = 0) //No Eject action for you sonny jim, your life for Ratvar!
|
||||
internals_action.Grant(user, src)
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
stepsound = null
|
||||
turnsound = null
|
||||
opacity = 0
|
||||
spawn_tracked = FALSE
|
||||
|
||||
/obj/mecha/combat/reticence/loaded/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/critfail()
|
||||
if(chassis)
|
||||
log_message("Critical failure", color="red")
|
||||
mecha_log_message("Critical failure", color="red")
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/get_equip_info()
|
||||
if(!chassis)
|
||||
@@ -116,7 +116,7 @@
|
||||
M.equipment += src
|
||||
chassis = M
|
||||
forceMove(M)
|
||||
M.log_message("[src] initialized.")
|
||||
M.mecha_log_message("[src] initialized.")
|
||||
if(!M.selected && selectable)
|
||||
M.selected = src
|
||||
src.update_chassis_page()
|
||||
@@ -129,7 +129,7 @@
|
||||
if(chassis.selected == src)
|
||||
chassis.selected = null
|
||||
update_chassis_page()
|
||||
chassis.log_message("[src] removed from equipment.")
|
||||
chassis.mecha_log_message("[src] removed from equipment.")
|
||||
chassis = null
|
||||
set_ready_state(1)
|
||||
return
|
||||
@@ -150,18 +150,14 @@
|
||||
chassis.occupant_message("[icon2html(src, chassis.occupant)] [message]")
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/log_message(message, message_type=LOG_GAME, color=null, log_globally)
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/mecha_log_message(message, color)
|
||||
log_message(message, LOG_GAME, color) //pass to default admin logging too
|
||||
if(chassis)
|
||||
chassis.log_message("([src]) [message]", message_type, color)
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
chassis.mecha_log_message(message, color) //and pass to our chassis
|
||||
|
||||
//Used for reloading weapons/tools etc. that use some form of resource
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/rearm()
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/needs_rearm()
|
||||
return 0
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
update_equip_info()
|
||||
occupant_message("<span class='notice'>[target] successfully loaded into [src]. Life support functions engaged.</span>")
|
||||
chassis.visible_message("<span class='warning'>[chassis] loads [target] into [src].</span>")
|
||||
log_message("[target] loaded. Life support functions engaged.")
|
||||
mecha_log_message("[target] loaded. Life support functions engaged.")
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/patient_insertion_check(mob/living/carbon/target)
|
||||
if(target.buckled)
|
||||
@@ -85,7 +85,7 @@
|
||||
return
|
||||
patient.forceMove(get_turf(src))
|
||||
occupant_message("[patient] ejected. Life support functions disabled.")
|
||||
log_message("[patient] ejected. Life support functions disabled.")
|
||||
mecha_log_message("[patient] ejected. Life support functions disabled.")
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
patient = null
|
||||
update_equip_info()
|
||||
@@ -108,16 +108,17 @@
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/Topic(href,href_list)
|
||||
..()
|
||||
var/datum/topic_input/afilter = new /datum/topic_input(href,href_list)
|
||||
if(afilter.get("eject"))
|
||||
if(href_list["eject"])
|
||||
go_out()
|
||||
if(afilter.get("view_stats"))
|
||||
if(href_list["view_stats"])
|
||||
chassis.occupant << browse(get_patient_stats(),"window=msleeper")
|
||||
onclose(chassis.occupant, "msleeper")
|
||||
return
|
||||
if(afilter.get("inject"))
|
||||
inject_reagent(afilter.getType("inject", /datum/reagent),afilter.getObj("source"))
|
||||
return
|
||||
if(href_list["inject"])
|
||||
var/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/SG = locate() in chassis
|
||||
var/datum/reagent/R = locate(href_list["inject"]) in SG.reagents.reagent_list
|
||||
if (istype(R))
|
||||
inject_reagent(R, SG)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/get_patient_stats()
|
||||
if(!patient)
|
||||
@@ -193,7 +194,7 @@
|
||||
var/to_inject = min(R.volume, inject_amount)
|
||||
if(to_inject && patient.reagents.get_reagent_amount(R.type) + to_inject <= inject_amount*2)
|
||||
occupant_message("Injecting [patient] with [to_inject] units of [R.name].")
|
||||
log_message("Injecting [patient] with [to_inject] units of [R.name].")
|
||||
mecha_log_message("Injecting [patient] with [to_inject] units of [R.name].")
|
||||
log_combat(chassis.occupant, patient, "injected", "[name] ([R] - [to_inject] units)")
|
||||
SG.reagents.trans_id_to(patient,R.type,to_inject)
|
||||
update_equip_info()
|
||||
@@ -216,7 +217,7 @@
|
||||
return
|
||||
if(!chassis.has_charge(energy_drain))
|
||||
set_ready_state(1)
|
||||
log_message("Deactivated.")
|
||||
mecha_log_message("Deactivated.")
|
||||
occupant_message("[src] deactivated - no power.")
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
@@ -312,7 +313,7 @@
|
||||
mechsyringe.icon = 'icons/obj/chemical.dmi'
|
||||
mechsyringe.icon_state = "syringeproj"
|
||||
playsound(chassis, 'sound/items/syringeproj.ogg', 50, 1)
|
||||
log_message("Launched [mechsyringe] from [src], targeting [target].")
|
||||
mecha_log_message("Launched [mechsyringe] from [src], targeting [target].")
|
||||
var/mob/originaloccupant = chassis.occupant
|
||||
spawn(0)
|
||||
src = null //if src is deleted, still process the syringe
|
||||
@@ -354,19 +355,18 @@
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/Topic(href,href_list)
|
||||
..()
|
||||
var/datum/topic_input/afilter = new (href,href_list)
|
||||
if(afilter.get("toggle_mode"))
|
||||
if (href_list["toggle_mode"])
|
||||
mode = !mode
|
||||
update_equip_info()
|
||||
return
|
||||
if(afilter.get("select_reagents"))
|
||||
if (href_list["select_reagents"])
|
||||
processed_reagents.len = 0
|
||||
var/m = 0
|
||||
var/message
|
||||
for(var/i=1 to known_reagents.len)
|
||||
if(m>=synth_speed)
|
||||
break
|
||||
var/reagent = afilter.get("reagent_[i]")
|
||||
var/reagent = text2path(href_list["reagent_[i]"])
|
||||
if(reagent && (reagent in known_reagents))
|
||||
message = "[m ? ", " : null][known_reagents[reagent]]"
|
||||
processed_reagents += reagent
|
||||
@@ -375,20 +375,18 @@
|
||||
message += " added to production"
|
||||
START_PROCESSING(SSobj, src)
|
||||
occupant_message(message)
|
||||
occupant_message("Reagent processing started.")
|
||||
log_message("Reagent processing started.")
|
||||
occupant_message("<span class='notice'>Reagent processing started.</span>")
|
||||
mecha_log_message("Reagent processing started.")
|
||||
return
|
||||
if(afilter.get("show_reagents"))
|
||||
if (href_list["show_reagents"])
|
||||
chassis.occupant << browse(get_reagents_page(),"window=msyringegun")
|
||||
if(afilter.get("purge_reagent"))
|
||||
var/reagent = afilter.get("purge_reagent")
|
||||
if (href_list["purge_reagent"])
|
||||
var/reagent = href_list["purge_reagent"]
|
||||
if(reagent)
|
||||
reagents.del_reagent(reagent)
|
||||
return
|
||||
if(afilter.get("purge_all"))
|
||||
if (href_list["purge_all"])
|
||||
reagents.clear_reagents()
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/get_reagents_page()
|
||||
var/output = {"<html>
|
||||
@@ -511,7 +509,7 @@
|
||||
return
|
||||
if(!processed_reagents.len || reagents.total_volume >= reagents.maximum_volume || !chassis.has_charge(energy_drain))
|
||||
occupant_message("<span class=\"alert\">Reagent processing stopped.</a>")
|
||||
log_message("Reagent processing stopped.")
|
||||
mecha_log_message("Reagent processing stopped.")
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
var/amount = synth_speed / processed_reagents.len
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
if(do_after_cooldown(target))
|
||||
set_ready_state(FALSE)
|
||||
log_message("Started drilling [target]")
|
||||
mecha_log_message("Started drilling [target]")
|
||||
if(isturf(target))
|
||||
var/turf/T = target
|
||||
T.drill_act(src)
|
||||
@@ -61,13 +61,13 @@
|
||||
|
||||
/turf/closed/wall/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
|
||||
if(drill.do_after_mecha(src, 60 / drill.drill_level))
|
||||
drill.log_message("Drilled through [src]")
|
||||
drill.mecha_log_message("Drilled through [src]")
|
||||
dismantle_wall(TRUE, FALSE)
|
||||
|
||||
/turf/closed/wall/r_wall/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
|
||||
if(drill.drill_level >= DRILL_HARDENED)
|
||||
if(drill.do_after_mecha(src, 120 / drill.drill_level))
|
||||
drill.log_message("Drilled through [src]")
|
||||
drill.mecha_log_message("Drilled through [src]")
|
||||
dismantle_wall(TRUE, FALSE)
|
||||
else
|
||||
drill.occupant_message("<span class='danger'>[src] is too durable to drill through.</span>")
|
||||
@@ -76,14 +76,14 @@
|
||||
for(var/turf/closed/mineral/M in range(drill.chassis,1))
|
||||
if(get_dir(drill.chassis,M)&drill.chassis.dir)
|
||||
M.gets_drilled()
|
||||
drill.log_message("Drilled through [src]")
|
||||
drill.mecha_log_message("Drilled through [src]")
|
||||
drill.move_ores()
|
||||
|
||||
/turf/open/floor/plating/asteroid/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
|
||||
for(var/turf/open/floor/plating/asteroid/M in range(1, drill.chassis))
|
||||
if((get_dir(drill.chassis,M)&drill.chassis.dir) && !M.dug)
|
||||
M.getDug()
|
||||
drill.log_message("Drilled through [src]")
|
||||
drill.mecha_log_message("Drilled through [src]")
|
||||
drill.move_ores()
|
||||
|
||||
|
||||
|
||||
@@ -216,12 +216,12 @@
|
||||
if(equip_ready)
|
||||
START_PROCESSING(SSobj, src)
|
||||
droid_overlay = new(src.icon, icon_state = "repair_droid_a")
|
||||
log_message("Activated.")
|
||||
mecha_log_message("Activated.")
|
||||
set_ready_state(0)
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
droid_overlay = new(src.icon, icon_state = "repair_droid")
|
||||
log_message("Deactivated.")
|
||||
mecha_log_message("Deactivated.")
|
||||
set_ready_state(1)
|
||||
chassis.add_overlay(droid_overlay)
|
||||
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
|
||||
@@ -304,11 +304,11 @@
|
||||
if(equip_ready) //inactive
|
||||
START_PROCESSING(SSobj, src)
|
||||
set_ready_state(0)
|
||||
log_message("Activated.")
|
||||
mecha_log_message("Activated.")
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
set_ready_state(1)
|
||||
log_message("Deactivated.")
|
||||
mecha_log_message("Deactivated.")
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/get_equip_info()
|
||||
if(!chassis)
|
||||
@@ -379,11 +379,11 @@
|
||||
if(equip_ready) //inactive
|
||||
set_ready_state(0)
|
||||
START_PROCESSING(SSobj, src)
|
||||
log_message("Activated.")
|
||||
mecha_log_message("Activated.")
|
||||
else
|
||||
set_ready_state(1)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
log_message("Deactivated.")
|
||||
mecha_log_message("Deactivated.")
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/get_equip_info()
|
||||
var/output = ..()
|
||||
@@ -440,14 +440,14 @@
|
||||
return
|
||||
if(fuel.amount<=0)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
log_message("Deactivated - no fuel.")
|
||||
mecha_log_message("Deactivated - no fuel.")
|
||||
set_ready_state(1)
|
||||
return
|
||||
var/cur_charge = chassis.get_charge()
|
||||
if(isnull(cur_charge))
|
||||
set_ready_state(1)
|
||||
occupant_message("No powercell detected.")
|
||||
log_message("Deactivated.")
|
||||
mecha_log_message("Deactivated.")
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
var/use_fuel = fuel_per_cycle_idle
|
||||
|
||||
@@ -34,6 +34,19 @@
|
||||
return
|
||||
if(!cargo_holder)
|
||||
return
|
||||
if(ismecha(target))
|
||||
var/obj/mecha/M = target
|
||||
var/have_ammo
|
||||
for(var/obj/item/mecha_ammo/box in cargo_holder.cargo)
|
||||
if(istype(box, /obj/item/mecha_ammo) && box.rounds)
|
||||
have_ammo = TRUE
|
||||
if(M.ammo_resupply(box, chassis.occupant, TRUE))
|
||||
return
|
||||
if(have_ammo)
|
||||
to_chat(chassis.occupant, "No further supplies can be provided to [M].")
|
||||
else
|
||||
to_chat(chassis.occupant, "No providable supplies found in cargo hold")
|
||||
return
|
||||
if(isobj(target))
|
||||
var/obj/O = target
|
||||
if(!O.anchored)
|
||||
@@ -45,7 +58,7 @@
|
||||
O.forceMove(chassis)
|
||||
O.anchored = FALSE
|
||||
occupant_message("<span class='notice'>[target] successfully loaded.</span>")
|
||||
log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
|
||||
mecha_log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
|
||||
else
|
||||
O.anchored = initial(O.anchored)
|
||||
else
|
||||
@@ -105,7 +118,7 @@
|
||||
O.forceMove(chassis)
|
||||
O.anchored = FALSE
|
||||
occupant_message("<span class='notice'>[target] successfully loaded.</span>")
|
||||
log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
|
||||
mecha_log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
|
||||
else
|
||||
O.anchored = initial(O.anchored)
|
||||
else
|
||||
@@ -388,7 +401,7 @@
|
||||
if(href_list["toggle"])
|
||||
set_ready_state(!equip_ready)
|
||||
occupant_message("[src] [equip_ready?"dea":"a"]ctivated.")
|
||||
log_message("[equip_ready?"Dea":"A"]ctivated.")
|
||||
mecha_log_message("[equip_ready?"Dea":"A"]ctivated.")
|
||||
return
|
||||
if(href_list["cut"])
|
||||
if(cable && cable.amount)
|
||||
@@ -411,7 +424,7 @@
|
||||
if(!cable || cable.amount<1)
|
||||
set_ready_state(1)
|
||||
occupant_message("Cable depleted, [src] deactivated.")
|
||||
log_message("Cable depleted, [src] deactivated.")
|
||||
mecha_log_message("Cable depleted, [src] deactivated.")
|
||||
return
|
||||
if(cable.amount < amount)
|
||||
occupant_message("No enough cable to finish the task.")
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
/obj/item/mecha_ammo
|
||||
name = "generic ammo box"
|
||||
desc = "A box of ammo for an unknown weapon."
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
icon = 'icons/mecha/mecha_ammo.dmi'
|
||||
icon_state = "empty"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
var/rounds = 0
|
||||
var/round_term = "round"
|
||||
var/direct_load //For weapons where we re-load the weapon itself rather than adding to the ammo storage.
|
||||
var/load_audio = "sound/weapons/gun_magazine_insert_empty_1.ogg"
|
||||
var/ammo_type
|
||||
|
||||
/obj/item/mecha_ammo/proc/update_name()
|
||||
if(!rounds)
|
||||
name = "empty ammo box"
|
||||
desc = "An exosuit ammuniton box that has since been emptied. Please recycle."
|
||||
icon_state = "empty"
|
||||
|
||||
/obj/item/mecha_ammo/attack_self(mob/user)
|
||||
..()
|
||||
if(rounds)
|
||||
to_chat(user, "<span class='warning'>You cannot flatten the ammo box until it's empty!</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You fold [src] flat.</span>")
|
||||
var/I = new /obj/item/stack/sheet/metal(user.loc)
|
||||
qdel(src)
|
||||
user.put_in_hands(I)
|
||||
|
||||
/obj/item/mecha_ammo/examine(mob/user)
|
||||
. = ..()
|
||||
if(rounds)
|
||||
. += "There [rounds > 1?"are":"is"] [rounds] [round_term][rounds > 1?"s":""] left."
|
||||
|
||||
/obj/item/mecha_ammo/incendiary
|
||||
name = "incendiary ammo"
|
||||
desc = "A box of incendiary ammunition for use with exosuit weapons."
|
||||
icon_state = "incendiary"
|
||||
rounds = 24
|
||||
ammo_type = "incendiary"
|
||||
|
||||
/obj/item/mecha_ammo/scattershot
|
||||
name = "scattershot ammo"
|
||||
desc = "A box of scaled-up buckshot, for use in exosuit shotguns."
|
||||
icon_state = "scattershot"
|
||||
rounds = 40
|
||||
ammo_type = "scattershot"
|
||||
|
||||
/obj/item/mecha_ammo/lmg
|
||||
name = "machine gun ammo"
|
||||
desc = "A box of linked ammunition, designed for the Ultra AC 2 exosuit weapon."
|
||||
icon_state = "lmg"
|
||||
rounds = 300
|
||||
ammo_type = "lmg"
|
||||
|
||||
/obj/item/mecha_ammo/missiles_br
|
||||
name = "breaching missiles"
|
||||
desc = "A box of large missiles, ready for loading into a BRM-6 exosuit missile rack."
|
||||
icon_state = "missile_br"
|
||||
rounds = 6
|
||||
round_term = "missile"
|
||||
direct_load = TRUE
|
||||
load_audio = "sound/weapons/bulletinsert.ogg"
|
||||
ammo_type = "missiles_br"
|
||||
|
||||
/obj/item/mecha_ammo/missiles_he
|
||||
name = "anti-armor missiles"
|
||||
desc = "A box of large missiles, ready for loading into an SRM-8 exosuit missile rack."
|
||||
icon_state = "missile_he"
|
||||
rounds = 8
|
||||
round_term = "missile"
|
||||
direct_load = TRUE
|
||||
load_audio = "sound/weapons/bulletinsert.ogg"
|
||||
ammo_type = "missiles_he"
|
||||
|
||||
|
||||
/obj/item/mecha_ammo/flashbang
|
||||
name = "launchable flashbangs"
|
||||
desc = "A box of smooth flashbangs, for use with a large exosuit launcher. Cannot be primed by hand."
|
||||
icon_state = "flashbang"
|
||||
rounds = 6
|
||||
round_term = "grenade"
|
||||
ammo_type = "flashbang"
|
||||
|
||||
/obj/item/mecha_ammo/clusterbang
|
||||
name = "launchable flashbang clusters"
|
||||
desc = "A box of clustered flashbangs, for use with a specialized exosuit cluster launcher. Cannot be primed by hand."
|
||||
icon_state = "clusterbang"
|
||||
rounds = 3
|
||||
round_term = "cluster"
|
||||
direct_load = TRUE
|
||||
ammo_type = "clusterbang"
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
if(kickback)
|
||||
chassis.newtonian_move(turn(chassis.dir,180))
|
||||
chassis.log_message("Fired from [src.name], targeting [target].")
|
||||
chassis.mecha_log_message("Fired from [src.name], targeting [target].")
|
||||
return 1
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
else
|
||||
M.Jitter(500)
|
||||
|
||||
log_message("Honked from [src.name]. HONK!")
|
||||
mecha_log_message("Honked from [src.name]. HONK!")
|
||||
var/turf/T = get_turf(src)
|
||||
message_admins("[ADMIN_LOOKUPFLW(chassis.occupant)] used a Mecha Honker in [ADMIN_VERBOSEJMP(T)]")
|
||||
log_game("[key_name(chassis.occupant)] used a Mecha Honker in [AREACOORD(T)]")
|
||||
@@ -196,7 +196,11 @@
|
||||
name = "general ballistic weapon"
|
||||
fire_sound = 'sound/weapons/gunshot.ogg'
|
||||
var/projectiles
|
||||
var/projectiles_cache //ammo to be loaded in, if possible.
|
||||
var/projectiles_cache_max
|
||||
var/projectile_energy_cost
|
||||
var/disabledreload //For weapons with no cache (like the rockets) which are reloaded by hand
|
||||
var/ammo_type
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/get_shot_amount()
|
||||
return min(projectiles, projectiles_per_shot)
|
||||
@@ -209,19 +213,31 @@
|
||||
return 1
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/get_equip_info()
|
||||
return "[..()] \[[src.projectiles]\][(src.projectiles < initial(src.projectiles))?" - <a href='?src=[REF(src)];rearm=1'>Rearm</a>":null]"
|
||||
return "[..()] \[[src.projectiles][projectiles_cache_max &&!projectile_energy_cost?"/[projectiles_cache]":""]\][!disabledreload &&(src.projectiles < initial(src.projectiles))?" - <a href='?src=[REF(src)];rearm=1'>Rearm</a>":null]"
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/rearm()
|
||||
if(projectiles < initial(projectiles))
|
||||
var/projectiles_to_add = initial(projectiles) - projectiles
|
||||
while(chassis.get_charge() >= projectile_energy_cost && projectiles_to_add)
|
||||
projectiles++
|
||||
projectiles_to_add--
|
||||
chassis.use_power(projectile_energy_cost)
|
||||
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
|
||||
log_message("Rearmed [src.name].")
|
||||
return 1
|
||||
|
||||
if(projectile_energy_cost)
|
||||
while(chassis.get_charge() >= projectile_energy_cost && projectiles_to_add)
|
||||
projectiles++
|
||||
projectiles_to_add--
|
||||
chassis.use_power(projectile_energy_cost)
|
||||
|
||||
else
|
||||
if(!projectiles_cache)
|
||||
return FALSE
|
||||
if(projectiles_to_add <= projectiles_cache)
|
||||
projectiles = projectiles + projectiles_to_add
|
||||
projectiles_cache = projectiles_cache - projectiles_to_add
|
||||
else
|
||||
projectiles = projectiles + projectiles_cache
|
||||
projectiles_cache = 0
|
||||
|
||||
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/needs_rearm()
|
||||
@@ -249,8 +265,10 @@
|
||||
equip_cooldown = 10
|
||||
projectile = /obj/item/projectile/bullet/incendiary/fnx99
|
||||
projectiles = 24
|
||||
projectile_energy_cost = 15
|
||||
projectiles_cache = 24
|
||||
projectiles_cache_max = 96
|
||||
harmful = TRUE
|
||||
ammo_type = "incendiary"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/silenced
|
||||
name = "\improper S.H.H. \"Quietus\" Carbine"
|
||||
@@ -270,10 +288,12 @@
|
||||
equip_cooldown = 20
|
||||
projectile = /obj/item/projectile/bullet/scattershot
|
||||
projectiles = 40
|
||||
projectile_energy_cost = 25
|
||||
projectiles_cache = 40
|
||||
projectiles_cache_max = 160
|
||||
projectiles_per_shot = 4
|
||||
variance = 25
|
||||
harmful = TRUE
|
||||
ammo_type = "scattershot"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/seedscatter
|
||||
name = "\improper Melon Seed \"Scattershot\""
|
||||
@@ -282,10 +302,12 @@
|
||||
equip_cooldown = 20
|
||||
projectile = /obj/item/projectile/bullet/seed
|
||||
projectiles = 20
|
||||
projectile_energy_cost = 25
|
||||
projectiles_cache = 20
|
||||
projectiles_cache_max = 160
|
||||
projectiles_per_shot = 10
|
||||
variance = 25
|
||||
harmful = TRUE
|
||||
ammo_type = "scattershot"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg
|
||||
name = "\improper Ultra AC 2"
|
||||
@@ -294,23 +316,42 @@
|
||||
equip_cooldown = 10
|
||||
projectile = /obj/item/projectile/bullet/lmg
|
||||
projectiles = 300
|
||||
projectile_energy_cost = 20
|
||||
projectiles_cache = 300
|
||||
projectiles_cache_max = 1200
|
||||
projectiles_per_shot = 3
|
||||
variance = 6
|
||||
randomspread = 1
|
||||
projectile_delay = 2
|
||||
harmful = TRUE
|
||||
ammo_type = "lmg"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack
|
||||
name = "\improper SRM-8 missile rack"
|
||||
desc = "A weapon for combat exosuits. Shoots light explosive missiles."
|
||||
desc = "A weapon for combat exosuits. Launches light explosive missiles."
|
||||
icon_state = "mecha_missilerack"
|
||||
projectile = /obj/item/projectile/bullet/a84mm_he
|
||||
fire_sound = 'sound/weapons/grenadelaunch.ogg'
|
||||
projectiles = 8
|
||||
projectile_energy_cost = 1000
|
||||
projectiles_cache = 0
|
||||
projectiles_cache_max = 0
|
||||
disabledreload = TRUE
|
||||
equip_cooldown = 60
|
||||
harmful = TRUE
|
||||
ammo_type = "missiles_he"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/breaching
|
||||
name = "\improper BRM-6 missile rack"
|
||||
desc = "A weapon for combat exosuits. Launches low-explosive breaching missiles designed to explode only when striking a sturdy target."
|
||||
icon_state = "mecha_missilerack_six"
|
||||
projectile = /obj/item/projectile/bullet/a84mm_br
|
||||
fire_sound = 'sound/weapons/grenadelaunch.ogg'
|
||||
projectiles = 6
|
||||
projectiles_cache = 0
|
||||
projectiles_cache_max = 0
|
||||
disabledreload = TRUE
|
||||
equip_cooldown = 60
|
||||
harmful = TRUE
|
||||
ammo_type = "missiles_br"
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher
|
||||
@@ -323,7 +364,7 @@
|
||||
return
|
||||
var/obj/O = new projectile(chassis.loc)
|
||||
playsound(chassis, fire_sound, 50, 1)
|
||||
log_message("Launched a [O.name] from [name], targeting [target].")
|
||||
mecha_log_message("Launched a [O.name] from [name], targeting [target].")
|
||||
projectiles--
|
||||
proj_init(O)
|
||||
O.throw_at(target, missile_range, missile_speed, chassis.occupant, FALSE, diagonals_first = diags_first)
|
||||
@@ -341,10 +382,12 @@
|
||||
projectile = /obj/item/grenade/flashbang
|
||||
fire_sound = 'sound/weapons/grenadelaunch.ogg'
|
||||
projectiles = 6
|
||||
projectiles_cache = 6
|
||||
projectiles_cache_max = 24
|
||||
missile_speed = 1.5
|
||||
projectile_energy_cost = 800
|
||||
equip_cooldown = 60
|
||||
var/det_time = 20
|
||||
ammo_type = "flashbang"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/proj_init(var/obj/item/grenade/flashbang/F)
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -356,9 +399,12 @@
|
||||
name = "\improper SOB-3 grenade launcher"
|
||||
desc = "A weapon for combat exosuits. Launches primed clusterbangs. You monster."
|
||||
projectiles = 3
|
||||
projectiles_cache = 0
|
||||
projectiles_cache_max = 0
|
||||
disabledreload = TRUE
|
||||
projectile = /obj/item/grenade/clusterbuster
|
||||
projectile_energy_cost = 1600 //getting off cheap seeing as this is 3 times the flashbangs held in the grenade launcher.
|
||||
equip_cooldown = 90
|
||||
ammo_type = "clusterbang"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar
|
||||
name = "banana mortar"
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
"H.O.N.K",
|
||||
"Phazon",
|
||||
"Exosuit Equipment",
|
||||
"Exosuit Ammunition",
|
||||
"Cyborg Upgrade Modules",
|
||||
"Misc"
|
||||
)
|
||||
@@ -321,9 +322,8 @@
|
||||
/obj/machinery/mecha_part_fabricator/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
var/datum/topic_input/afilter = new /datum/topic_input(href,href_list)
|
||||
if(href_list["part_set"])
|
||||
var/tpart_set = afilter.getStr("part_set")
|
||||
var/tpart_set = href_list["part_set"]
|
||||
if(tpart_set)
|
||||
if(tpart_set=="clear")
|
||||
part_set = null
|
||||
@@ -331,7 +331,7 @@
|
||||
part_set = tpart_set
|
||||
screen = "parts"
|
||||
if(href_list["part"])
|
||||
var/T = afilter.getStr("part")
|
||||
var/T = href_list["part"]
|
||||
for(var/v in stored_research.researched_designs)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(v)
|
||||
if(D.build_type & MECHFAB)
|
||||
@@ -342,7 +342,7 @@
|
||||
add_to_queue(D)
|
||||
break
|
||||
if(href_list["add_to_queue"])
|
||||
var/T = afilter.getStr("add_to_queue")
|
||||
var/T = href_list["add_to_queue"]
|
||||
for(var/v in stored_research.researched_designs)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(v)
|
||||
if(D.build_type & MECHFAB)
|
||||
@@ -351,10 +351,10 @@
|
||||
break
|
||||
return update_queue_on_page()
|
||||
if(href_list["remove_from_queue"])
|
||||
remove_from_queue(afilter.getNum("remove_from_queue"))
|
||||
remove_from_queue(text2num(href_list["remove_from_queue"]))
|
||||
return update_queue_on_page()
|
||||
if(href_list["partset_to_queue"])
|
||||
add_part_set_to_queue(afilter.get("partset_to_queue"))
|
||||
add_part_set_to_queue(href_list["partset_to_queue"])
|
||||
return update_queue_on_page()
|
||||
if(href_list["process_queue"])
|
||||
spawn(0)
|
||||
@@ -368,8 +368,8 @@
|
||||
if(href_list["screen"])
|
||||
screen = href_list["screen"]
|
||||
if(href_list["queue_move"] && href_list["index"])
|
||||
var/index = afilter.getNum("index")
|
||||
var/new_index = index + afilter.getNum("queue_move")
|
||||
var/index = text2num(href_list["index"])
|
||||
var/new_index = index + text2num(href_list["queue_move"])
|
||||
if(isnum(index) && isnum(new_index) && ISINTEGER(index) && ISINTEGER(new_index))
|
||||
if(ISINRANGE(new_index,1,queue.len))
|
||||
queue.Swap(index,new_index)
|
||||
@@ -380,7 +380,7 @@
|
||||
if(href_list["sync"])
|
||||
sync()
|
||||
if(href_list["part_desc"])
|
||||
var/T = afilter.getStr("part_desc")
|
||||
var/T = href_list["part_desc"]
|
||||
for(var/v in stored_research.researched_designs)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(v)
|
||||
if(D.build_type & MECHFAB)
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
add_cell()
|
||||
START_PROCESSING(SSobj, src)
|
||||
GLOB.poi_list |= src
|
||||
log_message("[src.name] created.")
|
||||
mecha_log_message("[src.name] created.")
|
||||
GLOB.mechas_list += src //global mech list
|
||||
prepare_huds()
|
||||
for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds)
|
||||
@@ -493,7 +493,7 @@
|
||||
events.fireEvent("onMove",get_turf(src))
|
||||
if (internal_tank.disconnect()) // Something moved us and broke connection
|
||||
occupant_message("<span class='warning'>Air port connection teared off!</span>")
|
||||
log_message("Lost connection to gas port.")
|
||||
mecha_log_message("Lost connection to gas port.")
|
||||
|
||||
/obj/mecha/Process_Spacemove(var/movement_dir = 0)
|
||||
. = ..()
|
||||
@@ -822,7 +822,7 @@
|
||||
return
|
||||
if(!ishuman(user)) // no silicons or drones in mechas.
|
||||
return
|
||||
log_message("[user] tries to move in.")
|
||||
mecha_log_message("[user] tries to move in.")
|
||||
if (occupant)
|
||||
to_chat(usr, "<span class='warning'>The [name] is already occupied!</span>")
|
||||
log_append_to_last("Permission denied.")
|
||||
@@ -867,7 +867,7 @@
|
||||
return
|
||||
|
||||
/obj/mecha/proc/moved_inside(mob/living/carbon/human/H)
|
||||
if(H && H.client && H in range(1))
|
||||
if(H?.client && (H in range(1)))
|
||||
occupant = H
|
||||
H.forceMove(src)
|
||||
H.update_mouse_pointer()
|
||||
@@ -932,7 +932,7 @@
|
||||
icon_state = initial(icon_state)
|
||||
update_icon()
|
||||
setDir(dir_in)
|
||||
log_message("[mmi_as_oc] moved in as pilot.")
|
||||
mecha_log_message("[mmi_as_oc] moved in as pilot.")
|
||||
if(!internal_damage)
|
||||
SEND_SOUND(occupant, sound('sound/mecha/nominal.ogg',volume=50))
|
||||
GrantActions(brainmob)
|
||||
@@ -983,7 +983,7 @@
|
||||
var/mob/living/L = occupant
|
||||
occupant = null //we need it null when forceMove calls Exited().
|
||||
if(mob_container.forceMove(newloc))//ejecting mob container
|
||||
log_message("[mob_container] moved out.")
|
||||
mecha_log_message("[mob_container] moved out.")
|
||||
L << browse(null, "window=exosuit")
|
||||
|
||||
if(istype(mob_container, /obj/item/mmi))
|
||||
@@ -1028,10 +1028,10 @@
|
||||
to_chat(occupant, "[icon2html(src, occupant)] [message]")
|
||||
return
|
||||
|
||||
/obj/mecha/log_message(message as text, message_type=LOG_GAME, color=null, log_globally)
|
||||
/obj/mecha/proc/mecha_log_message(message, color)
|
||||
log.len++
|
||||
log[log.len] = list("time"="[STATION_TIME_TIMESTAMP("hh:mm:ss", world.time)]","date","year"="[GLOB.year_integer]","message"="[color?"<font color='[color]'>":null][message][color?"</font>":null]")
|
||||
..()
|
||||
log_message(message, LOG_GAME, color) //also do the normal admin logs I guess.
|
||||
return log.len
|
||||
|
||||
/obj/mecha/proc/log_append_to_last(message as text,red=null)
|
||||
@@ -1070,3 +1070,53 @@
|
||||
if(occupant_sight_flags)
|
||||
if(user == occupant)
|
||||
user.sight |= occupant_sight_flags
|
||||
|
||||
///////////////////////
|
||||
////// Ammo stuff /////
|
||||
///////////////////////
|
||||
|
||||
/obj/mecha/proc/ammo_resupply(var/obj/item/mecha_ammo/A, mob/user,var/fail_chat_override = FALSE)
|
||||
if(!A.rounds)
|
||||
if(!fail_chat_override)
|
||||
to_chat(user, "<span class='warning'>This box of ammo is empty!</span>")
|
||||
return FALSE
|
||||
var/ammo_needed
|
||||
var/found_gun
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/gun in equipment)
|
||||
ammo_needed = 0
|
||||
|
||||
if(istype(gun, /obj/item/mecha_parts/mecha_equipment/weapon/ballistic) && gun.ammo_type == A.ammo_type)
|
||||
found_gun = TRUE
|
||||
if(A.direct_load)
|
||||
ammo_needed = initial(gun.projectiles) - gun.projectiles
|
||||
else
|
||||
ammo_needed = gun.projectiles_cache_max - gun.projectiles_cache
|
||||
|
||||
if(ammo_needed)
|
||||
if(ammo_needed < A.rounds)
|
||||
if(A.direct_load)
|
||||
gun.projectiles = gun.projectiles + ammo_needed
|
||||
else
|
||||
gun.projectiles_cache = gun.projectiles_cache + ammo_needed
|
||||
playsound(get_turf(user),A.load_audio,50,1)
|
||||
to_chat(user, "<span class='notice'>You add [ammo_needed] [A.round_term][ammo_needed > 1?"s":""] to the [gun.name]</span>")
|
||||
A.rounds = A.rounds - ammo_needed
|
||||
A.update_name()
|
||||
return TRUE
|
||||
|
||||
else
|
||||
if(A.direct_load)
|
||||
gun.projectiles = gun.projectiles + A.rounds
|
||||
else
|
||||
gun.projectiles_cache = gun.projectiles_cache + A.rounds
|
||||
playsound(get_turf(user),A.load_audio,50,1)
|
||||
to_chat(user, "<span class='notice'>You add [A.rounds] [A.round_term][A.rounds > 1?"s":""] to the [gun.name]</span>")
|
||||
A.rounds = 0
|
||||
A.update_name()
|
||||
return TRUE
|
||||
if(!fail_chat_override)
|
||||
if(found_gun)
|
||||
to_chat(user, "<span class='notice'>You can't fit any more ammo of this type!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>None of the equipment on this exosuit can use this ammo!</span>")
|
||||
return FALSE
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
chassis.use_internal_tank = !chassis.use_internal_tank
|
||||
button_icon_state = "mech_internals_[chassis.use_internal_tank ? "on" : "off"]"
|
||||
chassis.occupant_message("Now taking air from [chassis.use_internal_tank?"internal airtank":"environment"].")
|
||||
chassis.log_message("Now taking air from [chassis.use_internal_tank?"internal airtank":"environment"].")
|
||||
chassis.mecha_log_message("Now taking air from [chassis.use_internal_tank?"internal airtank":"environment"].")
|
||||
UpdateButtonIcon()
|
||||
|
||||
/datum/action/innate/mecha/mech_cycle_equip
|
||||
@@ -114,7 +114,7 @@
|
||||
chassis.set_light(-chassis.lights_power)
|
||||
button_icon_state = "mech_lights_off"
|
||||
chassis.occupant_message("Toggled lights [chassis.lights?"on":"off"].")
|
||||
chassis.log_message("Toggled lights [chassis.lights?"on":"off"].")
|
||||
chassis.mecha_log_message("Toggled lights [chassis.lights?"on":"off"].")
|
||||
UpdateButtonIcon()
|
||||
|
||||
/datum/action/innate/mecha/mech_view_stats
|
||||
@@ -147,7 +147,7 @@
|
||||
strafe = !strafe
|
||||
|
||||
occupant_message("Toggled strafing mode [strafe?"on":"off"].")
|
||||
log_message("Toggled strafing mode [strafe?"on":"off"].")
|
||||
mecha_log_message("Toggled strafing mode [strafe?"on":"off"].")
|
||||
strafing_action.UpdateButtonIcon()
|
||||
|
||||
//////////////////////////////////////// Specific Ability Actions ///////////////////////////////////////////////
|
||||
@@ -163,7 +163,7 @@
|
||||
if(chassis.get_charge() > 0)
|
||||
chassis.thrusters_active = !chassis.thrusters_active
|
||||
button_icon_state = "mech_thrusters_[chassis.thrusters_active ? "on" : "off"]"
|
||||
chassis.log_message("Toggled thrusters.")
|
||||
chassis.mecha_log_message("Toggled thrusters.")
|
||||
chassis.occupant_message("<font color='[chassis.thrusters_active ?"blue":"red"]'>Thrusters [chassis.thrusters_active ?"en":"dis"]abled.")
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
else
|
||||
chassis.deflect_chance = initial(chassis.deflect_chance)
|
||||
chassis.occupant_message("<span class='danger'>You disable [chassis] defence mode.</span>")
|
||||
chassis.log_message("Toggled defence mode.")
|
||||
chassis.mecha_log_message("Toggled defence mode.")
|
||||
UpdateButtonIcon()
|
||||
|
||||
/datum/action/innate/mecha/mech_overload_mode
|
||||
@@ -200,7 +200,7 @@
|
||||
else
|
||||
chassis.leg_overload_mode = !chassis.leg_overload_mode
|
||||
button_icon_state = "mech_overload_[chassis.leg_overload_mode ? "on" : "off"]"
|
||||
chassis.log_message("Toggled leg actuators overload.")
|
||||
chassis.mecha_log_message("Toggled leg actuators overload.")
|
||||
if(chassis.leg_overload_mode)
|
||||
chassis.leg_overload_mode = 1
|
||||
chassis.bumpsmash = 1
|
||||
@@ -240,7 +240,7 @@
|
||||
if(owner.client)
|
||||
chassis.zoom_mode = !chassis.zoom_mode
|
||||
button_icon_state = "mech_zoom_[chassis.zoom_mode ? "on" : "off"]"
|
||||
chassis.log_message("Toggled zoom mode.")
|
||||
chassis.mecha_log_message("Toggled zoom mode.")
|
||||
chassis.occupant_message("<font color='[chassis.zoom_mode?"blue":"red"]'>Zoom mode [chassis.zoom_mode?"en":"dis"]abled.</font>")
|
||||
if(chassis.zoom_mode)
|
||||
owner.client.change_view(12)
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
|
||||
//9
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/cell,
|
||||
"key" = /obj/item/stock_parts/scanning_module,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Peripherals control module is secured."
|
||||
@@ -126,10 +126,40 @@
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "The power cell is installed."
|
||||
"desc" = "The scanner module is installed."
|
||||
),
|
||||
|
||||
//11
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/capacitor,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Scanner module is secured."
|
||||
),
|
||||
|
||||
//12
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "Capacitor is installed."
|
||||
),
|
||||
|
||||
//13
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/cell,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Capacitor is secured."
|
||||
),
|
||||
|
||||
//14
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "The power cell is installed."
|
||||
),
|
||||
|
||||
//15
|
||||
list(
|
||||
"key" = /obj/item/stack/sheet/metal,
|
||||
"amount" = 5,
|
||||
@@ -137,21 +167,21 @@
|
||||
"desc" = "The power cell is secured."
|
||||
),
|
||||
|
||||
//12
|
||||
//16
|
||||
list(
|
||||
"key" = TOOL_WRENCH,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "Internal armor is installed."
|
||||
),
|
||||
|
||||
//13
|
||||
//17
|
||||
list(
|
||||
"key" = TOOL_WELDER,
|
||||
"back_key" = TOOL_WRENCH,
|
||||
"desc" = "Internal armor is wrenched."
|
||||
),
|
||||
|
||||
//14
|
||||
//18
|
||||
list(
|
||||
"key" = /obj/item/stack/sheet/plasteel,
|
||||
"amount" = 5,
|
||||
@@ -159,14 +189,14 @@
|
||||
"desc" = "Internal armor is welded."
|
||||
),
|
||||
|
||||
//15
|
||||
//19
|
||||
list(
|
||||
"key" = TOOL_WRENCH,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "External armor is installed."
|
||||
),
|
||||
|
||||
//16
|
||||
//20
|
||||
list(
|
||||
"key" = TOOL_WELDER,
|
||||
"back_key" = TOOL_WRENCH,
|
||||
@@ -222,36 +252,56 @@
|
||||
else
|
||||
user.visible_message("[user] unfastens the peripherals control module.", "<span class='notice'>You unfasten the peripherals control module.</span>")
|
||||
if(10)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the scanner module.", "<span class='notice'>You secure the scanner module.</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the scanner module from [parent].", "<span class='notice'>You remove the scanner module from [parent].</span>")
|
||||
if(11)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs [I] to [parent].", "<span class='notice'>You install [I] to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the scanner module.", "<span class='notice'>You unfasten the scanner module.</span>")
|
||||
if(12)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures [I].", "<span class='notice'>You secure [I].</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the capacitor from [parent].", "<span class='notice'>You remove the capacitor from [parent].</span>")
|
||||
if(13)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs [I].", "<span class='notice'>You install [I].</span>")
|
||||
else
|
||||
user.visible_message("[user] unsecures the capacitor from [parent].", "<span class='notice'>You unsecure the capacitor from [parent].</span>")
|
||||
if(14)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the power cell.", "<span class='notice'>You secure the power cell.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries the power cell from [parent].", "<span class='notice'>You pry the power cell from [parent].</span>")
|
||||
if(11)
|
||||
if(15)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the internal armor layer to [parent].", "<span class='notice'>You install the internal armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the power cell.", "<span class='notice'>You unfasten the power cell.</span>")
|
||||
if(12)
|
||||
if(16)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the internal armor layer.", "<span class='notice'>You secure the internal armor layer.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries internal armor layer from [parent].", "<span class='notice'>You pry internal armor layer from [parent].</span>")
|
||||
if(13)
|
||||
if(17)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] welds the internal armor layer to [parent].", "<span class='notice'>You weld the internal armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the internal armor layer.", "<span class='notice'>You unfasten the internal armor layer.</span>")
|
||||
if(14)
|
||||
if(18)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the external reinforced armor layer to [parent].", "<span class='notice'>You install the external reinforced armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] cuts the internal armor layer from [parent].", "<span class='notice'>You cut the internal armor layer from [parent].</span>")
|
||||
if(15)
|
||||
if(19)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the external armor layer.", "<span class='notice'>You secure the external reinforced armor layer.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries external armor layer from [parent].", "<span class='notice'>You pry external armor layer from [parent].</span>")
|
||||
if(16)
|
||||
if(20)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] welds the external armor layer to [parent].", "<span class='notice'>You weld the external armor layer to [parent].</span>")
|
||||
else
|
||||
@@ -629,7 +679,7 @@
|
||||
|
||||
//9
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/cell,
|
||||
"key" = /obj/item/stock_parts/scanning_module,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Peripherals control module is secured."
|
||||
@@ -639,10 +689,40 @@
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "The power cell is installed."
|
||||
"desc" = "The scanner module is installed."
|
||||
),
|
||||
|
||||
//11
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/capacitor,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "The scanner module is secured."
|
||||
),
|
||||
|
||||
//12
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "The capacitor is installed."
|
||||
),
|
||||
|
||||
//13
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/cell,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "The capacitor is secured."
|
||||
),
|
||||
|
||||
//14
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "The power cell is installed."
|
||||
),
|
||||
|
||||
//15
|
||||
list(
|
||||
"key" = /obj/item/stack/sheet/plasteel,
|
||||
"amount" = 5,
|
||||
@@ -650,21 +730,21 @@
|
||||
"desc" = "The power cell is secured."
|
||||
),
|
||||
|
||||
//12
|
||||
//16
|
||||
list(
|
||||
"key" = TOOL_WRENCH,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "Internal armor is installed."
|
||||
),
|
||||
|
||||
//13
|
||||
//17
|
||||
list(
|
||||
"key" = TOOL_WELDER,
|
||||
"back_key" = TOOL_WRENCH,
|
||||
"desc" = "Internal armor is wrenched."
|
||||
),
|
||||
|
||||
//14
|
||||
//18
|
||||
list(
|
||||
"key" = /obj/item/stack/sheet/plasteel,
|
||||
"amount" = 5,
|
||||
@@ -672,7 +752,7 @@
|
||||
"desc" = "Internal armor is welded."
|
||||
),
|
||||
|
||||
//15
|
||||
//19
|
||||
list(
|
||||
"key" = /obj/item/stack/sheet/plasteel,
|
||||
"amount" = 5,
|
||||
@@ -680,14 +760,14 @@
|
||||
"desc" = "External armor is being installed."
|
||||
),
|
||||
|
||||
//16
|
||||
//20
|
||||
list(
|
||||
"key" = TOOL_WRENCH,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "External armor is installed."
|
||||
),
|
||||
|
||||
//17
|
||||
//21
|
||||
list(
|
||||
"key" = TOOL_WELDER,
|
||||
"back_key" = TOOL_WRENCH,
|
||||
@@ -744,41 +824,61 @@
|
||||
else
|
||||
user.visible_message("[user] unfastens the peripherals control module.", "<span class='notice'>You unfasten the peripherals control module.</span>")
|
||||
if(10)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the scanner module.", "<span class='notice'>You secure the scanner module.</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the scanner module from [parent].", "<span class='notice'>You remove the scanner module from [parent].</span>")
|
||||
if(12)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs [I] to [parent].", "<span class='notice'>You install [I] to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the scanner module.", "<span class='notice'>You unfasten the scanner module.</span>")
|
||||
if(13)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the capacitor.", "<span class='notice'>You secure the capacitor.</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the capacitor from [parent].", "<span class='notice'>You remove the capacitor from [parent].</span>")
|
||||
if(14)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs [I] into [parent].", "<span class='notice'>You install [I] into [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the capacitor.", "<span class='notice'>You unfasten the capacitor.</span>")
|
||||
if(15)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the power cell.", "<span class='notice'>You secure the power cell.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries the power cell from [parent].", "<span class='notice'>You pry the power cell from [parent].</span>")
|
||||
if(11)
|
||||
if(16)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the internal armor layer to [parent].", "<span class='notice'>You install the internal armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the power cell.", "<span class='notice'>You unfasten the power cell.</span>")
|
||||
if(12)
|
||||
if(17)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the internal armor layer.", "<span class='notice'>You secure the internal armor layer.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries internal armor layer from [parent].", "<span class='notice'>You pry internal armor layer from [parent].</span>")
|
||||
if(13)
|
||||
if(18)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] welds the internal armor layer to [parent].", "<span class='notice'>You weld the internal armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the internal armor layer.", "<span class='notice'>You unfasten the internal armor layer.</span>")
|
||||
if(14)
|
||||
if(19)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] starts to install the external armor layer to [parent].", "<span class='notice'>You install the external armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] cuts the internal armor layer from [parent].", "<span class='notice'>You cut the internal armor layer from [parent].</span>")
|
||||
if(15)
|
||||
if(20)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the external reinforced armor layer to [parent].", "<span class='notice'>You install the external reinforced armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the external armor from [parent].", "<span class='notice'>You remove the external armor from [parent].</span>")
|
||||
if(16)
|
||||
if(21)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the external armor layer.", "<span class='notice'>You secure the external reinforced armor layer.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries external armor layer from [parent].", "<span class='notice'>You pry external armor layer from [parent].</span>")
|
||||
if(17)
|
||||
if(22)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] welds the external armor layer to [parent].", "<span class='notice'>You weld the external armor layer to [parent].</span>")
|
||||
else
|
||||
@@ -796,6 +896,7 @@
|
||||
/obj/item/mecha_parts/part/honker_head
|
||||
)
|
||||
|
||||
|
||||
/datum/component/construction/mecha/honker
|
||||
result = /obj/mecha/combat/honker
|
||||
steps = list(
|
||||
@@ -837,41 +938,70 @@
|
||||
"key" = /obj/item/bikehorn
|
||||
),
|
||||
|
||||
//6
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/scanning_module,
|
||||
"action" = ITEM_MOVE_INSIDE
|
||||
),
|
||||
|
||||
//8
|
||||
list(
|
||||
"key" = /obj/item/bikehorn
|
||||
),
|
||||
|
||||
//9
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/capacitor,
|
||||
"action" = ITEM_MOVE_INSIDE
|
||||
),
|
||||
|
||||
//10
|
||||
list(
|
||||
"key" = /obj/item/bikehorn
|
||||
),
|
||||
|
||||
//11
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/cell,
|
||||
"action" = ITEM_MOVE_INSIDE
|
||||
),
|
||||
|
||||
//9
|
||||
//12
|
||||
list(
|
||||
"key" = /obj/item/bikehorn
|
||||
),
|
||||
|
||||
//10
|
||||
//13
|
||||
list(
|
||||
"key" = /obj/item/clothing/mask/gas/clown_hat,
|
||||
"action" = ITEM_DELETE
|
||||
),
|
||||
|
||||
//11
|
||||
//14
|
||||
list(
|
||||
"key" = /obj/item/bikehorn
|
||||
),
|
||||
|
||||
//12
|
||||
//15
|
||||
list(
|
||||
"key" = /obj/item/clothing/shoes/clown_shoes,
|
||||
"action" = ITEM_DELETE
|
||||
),
|
||||
|
||||
//13
|
||||
//16
|
||||
list(
|
||||
"key" = /obj/item/bikehorn
|
||||
),
|
||||
)
|
||||
|
||||
// HONK doesn't have any construction step icons, so we just set an icon once.
|
||||
/datum/component/construction/mecha/honker/update_parent(step_index)
|
||||
if(step_index == 1)
|
||||
var/atom/parent_atom = parent
|
||||
parent_atom.icon = 'icons/mecha/mech_construct.dmi'
|
||||
parent_atom.icon_state = "honker_chassis"
|
||||
..()
|
||||
// HONK doesn't have any construction step icons, so we just set an icon once.
|
||||
/datum/component/construction/mecha/honker/update_parent(step_index)
|
||||
if(step_index == 1)
|
||||
var/atom/parent_atom = parent
|
||||
@@ -898,8 +1028,12 @@
|
||||
if(8)
|
||||
user.visible_message("[user] installs [I] into [parent].", "<span class='notice'>You install [I] into [parent].</span>")
|
||||
if(10)
|
||||
user.visible_message("[user] puts [I] on [parent].", "<span class='notice'>You put [I] on [parent].</span>")
|
||||
user.visible_message("[user] installs [I] into [parent].", "<span class='notice'>You install [I] into [parent].</span>")
|
||||
if(12)
|
||||
user.visible_message("[user] installs [I] into [parent].", "<span class='notice'>You install [I] into [parent].</span>")
|
||||
if(14)
|
||||
user.visible_message("[user] puts [I] on [parent].", "<span class='notice'>You put [I] on [parent].</span>")
|
||||
if(16)
|
||||
user.visible_message("[user] puts [I] on [parent].", "<span class='notice'>You put [I] on [parent].</span>")
|
||||
return TRUE
|
||||
|
||||
@@ -1626,10 +1760,9 @@
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "Peripherals control module is installed."
|
||||
),
|
||||
|
||||
//9
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/cell,
|
||||
"key" = /obj/item/stock_parts/scanning_module,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Peripherals control module is secured."
|
||||
@@ -1639,10 +1772,40 @@
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "The power cell is installed."
|
||||
"desc" = "Scanner module is installed."
|
||||
),
|
||||
|
||||
//11
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/capacitor,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Scanner module is secured."
|
||||
),
|
||||
|
||||
//12
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "Capacitor is installed."
|
||||
),
|
||||
|
||||
//13
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/cell,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Capacitor is secured."
|
||||
),
|
||||
|
||||
//11
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "The power cell is installed."
|
||||
),
|
||||
|
||||
//12
|
||||
list(
|
||||
"key" = /obj/item/stack/sheet/metal,
|
||||
"amount" = 5,
|
||||
@@ -1650,21 +1813,21 @@
|
||||
"desc" = "The power cell is secured."
|
||||
),
|
||||
|
||||
//12
|
||||
//13
|
||||
list(
|
||||
"key" = TOOL_WRENCH,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "Internal armor is installed."
|
||||
),
|
||||
|
||||
//13
|
||||
//14
|
||||
list(
|
||||
"key" = TOOL_WELDER,
|
||||
"back_key" = TOOL_WRENCH,
|
||||
"desc" = "Internal armor is wrenched."
|
||||
),
|
||||
|
||||
//14
|
||||
//15
|
||||
list(
|
||||
"key" = /obj/item/stack/sheet/plasteel,
|
||||
"amount" = 5,
|
||||
@@ -1672,14 +1835,14 @@
|
||||
"desc" = "Internal armor is welded."
|
||||
),
|
||||
|
||||
//15
|
||||
//16
|
||||
list(
|
||||
"key" = TOOL_WRENCH,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "External armor is installed."
|
||||
),
|
||||
|
||||
//16
|
||||
//17
|
||||
list(
|
||||
"key" = TOOL_WELDER,
|
||||
"back_key" = TOOL_WRENCH,
|
||||
@@ -1736,36 +1899,56 @@
|
||||
else
|
||||
user.visible_message("[user] unfastens the peripherals control module.", "<span class='notice'>You unfasten the peripherals control module.</span>")
|
||||
if(10)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the scanner module.", "<span class='notice'>You secure the scanner module.</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the scanner module from [parent].", "<span class='notice'>You remove the scanner module from [parent].</span>")
|
||||
if(11)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs [I] to [parent].", "<span class='notice'>You install [I] to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the scanner module.", "<span class='notice'>You unfasten the scanner module.</span>")
|
||||
if(12)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the capacitor.", "<span class='notice'>You secure the capacitor.</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the capacitor from [parent].", "<span class='notice'>You remove the capacitor from [parent].</span>")
|
||||
if(13)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs [I] into [parent].", "<span class='notice'>You install [I] into [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the capacitor.", "<span class='notice'>You unfasten the capacitor.</span>")
|
||||
if(14)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the power cell.", "<span class='notice'>You secure the power cell.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries the power cell from [parent].", "<span class='notice'>You pry the power cell from [parent].</span>")
|
||||
if(11)
|
||||
if(15)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the internal armor layer to [parent].", "<span class='notice'>You install the internal armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the power cell.", "<span class='notice'>You unfasten the power cell.</span>")
|
||||
if(12)
|
||||
if(16)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the internal armor layer.", "<span class='notice'>You secure the internal armor layer.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries internal armor layer from [parent].", "<span class='notice'>You pry internal armor layer from [parent].</span>")
|
||||
if(13)
|
||||
if(17)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] welds the internal armor layer to [parent].", "<span class='notice'>You weld the internal armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the internal armor layer.", "<span class='notice'>You unfasten the internal armor layer.</span>")
|
||||
if(14)
|
||||
if(18)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the external armor layer to [parent].", "<span class='notice'>You install the external reinforced armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] cuts the internal armor layer from [parent].", "<span class='notice'>You cut the internal armor layer from [parent].</span>")
|
||||
if(15)
|
||||
if(19)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the external armor layer.", "<span class='notice'>You secure the external reinforced armor layer.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries the external armor layer from [parent].", "<span class='notice'>You pry the external armor layer from [parent].</span>")
|
||||
if(16)
|
||||
if(20)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] welds the external armor layer to [parent].", "<span class='notice'>You weld the external armor layer to [parent].</span>")
|
||||
else
|
||||
|
||||
@@ -39,21 +39,24 @@
|
||||
/obj/machinery/computer/mecha/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
var/datum/topic_input/afilter = new /datum/topic_input(href,href_list)
|
||||
if(href_list["send_message"])
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = afilter.getObj("send_message")
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = locate(href_list["send_message"])
|
||||
if (!istype(MT))
|
||||
return
|
||||
var/message = stripped_input(usr,"Input message","Transmit message")
|
||||
var/obj/mecha/M = MT.in_mecha()
|
||||
if(trim(message) && M)
|
||||
M.occupant_message(message)
|
||||
return
|
||||
if(href_list["shock"])
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = afilter.getObj("shock")
|
||||
MT.shock()
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = locate(href_list["shock"])
|
||||
if (istype(MT))
|
||||
MT.shock()
|
||||
if(href_list["get_log"])
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = afilter.getObj("get_log")
|
||||
stored_data = MT.get_mecha_log()
|
||||
screen = 1
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = locate(href_list["get_log"])
|
||||
if(istype(MT))
|
||||
stored_data = MT.get_mecha_log()
|
||||
screen = 1
|
||||
if(href_list["return"])
|
||||
screen = 0
|
||||
updateUsrDialog()
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 40, 1, -1)
|
||||
user.visible_message("<span class='danger'>[user] hits [name]. Nothing happens</span>", null, null, COMBAT_MESSAGE_RANGE)
|
||||
log_message("Attack by hand/paw. Attacker - [user].", color="red")
|
||||
mecha_log_message("Attack by hand/paw. Attacker - [user].", color="red")
|
||||
log_append_to_last("Armor saved.")
|
||||
|
||||
/obj/mecha/attack_paw(mob/user as mob)
|
||||
@@ -70,12 +70,12 @@
|
||||
|
||||
|
||||
/obj/mecha/attack_alien(mob/living/user)
|
||||
log_message("Attack by alien. Attacker - [user].", color="red")
|
||||
mecha_log_message("Attack by alien. Attacker - [user].", color="red")
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
|
||||
attack_generic(user, 15, BRUTE, "melee", 0)
|
||||
|
||||
/obj/mecha/attack_animal(mob/living/simple_animal/user)
|
||||
log_message("Attack by simple animal. Attacker - [user].", color="red")
|
||||
mecha_log_message("Attack by simple animal. Attacker - [user].", color="red")
|
||||
if(!user.melee_damage_upper && !user.obj_damage)
|
||||
user.emote("custom", message = "[user.friendly] [src].")
|
||||
return 0
|
||||
@@ -99,7 +99,7 @@
|
||||
/obj/mecha/attack_hulk(mob/living/carbon/human/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
log_message("Attack by hulk. Attacker - [user].", color="red")
|
||||
mecha_log_message("Attack by hulk. Attacker - [user].", color="red")
|
||||
log_combat(user, src, "punched", "hulk powers")
|
||||
|
||||
/obj/mecha/blob_act(obj/structure/blob/B)
|
||||
@@ -109,16 +109,16 @@
|
||||
return
|
||||
|
||||
/obj/mecha/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) //wrapper
|
||||
log_message("Hit by [AM].", color="red")
|
||||
mecha_log_message("Hit by [AM].", color="red")
|
||||
. = ..()
|
||||
|
||||
|
||||
/obj/mecha/bullet_act(obj/item/projectile/Proj) //wrapper
|
||||
log_message("Hit by projectile. Type: [Proj.name]([Proj.flag]).", color="red")
|
||||
mecha_log_message("Hit by projectile. Type: [Proj.name]([Proj.flag]).", color="red")
|
||||
. = ..()
|
||||
|
||||
/obj/mecha/ex_act(severity, target)
|
||||
log_message("Affected by explosion of severity: [severity].", color="red")
|
||||
mecha_log_message("Affected by explosion of severity: [severity].", color="red")
|
||||
if(prob(deflect_chance))
|
||||
severity++
|
||||
log_append_to_last("Armor saved, changing severity to [severity].")
|
||||
@@ -148,7 +148,7 @@
|
||||
if(get_charge())
|
||||
use_power((cell.charge/3)/(severity*2))
|
||||
take_damage(30 / severity, BURN, "energy", 1)
|
||||
log_message("EMP detected", color="red")
|
||||
mecha_log_message("EMP detected", color="red")
|
||||
|
||||
if(istype(src, /obj/mecha/combat))
|
||||
mouse_pointer = 'icons/mecha/mecha_mouse-disable.dmi'
|
||||
@@ -160,7 +160,7 @@
|
||||
|
||||
/obj/mecha/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature>max_temperature)
|
||||
log_message("Exposed to dangerous temperature.", color="red")
|
||||
mecha_log_message("Exposed to dangerous temperature.", color="red")
|
||||
take_damage(5, BURN, 0, 1)
|
||||
|
||||
/obj/mecha/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
@@ -172,6 +172,10 @@
|
||||
to_chat(user, "[src]-[W] interface initialization failed.")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/mecha_ammo))
|
||||
ammo_resupply(W, user)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/mecha_parts/mecha_equipment))
|
||||
var/obj/item/mecha_parts/mecha_equipment/E = W
|
||||
spawn()
|
||||
@@ -232,7 +236,7 @@
|
||||
cell = null
|
||||
state = 4
|
||||
to_chat(user, "<span class='notice'>You unscrew and pry out the powercell.</span>")
|
||||
log_message("Powercell removed")
|
||||
mecha_log_message("Powercell removed")
|
||||
else if(state==4 && cell)
|
||||
state=3
|
||||
to_chat(user, "<span class='notice'>You screw the cell in place.</span>")
|
||||
@@ -246,7 +250,7 @@
|
||||
var/obj/item/stock_parts/cell/C = W
|
||||
to_chat(user, "<span class='notice'>You install the powercell.</span>")
|
||||
cell = C
|
||||
log_message("Powercell installed")
|
||||
mecha_log_message("Powercell installed")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There's already a powercell installed.</span>")
|
||||
return
|
||||
@@ -280,7 +284,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/mecha/attacked_by(obj/item/I, mob/living/user)
|
||||
log_message("Attacked by [I]. Attacker - [user]")
|
||||
mecha_log_message("Attacked by [I]. Attacker - [user]")
|
||||
..()
|
||||
|
||||
/obj/mecha/proc/mech_toxin_damage(mob/living/target)
|
||||
|
||||
@@ -221,73 +221,71 @@
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
|
||||
var/datum/topic_input/afilter = new /datum/topic_input(href,href_list)
|
||||
|
||||
if(in_range(src, usr))
|
||||
var/obj/item/card/id/id_card
|
||||
if (href_list["id_card"])
|
||||
id_card = locate(href_list["id_card"])
|
||||
if (!istype(id_card))
|
||||
return
|
||||
|
||||
if(href_list["req_access"] && add_req_access)
|
||||
output_access_dialog(afilter.getObj("id_card"),afilter.getMob("user"))
|
||||
output_access_dialog(id_card, usr)
|
||||
|
||||
if(href_list["maint_access"] && maint_access)
|
||||
var/mob/user = afilter.getMob("user")
|
||||
if(user)
|
||||
if(state==0)
|
||||
state = 1
|
||||
to_chat(user, "The securing bolts are now exposed.")
|
||||
else if(state==1)
|
||||
state = 0
|
||||
to_chat(user, "The securing bolts are now hidden.")
|
||||
output_maintenance_dialog(afilter.getObj("id_card"),user)
|
||||
if(state==0)
|
||||
state = 1
|
||||
to_chat(usr, "The securing bolts are now exposed.")
|
||||
else if(state==1)
|
||||
state = 0
|
||||
to_chat(usr, "The securing bolts are now hidden.")
|
||||
output_maintenance_dialog(id_card, usr)
|
||||
|
||||
if(href_list["set_internal_tank_valve"] && state >=1)
|
||||
var/mob/user = afilter.getMob("user")
|
||||
if(user)
|
||||
var/new_pressure = input(user,"Input new output pressure","Pressure setting",internal_tank_valve) as num
|
||||
if(new_pressure)
|
||||
internal_tank_valve = new_pressure
|
||||
to_chat(user, "The internal pressure valve has been set to [internal_tank_valve]kPa.")
|
||||
var/new_pressure = input(usr,"Input new output pressure","Pressure setting",internal_tank_valve) as num
|
||||
if(new_pressure)
|
||||
internal_tank_valve = new_pressure
|
||||
to_chat(usr, "The internal pressure valve has been set to [internal_tank_valve]kPa.")
|
||||
|
||||
if(href_list["add_req_access"] && add_req_access && afilter.getObj("id_card"))
|
||||
operation_req_access += afilter.getNum("add_req_access")
|
||||
output_access_dialog(afilter.getObj("id_card"),afilter.getMob("user"))
|
||||
if(href_list["add_req_access"] && add_req_access)
|
||||
operation_req_access += text2num(href_list["add_req_access"])
|
||||
output_access_dialog(id_card, usr)
|
||||
|
||||
if(href_list["del_req_access"] && add_req_access && afilter.getObj("id_card"))
|
||||
operation_req_access -= afilter.getNum("del_req_access")
|
||||
output_access_dialog(afilter.getObj("id_card"),afilter.getMob("user"))
|
||||
if(href_list["del_req_access"] && add_req_access)
|
||||
operation_req_access -= text2num(href_list["add_req_access"])
|
||||
output_access_dialog(id_card, usr)
|
||||
|
||||
if(href_list["finish_req_access"])
|
||||
add_req_access = 0
|
||||
var/mob/user = afilter.getMob("user")
|
||||
user << browse(null,"window=exosuit_add_access")
|
||||
usr << browse(null,"window=exosuit_add_access")
|
||||
|
||||
if(usr != occupant)
|
||||
return
|
||||
|
||||
if(href_list["update_content"])
|
||||
send_byjax(src.occupant,"exosuit.browser","content",src.get_stats_part())
|
||||
send_byjax(usr,"exosuit.browser","content",src.get_stats_part())
|
||||
|
||||
if(href_list["select_equip"])
|
||||
var/obj/item/mecha_parts/mecha_equipment/equip = afilter.getObj("select_equip")
|
||||
var/obj/item/mecha_parts/mecha_equipment/equip = locate(href_list["select_equip"]) in src
|
||||
if(equip && equip.selectable)
|
||||
src.selected = equip
|
||||
src.occupant_message("You switch to [equip]")
|
||||
src.visible_message("[src] raises [equip]")
|
||||
send_byjax(src.occupant,"exosuit.browser","eq_list",src.get_equipment_list())
|
||||
selected = equip
|
||||
occupant_message("You switch to [equip]")
|
||||
visible_message("[src] raises [equip]")
|
||||
send_byjax(usr, "exosuit.browser","eq_list", get_equipment_list())
|
||||
|
||||
if(href_list["rmictoggle"])
|
||||
radio.broadcasting = !radio.broadcasting
|
||||
send_byjax(src.occupant,"exosuit.browser","rmicstate",(radio.broadcasting?"Engaged":"Disengaged"))
|
||||
send_byjax(usr,"exosuit.browser","rmicstate",(radio.broadcasting?"Engaged":"Disengaged"))
|
||||
|
||||
if(href_list["rspktoggle"])
|
||||
radio.listening = !radio.listening
|
||||
send_byjax(src.occupant,"exosuit.browser","rspkstate",(radio.listening?"Engaged":"Disengaged"))
|
||||
send_byjax(usr,"exosuit.browser","rspkstate",(radio.listening?"Engaged":"Disengaged"))
|
||||
|
||||
if(href_list["rfreq"])
|
||||
var/new_frequency = (radio.frequency + afilter.getNum("rfreq"))
|
||||
var/new_frequency = (radio.frequency + text2num(href_list["rfreq"]))
|
||||
if (!radio.freerange || (radio.frequency < MIN_FREE_FREQ || radio.frequency > MAX_FREE_FREQ))
|
||||
new_frequency = sanitize_frequency(new_frequency)
|
||||
radio.set_frequency(new_frequency)
|
||||
send_byjax(src.occupant,"exosuit.browser","rfreq","[format_frequency(radio.frequency)]")
|
||||
send_byjax(usr,"exosuit.browser","rfreq","[format_frequency(radio.frequency)]")
|
||||
|
||||
if (href_list["view_log"])
|
||||
src.occupant << browse(src.get_log_html(), "window=exosuit_log")
|
||||
@@ -302,20 +300,20 @@
|
||||
|
||||
if (href_list["toggle_id_upload"])
|
||||
add_req_access = !add_req_access
|
||||
send_byjax(src.occupant,"exosuit.browser","t_id_upload","[add_req_access?"L":"Unl"]ock ID upload panel")
|
||||
send_byjax(usr,"exosuit.browser","t_id_upload","[add_req_access?"L":"Unl"]ock ID upload panel")
|
||||
|
||||
if(href_list["toggle_maint_access"])
|
||||
if(state)
|
||||
occupant_message("<span class='danger'>Maintenance protocols in effect</span>")
|
||||
return
|
||||
maint_access = !maint_access
|
||||
send_byjax(src.occupant,"exosuit.browser","t_maint_access","[maint_access?"Forbid":"Permit"] maintenance protocols")
|
||||
send_byjax(usr,"exosuit.browser","t_maint_access","[maint_access?"Forbid":"Permit"] maintenance protocols")
|
||||
|
||||
if (href_list["toggle_port_connection"])
|
||||
if(internal_tank.connected_port)
|
||||
if(internal_tank.disconnect())
|
||||
occupant_message("Disconnected from the air system port.")
|
||||
log_message("Disconnected from gas port.")
|
||||
mecha_log_message("Disconnected from gas port.")
|
||||
else
|
||||
occupant_message("<span class='warning'>Unable to disconnect from the air system port!</span>")
|
||||
return
|
||||
@@ -323,7 +321,7 @@
|
||||
var/obj/machinery/atmospherics/components/unary/portables_connector/possible_port = locate() in loc
|
||||
if(internal_tank.connect(possible_port))
|
||||
occupant_message("Connected to the air system port.")
|
||||
log_message("Connected to gas port.")
|
||||
mecha_log_message("Connected to gas port.")
|
||||
else
|
||||
occupant_message("<span class='warning'>Unable to connect with air system port!</span>")
|
||||
return
|
||||
@@ -341,14 +339,14 @@
|
||||
|
||||
if(href_list["repair_int_control_lost"])
|
||||
occupant_message("Recalibrating coordination system...")
|
||||
log_message("Recalibration of coordination system started.")
|
||||
mecha_log_message("Recalibration of coordination system started.")
|
||||
var/T = loc
|
||||
spawn(100)
|
||||
if(T == loc)
|
||||
clearInternalDamage(MECHA_INT_CONTROL_LOST)
|
||||
occupant_message("<span class='notice'>Recalibration successful.</span>")
|
||||
log_message("Recalibration of coordination system finished with 0 errors.")
|
||||
mecha_log_message("Recalibration of coordination system finished with 0 errors.")
|
||||
else
|
||||
occupant_message("<span class='warning'>Recalibration failed!</span>")
|
||||
log_message("Recalibration of coordination system failed with 1 error.", color="red")
|
||||
mecha_log_message("Recalibration of coordination system failed with 1 error.", color="red")
|
||||
|
||||
|
||||
@@ -146,11 +146,11 @@
|
||||
..()
|
||||
if(href_list["drop_from_cargo"])
|
||||
var/obj/O = locate(href_list["drop_from_cargo"])
|
||||
if(O && O in src.cargo)
|
||||
if(O && (O in cargo))
|
||||
occupant_message("<span class='notice'>You unload [O].</span>")
|
||||
O.forceMove(drop_location())
|
||||
cargo -= O
|
||||
log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - src.cargo.len]")
|
||||
mecha_log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - src.cargo.len]")
|
||||
return
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user