Files
GS13NG/code/game/objects/structures/signs/_signs.dm
Poojawa 03086dfa91 Tg 1 28 sync testing/confirmation (#5178)
* maps, tgui, tools

* defines and helpers

* onclick and controllers

* datums

fucking caught that hulk reversal too.

* game and shuttle modular

* module/admin

* oh god they fucking moved antag shit again

* haaaaate. Haaaaaaaaaate.

* enables moff wings

* more modules things

* tgstation.dme

before I forget something important

* some mob stuff

* s'more mob/living stuff

* some carbon stuff

* ayy lmaos and kitchen meat

* Human stuff

* species things

moff wings have a 'none' version too

* the rest of the module stuff.

* some strings

* misc

* mob icons

* some other icons.

* It compiles FUCK BORERS

FUCK BORERS
2018-01-29 04:42:29 -06:00

124 lines
4.4 KiB
Plaintext

/obj/structure/sign
icon = 'icons/obj/decals.dmi'
anchored = TRUE
opacity = 0
density = FALSE
layer = SIGN_LAYER
max_integrity = 100
armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
var/buildable_sign = 1 //unwrenchable and modifiable
/obj/structure/sign/ComponentInitialize()
. = ..()
AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION) // Since this is on a wall if it becomes irradiated it will smuggle the radiation past the wall
/obj/structure/sign/basic
name = "blank sign"
desc = "How can signs be real if our eyes aren't real?"
icon_state = "backing"
/obj/structure/sign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(damage_amount)
playsound(src.loc, 'sound/weapons/slash.ogg', 80, 1)
else
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
if(BURN)
playsound(loc, 'sound/items/welder.ogg', 80, 1)
/obj/structure/sign/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/wrench) && buildable_sign)
user.visible_message("<span class='notice'>[user] starts removing [src]...</span>", \
"<span class='notice'>You start unfastening [src].</span>")
playsound(src, O.usesound, 50, 1)
if(!do_after(user, 30*O.toolspeed, target = src))
return
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
user.visible_message("<span class='notice'>[user] unfastens [src].</span>", \
"<span class='notice'>You unfasten [src].</span>")
var/obj/item/sign_backing/SB = new (get_turf(user))
SB.icon_state = icon_state
SB.sign_path = type
qdel(src)
else if(istype(O, /obj/item/pen) && buildable_sign)
var/list/sign_types = list("Secure Area", "Biohazard", "High Voltage", "Radiation", "Hard Vacuum Ahead", "Disposal: Leads To Space", "Danger: Fire", "No Smoking", "Medbay", "Science", "Chemistry", \
"Hydroponics", "Xenobiology")
var/obj/structure/sign/sign_type
switch(input(user, "Select a sign type.", "Sign Customization") as null|anything in sign_types)
if("Blank")
sign_type = /obj/structure/sign/basic
if("Secure Area")
sign_type = /obj/structure/sign/warning/securearea
if("Biohazard")
sign_type = /obj/structure/sign/warning/biohazard
if("High Voltage")
sign_type = /obj/structure/sign/warning/electricshock
if("Radiation")
sign_type = /obj/structure/sign/warning/radiation
if("Hard Vacuum Ahead")
sign_type = /obj/structure/sign/warning/vacuum
if("Disposal: Leads To Space")
sign_type = /obj/structure/sign/warning/deathsposal
if("Danger: Fire")
sign_type = /obj/structure/sign/warning/fire
if("No Smoking")
sign_type = /obj/structure/sign/warning/nosmoking/circle
if("Medbay")
sign_type = /obj/structure/sign/departments/medbay/alt
if("Science")
sign_type = /obj/structure/sign/departments/science
if("Chemistry")
sign_type = /obj/structure/sign/departments/chemistry
if("Hydroponics")
sign_type = /obj/structure/sign/departments/botany
if("Xenobiology")
sign_type = /obj/structure/sign/departments/xenobio
//Make sure user is adjacent still
if(!Adjacent(user))
return
if(!sign_type)
return
//It's import to clone the pixel layout information
//Otherwise signs revert to being on the turf and
//move jarringly
var/obj/structure/sign/newsign = new sign_type(get_turf(src))
newsign.pixel_x = pixel_x
newsign.pixel_y = pixel_y
qdel(src)
else
return ..()
/obj/item/sign_backing
name = "sign backing"
desc = "A sign with adhesive backing."
icon = 'icons/obj/decals.dmi'
icon_state = "backing"
w_class = WEIGHT_CLASS_NORMAL
resistance_flags = FLAMMABLE
var/sign_path = /obj/structure/sign/basic //the type of sign that will be created when placed on a turf
/obj/item/sign_backing/afterattack(atom/target, mob/user, proximity)
if(isturf(target) && proximity)
var/turf/T = target
user.visible_message("<span class='notice'>[user] fastens [src] to [T].</span>", \
"<span class='notice'>You attach the sign to [T].</span>")
playsound(T, 'sound/items/deconstruct.ogg', 50, 1)
new sign_path(T)
qdel(src)
else
return ..()
/obj/structure/sign/nanotrasen
name = "\improper Nanotrasen Logo"
desc = "A sign with the Nanotrasen Logo on it. Glory to Nanotrasen!"
icon_state = "nanotrasen"
/obj/structure/sign/logo
name = "nanotrasen logo"
desc = "The Nanotrasen corporate logo."
icon_state = "nanotrasen_sign1"