mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-06 15:32:25 +00:00
Syndicate simple animals will now attack windows/grilles/closets/tables they come into contact with so you can't cheat and tank with them.
Added an attackanimal to closets. Anything with wall_smash will be able to break them. This means Juggernauts can punch open closets now. Replaced all the for mob in viewer shit with visible_message in OpTable.dm and table_racks.dm git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4933 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -52,26 +52,20 @@
|
||||
/obj/machinery/optable/attack_paw(mob/user as mob)
|
||||
if ((HULK in usr.mutations))
|
||||
usr << text("\blue You destroy the operating table.")
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\red [usr] destroys the operating table.")
|
||||
visible_message("\red [usr] destroys the operating table!")
|
||||
src.density = 0
|
||||
del(src)
|
||||
if (!( locate(/obj/machinery/optable, user.loc) ))
|
||||
step(user, get_dir(user, src))
|
||||
if (user.loc == src.loc)
|
||||
user.layer = TURF_LAYER
|
||||
for(var/mob/M in viewers(user, null))
|
||||
M.show_message("The monkey hides under the table!", 1)
|
||||
//Foreach goto(69)
|
||||
visible_message("The monkey hides under the table!")
|
||||
return
|
||||
|
||||
/obj/machinery/optable/attack_hand(mob/user as mob)
|
||||
if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
|
||||
usr << text("\blue You destroy the table.")
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\red [usr] destroys the table.")
|
||||
visible_message("\red [usr] destroys the operating table!")
|
||||
src.density = 0
|
||||
del(src)
|
||||
return
|
||||
@@ -118,8 +112,7 @@
|
||||
M.client.eye = src
|
||||
M.resting = 1
|
||||
M.loc = src.loc
|
||||
for (var/mob/C in viewers(src))
|
||||
C.show_message("\red [M] has been laid on the operating table by [user].", 3)
|
||||
visible_message("\red [M] has been laid on the operating table by [user].", 3)
|
||||
for(var/obj/O in src)
|
||||
O.loc = src.loc
|
||||
src.add_fingerprint(user)
|
||||
|
||||
@@ -155,6 +155,13 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/closet/attack_animal(mob/living/simple_animal/user as mob)
|
||||
if(user.wall_smash)
|
||||
visible_message("\red [user] destroys the [src]. ")
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
del(src)
|
||||
|
||||
// this should probably use dump_contents()
|
||||
/obj/structure/closet/blob_act()
|
||||
if(prob(75))
|
||||
|
||||
@@ -243,9 +243,7 @@
|
||||
/obj/structure/table/attack_paw(mob/user as mob)
|
||||
if ((HULK in usr.mutations))
|
||||
usr << "\blue You destroy the table."
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [user] smashes the table apart!"
|
||||
visible_message("\red [user] smashes the table apart!")
|
||||
if(istype(src, /obj/structure/table/reinforced))
|
||||
new /obj/item/weapon/table_parts/reinforced( src.loc )
|
||||
else if(istype(src, /obj/structure/table/woodentable))
|
||||
@@ -258,18 +256,14 @@
|
||||
step(user, get_dir(user, src))
|
||||
if (user.loc == src.loc)
|
||||
user.layer = TURF_LAYER
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "[user] hides under the table!"
|
||||
visible_message("[user] hides under the table!")
|
||||
//Foreach goto(69)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/table/attack_alien(mob/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N
|
||||
usr << "\green You destroy the table."
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [user] slices the table apart!"
|
||||
visible_message("\red [user] slices the table apart!")
|
||||
if(istype(src, /obj/structure/table/reinforced))
|
||||
new /obj/item/weapon/table_parts/reinforced( src.loc )
|
||||
else if(istype(src, /obj/structure/table/woodentable))
|
||||
@@ -281,12 +275,10 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/table/attack_animal(mob/living/simple_animal/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N
|
||||
/obj/structure/table/attack_animal(mob/living/simple_animal/user as mob)
|
||||
if(user.wall_smash)
|
||||
usr << "\red You destroy the table."
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [user] smashes the table apart!"
|
||||
visible_message("\red [user] smahes the table apart!")
|
||||
if(istype(src, /obj/structure/table/reinforced))
|
||||
new /obj/item/weapon/table_parts/reinforced( src.loc )
|
||||
else if(istype(src, /obj/structure/table/woodentable))
|
||||
@@ -303,9 +295,7 @@
|
||||
/obj/structure/table/attack_hand(mob/user as mob)
|
||||
if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
|
||||
usr << "\blue You destroy the table."
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [user] smashes the table apart!"
|
||||
visible_message("\red [user] smahes the table apart!")
|
||||
if(istype(src, /obj/structure/table/reinforced))
|
||||
new /obj/item/weapon/table_parts/reinforced( src.loc )
|
||||
else if(istype(src, /obj/structure/table/woodentable))
|
||||
@@ -346,9 +336,7 @@
|
||||
return
|
||||
G.affecting.loc = src.loc
|
||||
G.affecting.Weaken(5)
|
||||
for(var/mob/O in viewers(world.view, src))
|
||||
if (O.client)
|
||||
O << "\red [G.assailant] puts [G.affecting] on the table."
|
||||
visible_message("\red [G.assailant] puts [G.affecting] on the table.")
|
||||
del(W)
|
||||
return
|
||||
|
||||
@@ -400,9 +388,7 @@
|
||||
return
|
||||
G.affecting.loc = src.loc
|
||||
G.affecting.Weaken(5)
|
||||
for(var/mob/O in viewers(world.view, src))
|
||||
if (O.client)
|
||||
O << "\red [G.assailant] puts [G.affecting] on the wooden table."
|
||||
visible_message("\red [G.assailant] puts [G.affecting] on the table.")
|
||||
del(W)
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
@@ -451,9 +437,7 @@
|
||||
return
|
||||
G.affecting.loc = src.loc
|
||||
G.affecting.Weaken(5)
|
||||
for(var/mob/O in viewers(world.view, src))
|
||||
if (O.client)
|
||||
O << "\red [G.assailant] puts [G.affecting] on the reinforced table."
|
||||
visible_message("\red [G.assailant] puts [G.affecting] on the table.")
|
||||
del(W)
|
||||
return
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
min_n2 = 0
|
||||
max_n2 = 0
|
||||
unsuitable_atoms_damage = 15
|
||||
wall_smash = 1
|
||||
|
||||
var/stance = SYNDICATE_STANCE_IDLE //Used to determine behavior
|
||||
var/mob/living/target_mob
|
||||
@@ -53,6 +54,10 @@
|
||||
del src
|
||||
return
|
||||
|
||||
for(dir in list(NORTH,EAST,SOUTH,WEST))
|
||||
var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir))
|
||||
if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille))
|
||||
obstacle.attack_animal(src)
|
||||
|
||||
if(health < 1)
|
||||
Die()
|
||||
|
||||
Reference in New Issue
Block a user