Files
Bubberstation/code/game/objects/structures/showcase.dm
Cuboos bf079d29d4 POWER TOOLS TAKE 2. (#20923)
New power tools for the CE! It's like goof's golden tools but less memey and makes more sense, power tools are much faster than normal tools and take the place of two.

Hand drill, activate to switch between between screwdriver bit and bolt bit (screwdriver/wrench)

Jaws of life, activate to switch between a cutting head and prying head, can also open powered doors like a xeno. Cutting head cuts your head off if you suicide with them. I wanted to make the prying head gib your head but i couldn't figure it out.

Reworked how construction handles sounds and added a new "usesound" var to obj/items. This is useful if you want to add another tool or item that makes a send when it's being used. Also useful if you want to replace a sound for an item or if you have an item with a choice of sounds (like if you have two versions of a sound sound you want to play)

CE now gets a unique white tool belt, exactly the same as a regular tool belt, just a re-skin.

CE also spawns with the new power tools and an experimental welder, CE will be the ONLY one to spawn with these tools, might make him a more valuable target for traitors. I figured this would be acceptable considering most heads are not antag enabled (i think)

Also i added a welding tool sound for reasons... figured might as well add some more sounds while i was reworking it.
2016-10-14 10:19:23 +13:00

77 lines
2.7 KiB
Plaintext

#define SHOWCASE_CONSTRUCTED 1
#define SHOWCASE_SCREWDRIVERED 2
/*Completely generic structures for use by mappers to create fake objects, i.e. display rooms*/
/obj/structure/showcase
name = "showcase"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "showcase_1"
desc = "A stand with the empty body of a cyborg bolted to it."
density = 1
anchored = 1
var/deconstruction_state = SHOWCASE_CONSTRUCTED
/obj/structure/showcase/fakeid
name = "\improper Centcom identification console"
desc = "You can use this to change ID's."
icon = 'icons/obj/computer.dmi'
icon_state = "computer"
/obj/structure/showcase/fakeid/New()
add_overlay("id")
add_overlay("id_key")
/obj/structure/showcase/fakesec
name = "\improper Centcom security records"
desc = "Used to view and edit personnel's security records"
icon = 'icons/obj/computer.dmi'
icon_state = "computer"
/obj/structure/showcase/fakesec/New()
add_overlay("security")
add_overlay("security_key")
/obj/structure/showcase/horrific_experiment
name = "horrific experiment"
desc = "Some sort of pod filled with blood and viscera. You swear you can see it moving..."
icon = 'icons/obj/cloning.dmi'
icon_state = "pod_g"
//Deconstructing
//Showcases can be any sprite, so it makes sense that they can't be constructed.
//However if a player wants to move an existing showcase or remove one, this is for that.
/obj/structure/showcase/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/screwdriver) && !anchored)
if(deconstruction_state == SHOWCASE_SCREWDRIVERED)
user << "<span class='notice'>You screw the screws back into the showcase.</span>"
playsound(loc, W.usesound, 100, 1)
deconstruction_state = SHOWCASE_CONSTRUCTED
else if (deconstruction_state == SHOWCASE_CONSTRUCTED)
user << "<span class='notice'>You unscrew the screws.</span>"
playsound(loc, W.usesound, 100, 1)
deconstruction_state = SHOWCASE_SCREWDRIVERED
if(istype(W, /obj/item/weapon/crowbar) && deconstruction_state == SHOWCASE_SCREWDRIVERED)
if(do_after(user, 20/W.toolspeed, target = src))
playsound(loc, W.usesound, 100, 1)
user << "<span class='notice'>You start to crowbar the showcase apart...</span>"
new /obj/item/stack/sheet/metal (get_turf(src), 4)
qdel(src)
if(deconstruction_state == SHOWCASE_CONSTRUCTED && default_unfasten_wrench(user, W))
return
//Feedback is given in examine because showcases can basically have any sprite assigned to them
/obj/structure/showcase/examine(mob/user)
..()
switch(deconstruction_state)
if(SHOWCASE_CONSTRUCTED)
user << "The showcase is fully constructed."
if(SHOWCASE_SCREWDRIVERED)
user << "The showcase has its screws loosened."
else
user << "If you see this, something is wrong."