From db06d9560ada302ba8e9cd9bdbe4748427f65ac9 Mon Sep 17 00:00:00 2001 From: GlamourChariot Date: Thu, 26 Mar 2015 00:49:27 +1100 Subject: [PATCH 1/6] Fixes #456 Adds the same check that laser tag guns have for mouth shooting to practice rifles so that you can no longer suicide with them. --- code/modules/projectiles/gun.dm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 89608e7e..ff8a05e0 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -249,6 +249,11 @@ mouthshoot = 0 return + if(istype(in_chamber, /obj/item/projectile/beam/practice)) + user.show_message("You feel rather silly, trying to commit suicide with a practice gun.") + mouthshoot = 0 + return + in_chamber.on_hit(M) if (in_chamber.damage_type != HALLOSS) user.apply_damage(in_chamber.damage*2.5, in_chamber.damage_type, "head", used_weapon = "Point blank shot in the mouth with \a [in_chamber]", sharp=1) From 9a44dfc9a42a3c0280e476a574d90499be62378b Mon Sep 17 00:00:00 2001 From: GlamourChariot Date: Thu, 26 Mar 2015 00:51:54 +1100 Subject: [PATCH 2/6] Fixes #452 Adds a specific Mecha Weapon accuracy check to fix the issue of them always automatically missing due to the old accuracy check being only for hand held guns. --- code/modules/projectiles/projectile.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 8896b962..21928bb6 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -95,6 +95,10 @@ miss_modifier += -30 def_zone = get_zone_with_miss_chance(def_zone, M, miss_modifier + 15*distance + daddy.accuracy + daddy.rangedrop) // add +daddy.missmod vars to gun and this. snowflake accuracy //moving def_zone to be a child of the daddyblock because i need the daddy. all projectiles should be fired from guns anyway + + if (istype(shot_from,/obj/item/mecha_parts/mecha_equipment/weapon)) //If you shoot with a mecha weapon instead, check accuracy without a steady variable + def_zone = get_zone_with_miss_chance(def_zone, M, miss_modifier + 10*distance) + if(!def_zone) visible_message("\blue \The [src] misses [M] narrowly!") forcedodge = -1 From ba87afc5a7221ecc9598e5d92b804063591a4b4b Mon Sep 17 00:00:00 2001 From: GlamourChariot Date: Thu, 26 Mar 2015 00:54:02 +1100 Subject: [PATCH 3/6] Fixes #448 Fixes the states for Walking Mushrooms so that they are properly visible at all times. Adds a disarm function to interaction with simple animals, rather than defaulting to harm. --- .../modules/mob/living/simple_animal/friendly/mushroom.dm | 7 ++++--- code/modules/mob/living/simple_animal/simple_animal.dm | 8 +++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/simple_animal/friendly/mushroom.dm b/code/modules/mob/living/simple_animal/friendly/mushroom.dm index 9bd464db..c39a3031 100644 --- a/code/modules/mob/living/simple_animal/friendly/mushroom.dm +++ b/code/modules/mob/living/simple_animal/friendly/mushroom.dm @@ -1,9 +1,10 @@ /mob/living/simple_animal/mushroom name = "walking mushroom" desc = "It's a massive mushroom... with legs?" - icon_state = "mushroom" - icon_living = "mushroom" - icon_dead = "mushroom_dead" + icon = 'icons/mob/livestock.dmi' + icon_state = "walkingmushroom" + icon_living = "walkingmushroom" + icon_dead = "walkingmushroom_d" small = 1 speak_chance = 0 turns_per_move = 1 diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index dd72497f..e4a8f93e 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -243,6 +243,12 @@ if ((O.client && !( O.blinded ))) O.show_message("\blue [M] [response_help] [src]") + if("disarm") + if (health > 0) + for(var/mob/O in viewers(src, null)) + if ((O.client && !( O.blinded ))) + O.show_message("\blue [M] [response_disarm] [src]") + if("grab") if (M == src) return @@ -262,7 +268,7 @@ if ((O.client && !( O.blinded ))) O.show_message(text("\red [] has grabbed [] passively!", M, src), 1) - if("hurt", "disarm") + if("hurt") adjustBruteLoss(harm_intent_damage) for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) From 0679520de44c6e403cbd8448b97fe35b87dc1ec5 Mon Sep 17 00:00:00 2001 From: GlamourChariot Date: Thu, 26 Mar 2015 00:54:55 +1100 Subject: [PATCH 4/6] Redundant code When the Fabian's Coat was added to the game, this little bit of redundant code was left lying around in the labcoat.dm doing absolutely nothing. Suggest removal. --- code/modules/clothing/suits/labcoat.dm | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/code/modules/clothing/suits/labcoat.dm b/code/modules/clothing/suits/labcoat.dm index cdb23053..1a87c6ca 100644 --- a/code/modules/clothing/suits/labcoat.dm +++ b/code/modules/clothing/suits/labcoat.dm @@ -80,12 +80,7 @@ if("labgreen_all") src.icon_state = "labgreen_open" usr << "You unbotton the labcoat." - if("fabian_coat_open") - src.icon_state = "fabian_coat_closed" - usr << "You button up the coat's buttons." - if("fabian_coat_closed") - src.icon_state = "fabian_coat_open" - usr << "You unbutton the coat's buttons." + else usr << "You attempt to button-up the velcro on your [src], before promptly realising how retarded you are." return From 3cd9ade4d56a069a3e56c357a0f4be6979ecf341 Mon Sep 17 00:00:00 2001 From: GlamourChariot Date: Thu, 26 Mar 2015 04:03:58 +1100 Subject: [PATCH 5/6] Fixes #458 Alters the EMP code so that mechas are actually affected by the exosuit computer commands. Anything that isn't a Gygax or a Durand will be instantly scuttled, with the two surviving mechas losing 70-99% of their cell capacity. Additionally, a small (1 tile) empulse is emitted from the position of the mecha, disabling headsets and the like. --- code/game/atoms.dm | 3 +++ code/game/mecha/mecha.dm | 14 +++++++++++--- code/game/mecha/mecha_control_console.dm | 5 +++-- code/game/objects/empulse.dm | 4 ++-- code/modules/power/smes.dm | 4 ++-- 5 files changed, 21 insertions(+), 9 deletions(-) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index bcb27d12..1bfb5432 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -77,6 +77,9 @@ /atom/proc/emp_act(var/severity) return +/atom/proc/emp_act_console(var/severity) + return + /atom/proc/bullet_act(obj/item/projectile/P, def_zone) P.on_hit(src, 0, def_zone) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 47504766..c9104405 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -610,10 +610,18 @@ /obj/mecha/meteorhit() return ex_act(rand(1,3))//should do for now -/obj/mecha/emp_act(severity) +/obj/mecha/emp_act(severity) // Severity is generally best left at 1; damage = (50 x severity), cell drain = ((current charge / 2) x severity) if(get_charge()) - use_power((cell.charge/2)/severity) - take_damage(50 / severity,"energy") + use_power((cell.charge/2)*severity) + take_damage(50*severity,"energy") + src.log_message("EMP detected",1) + check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),1) + return + +/obj/mecha/emp_act_console(severity) // So that mechs actually drain their damn energy + if(get_charge()) + use_power(cell.charge/2) + take_damage(50*severity,"energy") src.log_message("EMP detected",1) check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),1) return diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm index 98ac9f5b..3c3debae 100644 --- a/code/game/mecha/mecha_control_console.dm +++ b/code/game/mecha/mecha_control_console.dm @@ -92,7 +92,7 @@ return answer - emp_act() + emp_act_console() del src return @@ -108,7 +108,8 @@ proc/shock() var/obj/mecha/M = in_mecha() if(M) - M.emp_act(2) + M.emp_act_console(5) + empulse(src.loc, 0, 1, 1) del(src) proc/get_mecha_log() diff --git a/code/game/objects/empulse.dm b/code/game/objects/empulse.dm index b69d3c0b..96ab2d59 100644 --- a/code/game/objects/empulse.dm +++ b/code/game/objects/empulse.dm @@ -33,7 +33,7 @@ proc/empulse(turf/epicenter, heavy_range, light_range, log=0) if(prob(50)) T.emp_act(1) else - T.emp_act(2) + T.emp_act(0.5) else if(distance <= light_range) - T.emp_act(2) + T.emp_act(0.5) return 1 \ No newline at end of file diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 512b9429..66ccd73e 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -37,7 +37,7 @@ spawn(5) if(!powernet) connect_to_network() - + dir_loop: for(var/d in cardinal) var/turf/T = get_step(src, d) @@ -347,7 +347,7 @@ if(prob(50)) emp_act(1) else - emp_act(2) + emp_act(0.5) if(prob(5)) //smoke only var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread() smoke.set_up(3, 0, src.loc) From 6d48901a80429a7e23af10588b0a5d94f55ceab0 Mon Sep 17 00:00:00 2001 From: GlamourChariot Date: Fri, 27 Mar 2015 22:19:24 +1100 Subject: [PATCH 6/6] emp_act changes Rolls back the earlier mecha EMP changes into a much more simple system. Same damage, similar energy drain, more likely to create subsystem failures, no more breaking other EMP weapons or unnecessary atom pro declerations. --- code/game/atoms.dm | 3 --- code/game/mecha/mecha.dm | 14 +++----------- code/game/mecha/mecha_control_console.dm | 7 +++++-- code/game/objects/empulse.dm | 4 ++-- code/modules/power/smes.dm | 2 +- 5 files changed, 11 insertions(+), 19 deletions(-) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 1bfb5432..bcb27d12 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -77,9 +77,6 @@ /atom/proc/emp_act(var/severity) return -/atom/proc/emp_act_console(var/severity) - return - /atom/proc/bullet_act(obj/item/projectile/P, def_zone) P.on_hit(src, 0, def_zone) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index c9104405..6f70b1fb 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -610,18 +610,10 @@ /obj/mecha/meteorhit() return ex_act(rand(1,3))//should do for now -/obj/mecha/emp_act(severity) // Severity is generally best left at 1; damage = (50 x severity), cell drain = ((current charge / 2) x severity) +/obj/mecha/emp_act(severity) // Lower severity = greater effect, higher = smaller. Damage = (50 / severity), cell drain = ((current charge / 2) / severity) if(get_charge()) - use_power((cell.charge/2)*severity) - take_damage(50*severity,"energy") - src.log_message("EMP detected",1) - check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),1) - return - -/obj/mecha/emp_act_console(severity) // So that mechs actually drain their damn energy - if(get_charge()) - use_power(cell.charge/2) - take_damage(50*severity,"energy") + use_power((cell.charge/2)/severity) //rip your energy, dude + take_damage(50/severity,"energy") src.log_message("EMP detected",1) check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),1) return diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm index 3c3debae..8e0e3184 100644 --- a/code/game/mecha/mecha_control_console.dm +++ b/code/game/mecha/mecha_control_console.dm @@ -92,7 +92,7 @@ return answer - emp_act_console() + emp_act() del src return @@ -108,7 +108,10 @@ proc/shock() var/obj/mecha/M = in_mecha() if(M) - M.emp_act_console(5) + M.emp_act(0.8) + M.emp_act(0.8) + M.emp_act(0.8) + M.emp_act(0.8) //we call this four times to get the necessary damage + add a much higher chance of subsystem failures empulse(src.loc, 0, 1, 1) del(src) diff --git a/code/game/objects/empulse.dm b/code/game/objects/empulse.dm index 96ab2d59..b69d3c0b 100644 --- a/code/game/objects/empulse.dm +++ b/code/game/objects/empulse.dm @@ -33,7 +33,7 @@ proc/empulse(turf/epicenter, heavy_range, light_range, log=0) if(prob(50)) T.emp_act(1) else - T.emp_act(0.5) + T.emp_act(2) else if(distance <= light_range) - T.emp_act(0.5) + T.emp_act(2) return 1 \ No newline at end of file diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 66ccd73e..515f2e51 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -347,7 +347,7 @@ if(prob(50)) emp_act(1) else - emp_act(0.5) + emp_act(2) if(prob(5)) //smoke only var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread() smoke.set_up(3, 0, src.loc)