mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
- I added in the foundations for traitor factions. See factions.dm for all the different faction datums. They don't do anything yet. - I completely ported mob/var/mutations from a bitfield to a generic list. Mutation enumerated-identifiers are added into this list. For instance, TK = 1, COLD_RESISTANCE = 2, XRAY = 3, etc... The purpose of this was because bitwise operations could not actually be used after a certain size (because BYOND is stuck in the 16bit era). - I've added in completely-functional nano-augmentations. Check under implantnanoaug.dm for a list of implants and implaners. As mentioned previously, they are completely functional but may be slightly OP. Among these nanoaugs are Super Strength, Psionic Radar, Electric Hands, Energy Blade/Sword Synthesizer, Rebreather, Dermal Armor, Combat Reflexes, and Regenerative Nanorobots. I won't go into detail as to what they do, but hopefully they should be self-explanitory. If not, check out their descriptions in the file previously mentioned. - Added in a future traitor item, the Mind Batterer. Along with it a new .ogg file. - New telecomms bus mainframe sprite, thanks to WJohnston. - New holdable shield, sprites courtesy of Muncher (i had to mangle the side sprites because of a technical little issue. I'll change it back to the original soon). It can be retracted and expanded. Probably only going to be given to traitors. - A couple of minor bugfixes here and there, along with some code tidying. Hope this isn't too large a commit. I intended it to be MUCH larger, but I've decided to split up my Traitor Factions expansion into smaller commits. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3692 316c924e-a436-60f5-8080-3fe189b3f50e
351 lines
9.9 KiB
Plaintext
351 lines
9.9 KiB
Plaintext
/*
|
|
CONTAINS:
|
|
TABLE AND RACK OBJECT INTERATIONS
|
|
*/
|
|
|
|
|
|
//TABLE
|
|
/obj/structure/table/ex_act(severity)
|
|
switch(severity)
|
|
if(1.0)
|
|
del(src)
|
|
return
|
|
if(2.0)
|
|
if (prob(50))
|
|
del(src)
|
|
return
|
|
if(3.0)
|
|
if (prob(25))
|
|
src.density = 0
|
|
else
|
|
return
|
|
|
|
|
|
/obj/structure/table/blob_act()
|
|
if(prob(75))
|
|
if(istype(src, /obj/structure/table/woodentable))
|
|
new /obj/item/weapon/table_parts/wood( src.loc )
|
|
del(src)
|
|
return
|
|
new /obj/item/weapon/table_parts( src.loc )
|
|
del(src)
|
|
return
|
|
|
|
|
|
/obj/structure/table/hand_p(mob/user as mob)
|
|
return src.attack_paw(user)
|
|
return
|
|
|
|
|
|
/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!"
|
|
if(istype(src, /obj/structure/table/reinforced))
|
|
new /obj/item/weapon/table_parts/reinforced( src.loc )
|
|
else if(istype(src, /obj/structure/table/woodentable))
|
|
new/obj/item/weapon/table_parts/wood( src.loc )
|
|
else
|
|
new /obj/item/weapon/table_parts( src.loc )
|
|
src.density = 0
|
|
del(src)
|
|
if (!( locate(/obj/structure/table, user.loc) ))
|
|
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!"
|
|
//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!"
|
|
if(istype(src, /obj/structure/table/reinforced))
|
|
new /obj/item/weapon/table_parts/reinforced( src.loc )
|
|
else if(istype(src, /obj/structure/table/woodentable))
|
|
new/obj/item/weapon/table_parts/wood( src.loc )
|
|
else
|
|
new /obj/item/weapon/table_parts( src.loc )
|
|
src.density = 0
|
|
del(src)
|
|
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
|
|
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!"
|
|
if(istype(src, /obj/structure/table/reinforced))
|
|
new /obj/item/weapon/table_parts/reinforced( src.loc )
|
|
else if(istype(src, /obj/structure/table/woodentable))
|
|
new/obj/item/weapon/table_parts/wood( src.loc )
|
|
else
|
|
new /obj/item/weapon/table_parts( src.loc )
|
|
src.density = 0
|
|
del(src)
|
|
return
|
|
|
|
|
|
|
|
|
|
/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!"
|
|
if(istype(src, /obj/structure/table/reinforced))
|
|
new /obj/item/weapon/table_parts/reinforced( src.loc )
|
|
else if(istype(src, /obj/structure/table/woodentable))
|
|
new/obj/item/weapon/table_parts/wood( src.loc )
|
|
else
|
|
new /obj/item/weapon/table_parts( src.loc )
|
|
src.density = 0
|
|
del(src)
|
|
return
|
|
|
|
|
|
/obj/structure/table/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
|
if(air_group || (height==0)) return 1
|
|
|
|
if(istype(mover) && mover.checkpass(PASSTABLE))
|
|
return 1
|
|
else
|
|
return 0
|
|
|
|
|
|
/obj/structure/table/MouseDrop_T(obj/O as obj, mob/user as mob)
|
|
|
|
if ((!( istype(O, /obj/item/weapon) ) || user.equipped() != O))
|
|
return
|
|
if(isrobot(user))
|
|
return
|
|
user.drop_item()
|
|
if (O.loc != src.loc)
|
|
step(O, get_dir(O, src))
|
|
return
|
|
|
|
|
|
/obj/structure/table/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
|
|
var/obj/item/weapon/grab/G = W
|
|
if(G.state<2)
|
|
user << "\red You need a better grip to do that!"
|
|
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."
|
|
del(W)
|
|
return
|
|
|
|
if (istype(W, /obj/item/weapon/wrench))
|
|
user << "\blue Now disassembling table"
|
|
playsound(src.loc, 'Ratchet.ogg', 50, 1)
|
|
if(do_after(user,50))
|
|
new /obj/item/weapon/table_parts( src.loc )
|
|
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
|
//SN src = null
|
|
del(src)
|
|
return
|
|
|
|
if(isrobot(user))
|
|
return
|
|
|
|
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
|
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
|
spark_system.set_up(5, 0, src.loc)
|
|
spark_system.start()
|
|
playsound(src.loc, 'blade1.ogg', 50, 1)
|
|
playsound(src.loc, "sparks", 50, 1)
|
|
for(var/mob/O in viewers(user, 4))
|
|
O.show_message("\blue The table was sliced apart by [user]!", 1, "\red You hear metal coming apart.", 2)
|
|
new /obj/item/weapon/table_parts( src.loc )
|
|
del(src)
|
|
return
|
|
|
|
user.drop_item(src)
|
|
//if(W && W.loc) W.loc = src.loc // Unnecessary - see: mob/proc/drop_item(atom) - Doohl
|
|
return
|
|
|
|
|
|
//WOODEN TABLES
|
|
/obj/structure/table/woodentable/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
|
|
if (istype(W, /obj/item/weapon/grab))
|
|
var/obj/item/weapon/grab/G = W
|
|
if(G.state<2)
|
|
user << "\red You need a better grip to do that!"
|
|
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."
|
|
del(W)
|
|
return
|
|
if (istype(W, /obj/item/weapon/wrench))
|
|
user << "\blue Now disassembling the wooden table"
|
|
playsound(src.loc, 'Ratchet.ogg', 50, 1)
|
|
sleep(50)
|
|
new /obj/item/weapon/table_parts/wood( src.loc )
|
|
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
|
del(src)
|
|
return
|
|
if(isrobot(user))
|
|
return
|
|
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
|
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
|
spark_system.set_up(5, 0, src.loc)
|
|
spark_system.start()
|
|
playsound(src.loc, 'blade1.ogg', 50, 1)
|
|
playsound(src.loc, "sparks", 50, 1)
|
|
for(var/mob/O in viewers(user, 4))
|
|
O.show_message("\blue The wooden table was sliced apart by [user]!", 1, "\red You hear wood coming apart.", 2)
|
|
new /obj/item/weapon/table_parts/wood( src.loc )
|
|
del(src)
|
|
return
|
|
|
|
user.drop_item(src)
|
|
//if(W && W.loc) W.loc = src.loc
|
|
return
|
|
|
|
|
|
//REINFORCED TABLES
|
|
/obj/structure/table/reinforced/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
|
|
if (istype(W, /obj/item/weapon/grab))
|
|
var/obj/item/weapon/grab/G = W
|
|
if(G.state<2)
|
|
user << "\red You need a better grip to do that!"
|
|
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."
|
|
del(W)
|
|
return
|
|
|
|
if (istype(W, /obj/item/weapon/weldingtool))
|
|
if(W:welding == 1)
|
|
if(src.status == 2)
|
|
W:welding = 2
|
|
W:eyecheck(user)
|
|
user << "\blue Now weakening the reinforced table"
|
|
playsound(src.loc, 'Welder.ogg', 50, 1)
|
|
if (do_after(user, 50))
|
|
user << "\blue Table weakened"
|
|
src.status = 1
|
|
W:welding = 1
|
|
else
|
|
W:welding = 2
|
|
user << "\blue Now strengthening the reinforced table"
|
|
playsound(src.loc, 'Welder.ogg', 50, 1)
|
|
if (do_after(user, 50))
|
|
user << "\blue Table strengthened"
|
|
src.status = 2
|
|
W:welding = 1
|
|
return
|
|
if(isrobot(user))
|
|
return
|
|
user.drop_item(src)
|
|
//if(W && W.loc) W.loc = src.loc
|
|
return
|
|
|
|
if (istype(W, /obj/item/weapon/wrench))
|
|
if(src.status == 1)
|
|
user << "\blue Now disassembling the reinforced table"
|
|
playsound(src.loc, 'Ratchet.ogg', 50, 1)
|
|
if (do_after(user, 50))
|
|
new /obj/item/weapon/table_parts/reinforced( src.loc )
|
|
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
|
del(src)
|
|
return
|
|
if(isrobot(user))
|
|
return
|
|
|
|
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
|
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
|
spark_system.set_up(5, 0, src.loc)
|
|
spark_system.start()
|
|
playsound(src.loc, 'blade1.ogg', 50, 1)
|
|
playsound(src.loc, "sparks", 50, 1)
|
|
for(var/mob/O in viewers(user, 4))
|
|
O.show_message("\blue The reinforced table was sliced apart by [user]!", 1, "\red You hear metal coming apart.", 2)
|
|
new /obj/item/weapon/table_parts/reinforced( src.loc )
|
|
del(src)
|
|
return
|
|
|
|
user.drop_item(src)
|
|
//if(W && W.loc) W.loc = src.loc
|
|
return
|
|
|
|
//RACKS
|
|
|
|
/obj/structure/rack/ex_act(severity)
|
|
switch(severity)
|
|
if(1.0)
|
|
del(src)
|
|
if(2.0)
|
|
del(src)
|
|
if(prob(50))
|
|
new /obj/item/weapon/rack_parts(src.loc)
|
|
if(3.0)
|
|
if(prob(25))
|
|
del(src)
|
|
new /obj/item/weapon/rack_parts(src.loc)
|
|
|
|
/obj/structure/rack/blob_act()
|
|
if(prob(75))
|
|
del(src)
|
|
return
|
|
else if(prob(50))
|
|
new /obj/item/weapon/rack_parts(src.loc)
|
|
del(src)
|
|
return
|
|
|
|
/obj/structure/rack/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
|
if(air_group || (height==0)) return 1
|
|
if(src.density == 0) //Because broken racks -Agouri |TODO: SPRITE!|
|
|
return 1
|
|
if(istype(mover) && mover.checkpass(PASSTABLE))
|
|
return 1
|
|
else
|
|
return 0
|
|
|
|
/obj/structure/rack/MouseDrop_T(obj/O as obj, mob/user as mob)
|
|
if ((!( istype(O, /obj/item/weapon) ) || user.equipped() != O))
|
|
return
|
|
if(isrobot(user))
|
|
return
|
|
user.drop_item()
|
|
if (O.loc != src.loc)
|
|
step(O, get_dir(O, src))
|
|
return
|
|
|
|
/obj/structure/rack/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
if (istype(W, /obj/item/weapon/wrench))
|
|
new /obj/item/weapon/rack_parts( src.loc )
|
|
playsound(src.loc, 'Ratchet.ogg', 50, 1)
|
|
//SN src = null
|
|
del(src)
|
|
return
|
|
if(isrobot(user))
|
|
return
|
|
user.drop_item()
|
|
if(W && W.loc) W.loc = src.loc
|
|
return
|
|
|
|
/obj/structure/rack/meteorhit(obj/O as obj)
|
|
del(src) |