From fc90b08e1c5937afa189c72cb8bfa432b065c9cf Mon Sep 17 00:00:00 2001 From: "giacomand@gmail.com" Date: Tue, 4 Dec 2012 16:55:04 +0000 Subject: [PATCH] -Changed the limits of the server room alarm to fix Issue 1143. -Changed the singularity code a bit. Checking for the last movement had some problems, I changed it around. It fixed Issue 1121. -In addition of this, the singularity will now move diagonally. It doesn't get stuck in the corners of the field now. -Mimics which are structures, have density and anchored will be able to knockdown people and be twice as strong. -Doubled the amount of times the staff of animation can fire before needing to recharge, since it had to shoot way more than the staff of change to be effective. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5256 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/machinery/alarm.dm | 4 +- .../mob/living/simple_animal/hostile/mimic.dm | 13 +++++ code/modules/power/singularity/singularity.dm | 47 +++++++------------ .../projectiles/guns/energy/special.dm | 1 + 4 files changed, 34 insertions(+), 31 deletions(-) diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 8b6ee8e2f34..ad44ab7f02a 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -121,8 +121,8 @@ "carbon dioxide" = new/datum/tlv(-1.0, -1.0, 5, 10), // Partial pressure, kpa "plasma" = new/datum/tlv(-1.0, -1.0, 0.2, 0.5), // Partial pressure, kpa "other" = new/datum/tlv(-1.0, -1.0, 0.5, 1.0), // Partial pressure, kpa - "pressure" = new/datum/tlv(ONE_ATMOSPHERE*0.80,ONE_ATMOSPHERE*0.90,ONE_ATMOSPHERE*1.40,ONE_ATMOSPHERE*1.60), /* kpa */ - "temperature" = new/datum/tlv(40, 60, 100, 120), // K + "pressure" = new/datum/tlv(-1.0, -1.0, -1.0, -1.0), /* kpa */ + "temperature" = new/datum/tlv(40, 60, 120, 140), // K ) /obj/machinery/alarm/kitchen_cold_room diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index 93c8a7d224e..57c53cb6af8 100644 --- a/code/modules/mob/living/simple_animal/hostile/mimic.dm +++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm @@ -135,6 +135,7 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca maxHealth = 100 var/obj/item/staff = null // the staff that changed they, never attack the bearer of this staff var/destroy_objects = 0 + var/knockdown_people = 0 /mob/living/simple_animal/hostile/mimic/copy/New(loc, var/obj/copy, var/obj/item/staff) ..(loc) @@ -164,6 +165,10 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca if(istype(O, /obj/structure)) health = (anchored * 50) + 50 destroy_objects = 1 + if(O.density && O.anchored) + knockdown_people = 1 + melee_damage_lower *= 2 + melee_damage_upper *= 2 else if(istype(O, /obj/item)) var/obj/item/I = O health = 15 * I.w_class @@ -182,3 +187,11 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca if(destroy_objects) ..() +/mob/living/simple_animal/hostile/mimic/copy/AttackingTarget() + . =..() + if(knockdown_people) + var/mob/living/L = . + if(istype(L)) + if(prob(15)) + L.Weaken(1) + L.visible_message("\the [src] knocks down \the [L]!") \ No newline at end of file diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index dab35caa7aa..ff6303c808d 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -49,11 +49,6 @@ var/global/list/uneatable = list( return -/obj/machinery/singularity/Del() - //Could have it do something bad when this happens, explode/implode or something - ..() - - /obj/machinery/singularity/attack_hand(mob/user as mob) consume(user) return 1 @@ -91,13 +86,13 @@ var/global/list/uneatable = list( eat() dissipate() check_energy() + if(current_size >= 3) move() - if(current_size <= 7) - pulse() - if(current_size >= 5) - if(prob(event_chance))//Chance for it to run a special event TODO:Come up with one or two more that fit - event() + if(current_size <= 7) + pulse() + if(prob(event_chance))//Chance for it to run a special event TODO:Come up with one or two more that fit + event() return @@ -295,30 +290,25 @@ var/global/list/uneatable = list( return -/obj/machinery/singularity/proc/move(var/movement_dir = 0) +/obj/machinery/singularity/proc/move(var/force_move = 0) if(!move_self) return 0 + var/movement_dir = pick(alldirs - last_failed_movement) + + if(force_move) + movement_dir = force_move + if(target && prob(60)) movement_dir = get_dir(src,target) //moves to a singulo beacon, if there is one - else if(!(movement_dir in cardinal)) - movement_dir = pick(NORTH, EAST, WEST, SOUTH) - - if(movement_dir == last_failed_movement) - var/list/L = new/list(NORTH, EAST, WEST, SOUTH) - L.Remove(last_failed_movement) - movement_dir = pick(L) if(current_size >= 9)//The superlarge one does not care about things in its way - spawn(0) - step(src, movement_dir) - spawn(1) - step(src, movement_dir) + step(src, movement_dir) + step(src, movement_dir) return 1 else if(check_turfs_in(movement_dir)) last_failed_movement = 0//Reset this because we moved - spawn(0) - step(src, movement_dir) + step(src, movement_dir) return 1 else last_failed_movement = movement_dir @@ -418,16 +408,15 @@ var/global/list/uneatable = list( radiation = round(((src.energy-150)/50)*5,1) radiationmin = round((radiation/5),1)// for(var/mob/living/M in view(toxrange, src.loc)) - if(istype(M,/mob/living/)) - M.apply_effect(rand(radiationmin,radiation), IRRADIATE) - toxdamage = (toxdamage - (toxdamage*M.getarmor(null, "rad"))) - M.apply_effect(toxdamage, TOX) + M.apply_effect(rand(radiationmin,radiation), IRRADIATE) + toxdamage = (toxdamage - (toxdamage*M.getarmor(null, "rad"))) + M.apply_effect(toxdamage, TOX) return /obj/machinery/singularity/proc/mezzer() for(var/mob/living/carbon/M in oviewers(8, src)) - if(istype(M,/mob/living/carbon/human) && M.stat == CONSCIOUS) + if(M.stat == CONSCIOUS) if(istype(M:glasses,/obj/item/clothing/glasses/meson)) M << "\blue You look directly into The [src.name], good thing you had your protective eyewear on!" return diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 7cad1c58876..d0b64c5901b 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -68,6 +68,7 @@ obj/item/weapon/gun/energy/staff name = "staff of animation" desc = "An artefact that spits bolts of life-force which causes objects which are hit by it to animate and come to life! This magic doesn't affect machines." projectile_type = "/obj/item/projectile/animate" + charge_cost = 100 /obj/item/weapon/gun/energy/floragun name = "floral somatoray"