-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
This commit is contained in:
giacomand@gmail.com
2012-12-04 16:55:04 +00:00
parent 1dd83e6803
commit fc90b08e1c
4 changed files with 34 additions and 31 deletions
@@ -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("<span class='danger'>\the [src] knocks down \the [L]!</span>")
+18 -29
View File
@@ -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
@@ -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"