From 0a6e304ac27b99994d12510b1930dc0a02fd6566 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Mon, 3 Feb 2020 00:47:51 -0700 Subject: [PATCH 1/3] s --- code/game/mecha/equipment/mecha_equipment.dm | 10 ++++---- .../mecha/equipment/tools/medical_tools.dm | 14 +++++------ .../mecha/equipment/tools/mining_tools.dm | 10 ++++---- .../game/mecha/equipment/tools/other_tools.dm | 16 ++++++------- code/game/mecha/equipment/tools/work_tools.dm | 8 +++---- code/game/mecha/equipment/weapons/weapons.dm | 8 +++---- code/game/mecha/mecha.dm | 13 +++++----- code/game/mecha/mecha_actions.dm | 14 +++++------ code/game/mecha/mecha_defense.dm | 24 +++++++++---------- code/game/mecha/mecha_topic.dm | 10 ++++---- code/game/mecha/working/ripley.dm | 2 +- 11 files changed, 64 insertions(+), 65 deletions(-) diff --git a/code/game/mecha/equipment/mecha_equipment.dm b/code/game/mecha/equipment/mecha_equipment.dm index b5a579f38b..69f2fe6fdf 100644 --- a/code/game/mecha/equipment/mecha_equipment.dm +++ b/code/game/mecha/equipment/mecha_equipment.dm @@ -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,9 +150,9 @@ 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/mecha_log_message(message, message_type=LOG_GAME, color=null, log_globally) if(chassis) - chassis.log_message("([src]) [message]", message_type, color) + chassis.mecha_log_message("([src]) [message]", message_type, color) else ..() return diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index c850e046a6..61ecec40c2 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -66,7 +66,7 @@ update_equip_info() occupant_message("[target] successfully loaded into [src]. Life support functions engaged.") chassis.visible_message("[chassis] loads [target] into [src].") - 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() @@ -193,7 +193,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 +216,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 +312,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 @@ -376,7 +376,7 @@ START_PROCESSING(SSobj, src) occupant_message(message) occupant_message("Reagent processing started.") - log_message("Reagent processing started.") + mecha_log_message("Reagent processing started.") return if(afilter.get("show_reagents")) chassis.occupant << browse(get_reagents_page(),"window=msyringegun") @@ -511,7 +511,7 @@ return if(!processed_reagents.len || reagents.total_volume >= reagents.maximum_volume || !chassis.has_charge(energy_drain)) occupant_message("Reagent processing stopped.") - log_message("Reagent processing stopped.") + mecha_log_message("Reagent processing stopped.") STOP_PROCESSING(SSobj, src) return var/amount = synth_speed / processed_reagents.len diff --git a/code/game/mecha/equipment/tools/mining_tools.dm b/code/game/mecha/equipment/tools/mining_tools.dm index 812a9b0834..d4a29f639d 100644 --- a/code/game/mecha/equipment/tools/mining_tools.dm +++ b/code/game/mecha/equipment/tools/mining_tools.dm @@ -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("[src] is too durable to drill through.") @@ -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() diff --git a/code/game/mecha/equipment/tools/other_tools.dm b/code/game/mecha/equipment/tools/other_tools.dm index 5a907804ce..70f4af8f7f 100644 --- a/code/game/mecha/equipment/tools/other_tools.dm +++ b/code/game/mecha/equipment/tools/other_tools.dm @@ -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 diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index 30576a739d..33d5166481 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -45,7 +45,7 @@ O.forceMove(chassis) O.anchored = FALSE occupant_message("[target] successfully loaded.") - 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 +105,7 @@ O.forceMove(chassis) O.anchored = FALSE occupant_message("[target] successfully loaded.") - 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 +388,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 +411,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.") diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index 2e93fc3a49..f5eefb1391 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -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)]") @@ -220,7 +220,7 @@ 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].") + mecha_log_message("Rearmed [src.name].") return 1 @@ -323,7 +323,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) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 87ce892375..35d42097a6 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -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("Air port connection teared off!") - 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, "The [name] is already occupied!") log_append_to_last("Permission denied.") @@ -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,9 @@ 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 as text, message_type=LOG_GAME, color=null, log_globally) log.len++ log[log.len] = list("time"="[STATION_TIME_TIMESTAMP("hh:mm:ss", world.time)]","date","year"="[GLOB.year_integer]","message"="[color?"":null][message][color?"":null]") - ..() return log.len /obj/mecha/proc/log_append_to_last(message as text,red=null) diff --git a/code/game/mecha/mecha_actions.dm b/code/game/mecha/mecha_actions.dm index 86ec5e70da..68d05e6a65 100644 --- a/code/game/mecha/mecha_actions.dm +++ b/code/game/mecha/mecha_actions.dm @@ -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("Thrusters [chassis.thrusters_active ?"en":"dis"]abled.") @@ -185,7 +185,7 @@ else chassis.deflect_chance = initial(chassis.deflect_chance) chassis.occupant_message("You disable [chassis] defence mode.") - 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("Zoom mode [chassis.zoom_mode?"en":"dis"]abled.") if(chassis.zoom_mode) owner.client.change_view(12) diff --git a/code/game/mecha/mecha_defense.dm b/code/game/mecha/mecha_defense.dm index e5e578b0e8..3a448f4f92 100644 --- a/code/game/mecha/mecha_defense.dm +++ b/code/game/mecha/mecha_defense.dm @@ -62,7 +62,7 @@ user.do_attack_animation(src, ATTACK_EFFECT_PUNCH) playsound(loc, 'sound/weapons/tap.ogg', 40, 1, -1) user.visible_message("[user] hits [name]. Nothing happens", 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) @@ -232,7 +232,7 @@ cell = null state = 4 to_chat(user, "You unscrew and pry out the powercell.") - log_message("Powercell removed") + mecha_log_message("Powercell removed") else if(state==4 && cell) state=3 to_chat(user, "You screw the cell in place.") @@ -246,7 +246,7 @@ var/obj/item/stock_parts/cell/C = W to_chat(user, "You install the powercell.") cell = C - log_message("Powercell installed") + mecha_log_message("Powercell installed") else to_chat(user, "There's already a powercell installed.") return @@ -280,7 +280,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) diff --git a/code/game/mecha/mecha_topic.dm b/code/game/mecha/mecha_topic.dm index 65edf1ec9a..1e0674d7bb 100644 --- a/code/game/mecha/mecha_topic.dm +++ b/code/game/mecha/mecha_topic.dm @@ -315,7 +315,7 @@ 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("Unable to disconnect from the air system port!") return @@ -323,7 +323,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("Unable to connect with air system port!") return @@ -341,14 +341,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("Recalibration successful.") - log_message("Recalibration of coordination system finished with 0 errors.") + mecha_log_message("Recalibration of coordination system finished with 0 errors.") else occupant_message("Recalibration failed!") - 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") diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index 3759a9dd58..41f8984570 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -150,7 +150,7 @@ occupant_message("You unload [O].") 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 From 9a1974e3b64e170771a67ea43af7762e954175d9 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Mon, 3 Feb 2020 00:50:57 -0700 Subject: [PATCH 2/3] Update mecha.dm --- code/game/mecha/mecha.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 35d42097a6..b279f90740 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -1028,9 +1028,10 @@ to_chat(occupant, "[icon2html(src, occupant)] [message]") return -/obj/mecha/proc/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?"":null][message][color?"":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) From 24b2bb06bf8cba6341c873460cc68244520241b1 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Mon, 3 Feb 2020 13:17:50 -0700 Subject: [PATCH 3/3] Update mecha_equipment.dm --- code/game/mecha/equipment/mecha_equipment.dm | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/code/game/mecha/equipment/mecha_equipment.dm b/code/game/mecha/equipment/mecha_equipment.dm index 69f2fe6fdf..86cdd87505 100644 --- a/code/game/mecha/equipment/mecha_equipment.dm +++ b/code/game/mecha/equipment/mecha_equipment.dm @@ -150,18 +150,14 @@ chassis.occupant_message("[icon2html(src, chassis.occupant)] [message]") return -/obj/item/mecha_parts/mecha_equipment/mecha_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.mecha_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