From b8164b7b9252bdd93cbe27516df6ae31641ee5de Mon Sep 17 00:00:00 2001 From: phil235 Date: Thu, 28 Apr 2016 18:56:14 +0200 Subject: [PATCH 1/2] * Add an attack animation for mech melee attack. * Fixes mech action button icon not updating whent the button is activated. * Fixes internal tank action button icon not updating to off when we adjusted our masks out. * Fixes mime/clown mask not updating their action button icon when adjusting. Fixes clown mask not updating its on mob icon if adjusted when worn. * Fixes typo in the human threshold for toxin in the air. * Fixes changing the thermomachine circuitboard settings not giving any feedback. --- code/game/machinery/constructable_frame.dm | 4 + code/game/machinery/machinery.dm | 1 + code/game/mecha/combat/durand.dm | 7 +- code/game/mecha/combat/gygax.dm | 14 +- code/game/mecha/combat/marauder.dm | 15 +- code/game/mecha/combat/phazon.dm | 11 +- code/game/mecha/mecha.dm | 155 ++++++++---------- .../objects/items/weapons/holosign_creator.dm | 1 + code/game/objects/structures.dm | 1 + code/game/objects/structures/tables_racks.dm | 4 +- code/game/turfs/simulated/walls.dm | 1 + code/modules/clothing/clothing.dm | 4 +- code/modules/clothing/masks/gasmask.dm | 12 +- .../mob/living/carbon/human/human_defense.dm | 1 + .../mob/living/carbon/human/species.dm | 2 +- code/modules/mob/living/living_defense.dm | 3 +- 16 files changed, 113 insertions(+), 123 deletions(-) diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index 3550a497b38..5d1d224a68e 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -377,12 +377,16 @@ to destroy them and players will be able to make replacements. var/obj/item/weapon/circuitboard/newtype if(istype(I, /obj/item/weapon/screwdriver)) + var/new_setting = "Heater" + playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) if(build_path == initial(heater.build_path)) newtype = freezer + new_setting = "Freezer" else newtype = heater name = initial(newtype.name) build_path = initial(newtype.build_path) + user << "You change the circuitboard setting to \"[new_setting]\"." /obj/item/weapon/circuitboard/thermomachine/freezer name = "circuit board (Freezer)" diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index aea97147249..eda017941d8 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -241,6 +241,7 @@ Class Procs: //////////////////////////////////////////////////////////////////////////////////////////// /obj/machinery/mech_melee_attack(obj/mecha/M) + M.do_attack_animation(src) if(M.damtype == BRUTE || M.damtype == BURN) visible_message("[M.name] has hit [src].") take_damage(M.force*2, M.damtype) // multiplied by 2 so we can hit machines hard but not be overpowered against mobs. diff --git a/code/game/mecha/combat/durand.dm b/code/game/mecha/combat/durand.dm index a16726513cb..43849b204c5 100644 --- a/code/game/mecha/combat/durand.dm +++ b/code/game/mecha/combat/durand.dm @@ -12,12 +12,11 @@ force = 40 wreckage = /obj/structure/mecha_wreckage/durand -/obj/mecha/combat/durand/GrantActions(var/mob/living/user, var/human_occupant = 0) +/obj/mecha/combat/durand/GrantActions(mob/living/user, human_occupant = 0) ..() - defense_action.chassis = src - defense_action.Grant(user) + defense_action.Grant(user, src) -/obj/mecha/combat/durand/RemoveActions(var/mob/living/user, var/human_occupant = 0) +/obj/mecha/combat/durand/RemoveActions(mob/living/user, human_occupant = 0) ..() defense_action.Remove(user) diff --git a/code/game/mecha/combat/gygax.dm b/code/game/mecha/combat/gygax.dm index c53c9ff9f2c..ba288e3c61d 100644 --- a/code/game/mecha/combat/gygax.dm +++ b/code/game/mecha/combat/gygax.dm @@ -49,22 +49,20 @@ cell.maxcharge = 30000 -/obj/mecha/combat/gygax/GrantActions(var/mob/living/user, var/human_occupant = 0) +/obj/mecha/combat/gygax/GrantActions(mob/living/user, human_occupant = 0) ..() - overload_action.chassis = src - overload_action.Grant(user) + overload_action.Grant(user, src) -/obj/mecha/combat/gygax/dark/GrantActions(var/mob/living/user, var/human_occupant = 0) +/obj/mecha/combat/gygax/dark/GrantActions(mob/living/user, human_occupant = 0) ..() - thrusters_action.chassis = src - thrusters_action.Grant(user) + thrusters_action.Grant(user, src) -/obj/mecha/combat/gygax/RemoveActions(var/mob/living/user, var/human_occupant = 0) +/obj/mecha/combat/gygax/RemoveActions(mob/living/user, human_occupant = 0) ..() overload_action.Remove(user) -/obj/mecha/combat/gygax/dark/RemoveActions(var/mob/living/user, var/human_occupant = 0) +/obj/mecha/combat/gygax/dark/RemoveActions(mob/living/user, human_occupant = 0) ..() thrusters_action.Remove(user) diff --git a/code/game/mecha/combat/marauder.dm b/code/game/mecha/combat/marauder.dm index bd9de6124f3..ec9fcf0bd6e 100644 --- a/code/game/mecha/combat/marauder.dm +++ b/code/game/mecha/combat/marauder.dm @@ -17,18 +17,13 @@ max_equip = 4 bumpsmash = 1 -/obj/mecha/combat/marauder/GrantActions(var/mob/living/user, var/human_occupant = 0) +/obj/mecha/combat/marauder/GrantActions(mob/living/user, human_occupant = 0) ..() - smoke_action.chassis = src - smoke_action.Grant(user) + smoke_action.Grant(user, src) + thrusters_action.Grant(user, src) + zoom_action.Grant(user, src) - thrusters_action.chassis = src - thrusters_action.Grant(user) - - zoom_action.chassis = src - zoom_action.Grant(user) - -/obj/mecha/combat/marauder/RemoveActions(var/mob/living/user, var/human_occupant = 0) +/obj/mecha/combat/marauder/RemoveActions(mob/living/user, human_occupant = 0) ..() smoke_action.Remove(user) thrusters_action.Remove(user) diff --git a/code/game/mecha/combat/phazon.dm b/code/game/mecha/combat/phazon.dm index 77c672649fb..9c5a6f1c1c2 100644 --- a/code/game/mecha/combat/phazon.dm +++ b/code/game/mecha/combat/phazon.dm @@ -17,16 +17,13 @@ max_equip = 3 phase_state = "phazon-phase" -/obj/mecha/combat/phazon/GrantActions(var/mob/living/user, var/human_occupant = 0) +/obj/mecha/combat/phazon/GrantActions(mob/living/user, human_occupant = 0) ..() - switch_damtype_action.chassis = src - switch_damtype_action.Grant(user) - - phasing_action.chassis = src - phasing_action.Grant(user) + switch_damtype_action.Grant(user, src) + phasing_action.Grant(user, src) -/obj/mecha/combat/phazon/RemoveActions(var/mob/living/user, var/human_occupant = 0) +/obj/mecha/combat/phazon/RemoveActions(mob/living/user, human_occupant = 0) ..() switch_damtype_action.Remove(user) phasing_action.Remove(user) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index e5877062716..5aaa0cc1f53 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -92,7 +92,7 @@ var/datum/action/innate/mecha/mech_zoom/zoom_action = new var/datum/action/innate/mecha/mech_switch_damtype/switch_damtype_action = new var/datum/action/innate/mecha/mech_toggle_phasing/phasing_action = new - var/datum/action/innate/mecha/strafe/strafing = new + var/datum/action/innate/mecha/strafe/strafing_action = new //Action vars var/thrusters_active = FALSE @@ -1021,41 +1021,34 @@ var/year_integer = text2num(year) // = 2013??? //////////////////////////////////////// Action Buttons /////////////////////////////////////////////// -/obj/mecha/proc/GrantActions(var/mob/living/user, var/human_occupant = 0) +/obj/mecha/proc/GrantActions(mob/living/user, human_occupant = 0) if(human_occupant) - eject_action.chassis = src - eject_action.Grant(user) - - internals_action.chassis = src - internals_action.Grant(user) - - cycle_action.chassis = src - cycle_action.Grant(user) - - lights_action.chassis = src - lights_action.Grant(user) - - stats_action.chassis = src - stats_action.Grant(user) - - strafing.chassis = src - strafing.Grant(user) + eject_action.Grant(user, src) + internals_action.Grant(user, src) + cycle_action.Grant(user, src) + lights_action.Grant(user, src) + stats_action.Grant(user, src) + strafing_action.Grant(user, src) -/obj/mecha/proc/RemoveActions(var/mob/living/user, var/human_occupant = 0) +/obj/mecha/proc/RemoveActions(mob/living/user, human_occupant = 0) if(human_occupant) eject_action.Remove(user) internals_action.Remove(user) cycle_action.Remove(user) lights_action.Remove(user) stats_action.Remove(user) - strafing.Remove(user) + strafing_action.Remove(user) /datum/action/innate/mecha check_flags = AB_CHECK_RESTRAINED | AB_CHECK_STUNNED | AB_CHECK_CONSCIOUS var/obj/mecha/chassis +/datum/action/innate/mecha/Grant(mob/living/L, obj/mecha/M) + chassis = M + ..() + /datum/action/innate/mecha/Destroy() chassis = null return ..() @@ -1083,7 +1076,7 @@ var/year_integer = text2num(year) // = 2013??? 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.internals_action.UpdateButtonIcon() /datum/action/innate/mecha/mech_cycle_equip name = "Cycle Equipment" @@ -1100,6 +1093,7 @@ var/year_integer = text2num(year) // = 2013??? chassis.occupant_message("You select [chassis.selected]") send_byjax(chassis.occupant,"exosuit.browser","eq_list",chassis.get_equipment_list()) button_icon_state = "mech_cycle_equip_on" + chassis.cycle_action.UpdateButtonIcon() return var/number = 0 for(var/A in chassis.equipment) @@ -1114,6 +1108,7 @@ var/year_integer = text2num(year) // = 2013??? chassis.occupant_message("You switch to [chassis.selected]") button_icon_state = "mech_cycle_equip_on" send_byjax(chassis.occupant,"exosuit.browser","eq_list",chassis.get_equipment_list()) + chassis.cycle_action.UpdateButtonIcon() return @@ -1133,7 +1128,7 @@ var/year_integer = text2num(year) // = 2013??? 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.lights_action.UpdateButtonIcon() /datum/action/innate/mecha/mech_view_stats name = "View Stats" @@ -1164,6 +1159,7 @@ var/year_integer = text2num(year) // = 2013??? occupant_message("Toggled strafing mode [strafe?"on":"off"].") log_message("Toggled strafing mode [strafe?"on":"off"].") + strafing_action.UpdateButtonIcon() //////////////////////////////////////// Specific Ability Actions /////////////////////////////////////////////// //Need to be granted by the mech type, Not default abilities. @@ -1175,12 +1171,11 @@ var/year_integer = text2num(year) // = 2013??? /datum/action/innate/mecha/mech_toggle_thrusters/Activate() if(!owner || !chassis || chassis.occupant != owner) return - var/obj/mecha/M = chassis - if(M.get_charge() > 0) - M.thrusters_active = !M.thrusters_active - button_icon_state = "mech_thrusters_[M.thrusters_active ? "on" : "off"]" - M.log_message("Toggled thrusters.") - M.occupant_message("Thrusters [M.thrusters_active ?"en":"dis"]abled.") + 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.occupant_message("Thrusters [chassis.thrusters_active ?"en":"dis"]abled.") /datum/action/innate/mecha/mech_defence_mode @@ -1190,20 +1185,19 @@ var/year_integer = text2num(year) // = 2013??? /datum/action/innate/mecha/mech_defence_mode/Activate(forced_state = null) if(!owner || !chassis || chassis.occupant != owner) return - var/obj/mecha/M = chassis if(!isnull(forced_state)) - M.defence_mode = forced_state + chassis.defence_mode = forced_state else - M.defence_mode = !M.defence_mode - button_icon_state = "mech_defense_mode_[M.defence_mode ? "on" : "off"]" - if(M.defence_mode) - M.deflect_chance = M.defence_mode_deflect_chance - M.occupant_message("You enable [M] defence mode.") + chassis.defence_mode = !chassis.defence_mode + button_icon_state = "mech_defense_mode_[chassis.defence_mode ? "on" : "off"]" + if(chassis.defence_mode) + chassis.deflect_chance = chassis.defence_mode_deflect_chance + chassis.occupant_message("You enable [chassis] defence mode.") else - M.deflect_chance = initial(M.deflect_chance) - M.occupant_message("You disable [M] defence mode.") - M.log_message("Toggled defence mode.") - + chassis.deflect_chance = initial(chassis.deflect_chance) + chassis.occupant_message("You disable [chassis] defence mode.") + chassis.log_message("Toggled defence mode.") + chassis.thrusters_action.UpdateButtonIcon() /datum/action/innate/mecha/mech_overload_mode name = "Toggle leg actuators overload" @@ -1212,26 +1206,25 @@ var/year_integer = text2num(year) // = 2013??? /datum/action/innate/mecha/mech_overload_mode/Activate(forced_state = null) if(!owner || !chassis || chassis.occupant != owner) return - var/obj/mecha/M = chassis if(!isnull(forced_state)) - M.leg_overload_mode = forced_state + chassis.leg_overload_mode = forced_state else - M.leg_overload_mode = !M.leg_overload_mode - button_icon_state = "mech_overload_[M.leg_overload_mode ? "on" : "off"]" - M.log_message("Toggled leg actuators overload.") - if(M.leg_overload_mode) - M.leg_overload_mode = 1 - M.bumpsmash = 1 - M.step_in = min(1, round(M.step_in/2)) - M.step_energy_drain = M.step_energy_drain*M.leg_overload_coeff - M.occupant_message("You enable leg actuators overload.") + 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.") + if(chassis.leg_overload_mode) + chassis.leg_overload_mode = 1 + chassis.bumpsmash = 1 + chassis.step_in = min(1, round(chassis.step_in/2)) + chassis.step_energy_drain = chassis.step_energy_drain*chassis.leg_overload_coeff + chassis.occupant_message("You enable leg actuators overload.") else - M.leg_overload_mode = 0 - M.bumpsmash = 0 - M.step_in = initial(M.step_in) - M.step_energy_drain = initial(M.step_energy_drain) - M.occupant_message("You disable leg actuators overload.") - + chassis.leg_overload_mode = 0 + chassis.bumpsmash = 0 + chassis.step_in = initial(chassis.step_in) + chassis.step_energy_drain = initial(chassis.step_energy_drain) + chassis.occupant_message("You disable leg actuators overload.") + chassis.overload_action.UpdateButtonIcon() /datum/action/innate/mecha/mech_smoke name = "Smoke" @@ -1240,13 +1233,12 @@ var/year_integer = text2num(year) // = 2013??? /datum/action/innate/mecha/mech_smoke/Activate() if(!owner || !chassis || chassis.occupant != owner) return - var/obj/mecha/M = chassis - if(M.smoke_ready && M.smoke>0) - M.smoke_system.start() - M.smoke-- - M.smoke_ready = 0 - spawn(M.smoke_cooldown) - M.smoke_ready = 1 + if(chassis.smoke_ready && chassis.smoke>0) + chassis.smoke_system.start() + chassis.smoke-- + chassis.smoke_ready = 0 + spawn(chassis.smoke_cooldown) + chassis.smoke_ready = 1 /datum/action/innate/mecha/mech_zoom @@ -1256,18 +1248,17 @@ var/year_integer = text2num(year) // = 2013??? /datum/action/innate/mecha/mech_zoom/Activate() if(!owner || !chassis || chassis.occupant != owner) return - var/obj/mecha/M = chassis if(owner.client) - M.zoom_mode = !M.zoom_mode - button_icon_state = "mech_zoom_[M.zoom_mode ? "on" : "off"]" - M.log_message("Toggled zoom mode.") - M.occupant_message("Zoom mode [M.zoom_mode?"en":"dis"]abled.") - if(M.zoom_mode) + chassis.zoom_mode = !chassis.zoom_mode + button_icon_state = "mech_zoom_[chassis.zoom_mode ? "on" : "off"]" + chassis.log_message("Toggled zoom mode.") + chassis.occupant_message("Zoom mode [chassis.zoom_mode?"en":"dis"]abled.") + if(chassis.zoom_mode) owner.client.view = 12 owner << sound('sound/mecha/imag_enh.ogg',volume=50) else owner.client.view = world.view//world.view - default mob view size - + chassis.zoom_action.UpdateButtonIcon() /datum/action/innate/mecha/mech_switch_damtype name = "Reconfigure arm microtool arrays" @@ -1276,22 +1267,21 @@ var/year_integer = text2num(year) // = 2013??? /datum/action/innate/mecha/mech_switch_damtype/Activate() if(!owner || !chassis || chassis.occupant != owner) return - var/obj/mecha/M = chassis var/new_damtype - switch(M.damtype) + switch(chassis.damtype) if("tox") new_damtype = "brute" - M.occupant_message("Your exosuit's hands form into fists.") + chassis.occupant_message("Your exosuit's hands form into fists.") if("brute") new_damtype = "fire" - M.occupant_message("A torch tip extends from your exosuit's hand, glowing red.") + chassis.occupant_message("A torch tip extends from your exosuit's hand, glowing red.") if("fire") new_damtype = "tox" - M.occupant_message("A bone-chillingly thick plasteel needle protracts from the exosuit's palm.") - M.damtype = new_damtype. + chassis.occupant_message("A bone-chillingly thick plasteel needle protracts from the exosuit's palm.") + chassis.damtype = new_damtype. button_icon_state = "mech_damtype_[new_damtype]" playsound(src, 'sound/mecha/mechmove01.ogg', 50, 1) - + chassis.switch_damtype_action.UpdateButtonIcon() /datum/action/innate/mecha/mech_toggle_phasing name = "Toggle Phasing" @@ -1300,8 +1290,7 @@ var/year_integer = text2num(year) // = 2013??? /datum/action/innate/mecha/mech_toggle_phasing/Activate() if(!owner || !chassis || chassis.occupant != owner) return - var/obj/mecha/M = chassis - M.phasing = !M.phasing - button_icon_state = "mech_phasing_[M.phasing ? "on" : "off"]" - M.occupant_message("En":"#f00\">Dis"]abled phasing.") - + chassis.phasing = !chassis.phasing + button_icon_state = "mech_phasing_[chassis.phasing ? "on" : "off"]" + chassis.occupant_message("En":"#f00\">Dis"]abled phasing.") + chassis.phasing_action.UpdateButtonIcon() diff --git a/code/game/objects/items/weapons/holosign_creator.dm b/code/game/objects/items/weapons/holosign_creator.dm index 4c2288041bb..80fe3b06c3d 100644 --- a/code/game/objects/items/weapons/holosign_creator.dm +++ b/code/game/objects/items/weapons/holosign_creator.dm @@ -103,6 +103,7 @@ attack_generic(1, user) /obj/effect/overlay/holograph/mech_melee_attack(obj/mecha/M) + M.do_attack_animation(src) playsound(loc, 'sound/weapons/Egloves.ogg', 80, 1) visible_message("[M.name] has hit [src].") qdel(src) diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 758c80626e2..c543499ea08 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -31,6 +31,7 @@ return ..() /obj/structure/mech_melee_attack(obj/mecha/M) + M.do_attack_animation(src) if(M.damtype == BRUTE || M.damtype == BURN) visible_message("[M.name] has hit [src].") return 1 diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index a4956e461f0..60e5094e930 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -416,8 +416,8 @@ /obj/structure/rack/mech_melee_attack(obj/mecha/M) - visible_message("[M.name] smashes [src] apart!") - rack_destroy() + if(..()) + take_damage(M.force*2) /obj/structure/rack/CanPass(atom/movable/mover, turf/target, height=0) if(height==0) return 1 diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 970628005f4..31f55b49a8c 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -85,6 +85,7 @@ dismantle_wall() /turf/closed/wall/mech_melee_attack(obj/mecha/M) + M.do_attack_animation(src) if(M.damtype == "brute") playsound(src, 'sound/weapons/punch4.ogg', 50, 1) visible_message("[M.name] has hit [src]!") diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index d808eef5e0f..6f8f9f0b464 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -154,9 +154,7 @@ BLIND // can't see anything if(adjusted_flags) slot_flags = adjusted_flags user.wear_mask_update(src, toggle_off = mask_adjusted) - for(var/X in actions) - var/datum/action/A = X - A.UpdateButtonIcon() + user.update_action_buttons_icon() //when mask is adjusted out, we update all buttons icon so the user's potential internal tank correctly shows as off. diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index ba61b61699a..3804a67ef7f 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -62,7 +62,6 @@ flags_cover = MASKCOVERSEYES burn_state = FLAMMABLE actions_types = list(/datum/action/item_action/adjust) - dog_fashion = /datum/dog_fashion/head/clown /obj/item/clothing/mask/gas/clown_hat/attack_self(mob/user) @@ -80,8 +79,12 @@ var/choice = input(user,"To what form do you wish to Morph this mask?","Morph Mask") in options - if(src && choice && !user.stat && in_range(user,src)) + if(src && choice && !user.incapacitated() && in_range(user,src)) icon_state = options[choice] + user.update_inv_wear_mask() + for(var/X in actions) + var/datum/action/A = X + A.UpdateButtonIcon() user << "Your Clown Mask has now morphed into [choice], all praise the Honkmother!" return 1 @@ -105,7 +108,7 @@ actions_types = list(/datum/action/item_action/adjust) /obj/item/clothing/mask/gas/mime/attack_self(mob/user) - cycle_mask(usr) + cycle_mask(user) /obj/item/clothing/mask/gas/mime/proc/cycle_mask(mob/user) switch(icon_state) @@ -118,6 +121,9 @@ if("sexymime") icon_state = "mime" user.update_inv_wear_mask() + for(var/X in actions) + var/datum/action/A = X + A.UpdateButtonIcon() user << "You adjust your mask to portray a different emotion." return 1 diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index db6e21f3ad5..88069a6498f 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -315,6 +315,7 @@ /mob/living/carbon/human/mech_melee_attack(obj/mecha/M) if(M.occupant.a_intent == "harm") + M.do_attack_animation(src) if(M.damtype == "brute") step_away(src,M,15) var/obj/item/organ/limb/temp = get_organ(pick("chest", "chest", "chest", "head")) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 5d9f35689fc..bb5376c35a8 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -71,7 +71,7 @@ var/safe_co2_min = 0 var/safe_co2_max = 10 // Yes it's an arbitrary value who cares? var/safe_toxins_min = 0 - var/safe_toxins_max = 0.005 + var/safe_toxins_max = 0.05 var/SA_para_min = 1 //Sleeping agent var/SA_sleep_min = 5 //Sleeping agent diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 4c1c0581d91..773931c8d7d 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -78,6 +78,7 @@ /mob/living/mech_melee_attack(obj/mecha/M) if(M.occupant.a_intent == "harm") + M.do_attack_animation(src) if(M.damtype == "brute") step_away(src,M,15) switch(M.damtype) @@ -101,8 +102,6 @@ add_logs(M.occupant, src, "pushed", M) visible_message("[M] pushes [src] out of the way.") - return - //Mobs on Fire /mob/living/proc/IgniteMob() From 0d060d8dafc91a839667887ea4ae4a85a90368e6 Mon Sep 17 00:00:00 2001 From: phil235 Date: Thu, 28 Apr 2016 19:17:09 +0200 Subject: [PATCH 2/2] A bit simpler like that. --- code/game/mecha/mecha.dm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 5aaa0cc1f53..97df7baeb51 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -1076,7 +1076,7 @@ var/year_integer = text2num(year) // = 2013??? 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.internals_action.UpdateButtonIcon() + UpdateButtonIcon() /datum/action/innate/mecha/mech_cycle_equip name = "Cycle Equipment" @@ -1093,7 +1093,7 @@ var/year_integer = text2num(year) // = 2013??? chassis.occupant_message("You select [chassis.selected]") send_byjax(chassis.occupant,"exosuit.browser","eq_list",chassis.get_equipment_list()) button_icon_state = "mech_cycle_equip_on" - chassis.cycle_action.UpdateButtonIcon() + UpdateButtonIcon() return var/number = 0 for(var/A in chassis.equipment) @@ -1108,7 +1108,7 @@ var/year_integer = text2num(year) // = 2013??? chassis.occupant_message("You switch to [chassis.selected]") button_icon_state = "mech_cycle_equip_on" send_byjax(chassis.occupant,"exosuit.browser","eq_list",chassis.get_equipment_list()) - chassis.cycle_action.UpdateButtonIcon() + UpdateButtonIcon() return @@ -1128,7 +1128,7 @@ var/year_integer = text2num(year) // = 2013??? 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.lights_action.UpdateButtonIcon() + UpdateButtonIcon() /datum/action/innate/mecha/mech_view_stats name = "View Stats" @@ -1197,7 +1197,7 @@ var/year_integer = text2num(year) // = 2013??? chassis.deflect_chance = initial(chassis.deflect_chance) chassis.occupant_message("You disable [chassis] defence mode.") chassis.log_message("Toggled defence mode.") - chassis.thrusters_action.UpdateButtonIcon() + UpdateButtonIcon() /datum/action/innate/mecha/mech_overload_mode name = "Toggle leg actuators overload" @@ -1224,7 +1224,7 @@ var/year_integer = text2num(year) // = 2013??? chassis.step_in = initial(chassis.step_in) chassis.step_energy_drain = initial(chassis.step_energy_drain) chassis.occupant_message("You disable leg actuators overload.") - chassis.overload_action.UpdateButtonIcon() + UpdateButtonIcon() /datum/action/innate/mecha/mech_smoke name = "Smoke" @@ -1258,7 +1258,7 @@ var/year_integer = text2num(year) // = 2013??? owner << sound('sound/mecha/imag_enh.ogg',volume=50) else owner.client.view = world.view//world.view - default mob view size - chassis.zoom_action.UpdateButtonIcon() + UpdateButtonIcon() /datum/action/innate/mecha/mech_switch_damtype name = "Reconfigure arm microtool arrays" @@ -1281,7 +1281,7 @@ var/year_integer = text2num(year) // = 2013??? chassis.damtype = new_damtype. button_icon_state = "mech_damtype_[new_damtype]" playsound(src, 'sound/mecha/mechmove01.ogg', 50, 1) - chassis.switch_damtype_action.UpdateButtonIcon() + UpdateButtonIcon() /datum/action/innate/mecha/mech_toggle_phasing name = "Toggle Phasing" @@ -1293,4 +1293,4 @@ var/year_integer = text2num(year) // = 2013??? chassis.phasing = !chassis.phasing button_icon_state = "mech_phasing_[chassis.phasing ? "on" : "off"]" chassis.occupant_message("En":"#f00\">Dis"]abled phasing.") - chassis.phasing_action.UpdateButtonIcon() + UpdateButtonIcon()