Files
Bubberstation/code/game/objects/structures/noticeboard.dm
vuonojenmustaturska 6e468720ab Fixes to more Initialize procs (#30641)
* batch 1

/mob/living/silicon/robot/syndicate
/obj/effect/decal/cleanable/blood/old
/obj/effect/decal/cleanable/blood/gibs
/obj/effect/decal/cleanable/blood/gibs/old
/obj/effect/decal/cleanable/ash
/obj/effect/decal/cleanable/ash/large
/obj/effect/decal/cleanable/greenglow
/obj/effect/decal/cleanable/vomit/old
/obj/effect/decal/cleanable/shreds
/obj/effect/decal/cleanable/oil
/obj/effect/decal/cleanable/crayon
/obj/effect/decal/cleanable
/obj/effect/temp_visual/point

* batch 2

/obj/effect/anomaly
/mob/living/carbon/monkey/punpun
/obj/item/queen_bee/bought
/mob/living/simple_animal/hostile/poison/bees
/mob/living/carbon/human
/area/ai_monitored
/area

* batch 3

/mob/living/simple_animal/hostile/blob/blobspore
/obj/item/spellbook
/mob/living/simple_animal/hostile/blob/blobbernaut
/mob/camera/blob
/obj/structure/noticeboard
/obj/structure/piano
/obj/item/clothing/head/helmet
/obj/item/gun/energy/laser/chameleon

* batch 4

/obj/machinery/airalarm
/obj/effect/decal/cleanable for reals
/obj/item/stack/rods
/obj/effect/decal/cleanable/crayon for reals
/obj/screen/parallax_layer
/obj/item/device/instrument
/obj/item/ore
/obj/item/coin

* batch 5, getting tgstation ready for halloween

/obj/machinery/meter/turf
/obj/machinery/capture_the_flag
/obj/effect/ctf/dead_barricade
/obj/structure/firepit
/obj/item/clothing/head/helmet/knight
/obj/structure/spacevine
/obj/effect/hallucination/simple/xeno
/obj/effect/hallucination/simple
/mob/living/simple_animal/shade/howling_ghost
/mob/living/simple_animal/hostile/retaliate/clown/insane
/obj/structure/bookcase
/mob/camera/aiEye/remote/base_construction
/obj/machinery/computer/camera_advanced/base_construction
/obj/item/device/wisp_lantern

* batch 6

/obj/item/device/warp_cube/red
/obj/item/device/shared_storage/red
/obj/item/melee/ghost_sword
/mob/living/simple_animal/hostile/mining_drone
/mob/living/brain
/obj/item/device/mmi/posibrain
/mob/living/carbon/human/interactive
/mob/living/carbon/human/interactive/angry
/mob/living/carbon/human/interactive/friendly
/mob/living/carbon/human/interactive/greytide
/mob/living/carbon/human/interactive/robust
/mob/living/carbon/monkey/angry
/mob/living/simple_animal/hostile/guardian/assassin
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/no_mech
/mob/living/simple_animal/hostile/syndicate/mecha_pilot
/mob/living/simple_animal/hostile/mimic/crate
/mob/living/simple_animal/hostile/mimic/copy

* batch 7

/mob/living/simple_animal/hostile/megafauna/colossus
/mob/living/simple_animal/hostile/megafauna/bubblegum
/mob/living/simple_animal/hostile/asteroid/goldgrub
/mob/living/simple_animal/hostile/asteroid/gutlunch/gubbuck
/mob/living/simple_animal/hostile/asteroid/hivelordbrood
/mob/living/simple_animal/hostile/statue
/mob/living/simple_animal/hostile/wizard
/obj/machinery/power/smes
2017-09-13 02:47:17 -04:00

128 lines
4.1 KiB
Plaintext

/obj/structure/noticeboard
name = "notice board"
desc = "A board for pinning important notices upon."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "nboard00"
density = FALSE
anchored = TRUE
max_integrity = 150
var/notices = 0
/obj/structure/noticeboard/Initialize(mapload)
. = ..()
if(!mapload)
return
for(var/obj/item/I in loc)
if(notices > 4) break
if(istype(I, /obj/item/paper))
I.loc = src
notices++
icon_state = "nboard0[notices]"
//attaching papers!!
/obj/structure/noticeboard/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/paper) || istype(O, /obj/item/photo))
if(!allowed(user))
to_chat(user, "<span class='info'>You are not authorized to add notices</span>")
return
if(notices < 5)
if(!user.transferItemToLoc(O, src))
return
notices++
icon_state = "nboard0[notices]"
to_chat(user, "<span class='notice'>You pin the [O] to the noticeboard.</span>")
else
to_chat(user, "<span class='notice'>The notice board is full</span>")
else
return ..()
/obj/structure/noticeboard/attack_hand(mob/user)
var/auth = allowed(user)
var/dat = "<B>[name]</B><BR>"
for(var/obj/item/P in src)
if(istype(P, /obj/item/paper))
dat += "<A href='?src=\ref[src];read=\ref[P]'>[P.name]</A> [auth ? "<A href='?src=\ref[src];write=\ref[P]'>Write</A> <A href='?src=\ref[src];remove=\ref[P]'>Remove</A>" : ""]<BR>"
else
dat += "<A href='?src=\ref[src];read=\ref[P]'>[P.name]</A> [auth ? "<A href='?src=\ref[src];remove=\ref[P]'>Remove</A>" : ""]<BR>"
user << browse("<HEAD><TITLE>Notices</TITLE></HEAD>[dat]","window=noticeboard")
onclose(user, "noticeboard")
/obj/structure/noticeboard/Topic(href, href_list)
..()
usr.set_machine(src)
if(href_list["remove"])
if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
return
var/obj/item/I = locate(href_list["remove"]) in contents
if(istype(I) && I.loc == src)
I.loc = usr.loc
usr.put_in_hands(I)
notices--
icon_state = "nboard0[notices]"
if(href_list["write"])
if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
return
var/obj/item/P = locate(href_list["write"]) in contents
if(istype(P) && P.loc == src)
var/obj/item/I = usr.is_holding_item_of_type(/obj/item/pen)
if(I)
add_fingerprint(usr)
P.attackby(I, usr)
else
to_chat(usr, "<span class='notice'>You'll need something to write with!</span>")
if(href_list["read"])
var/obj/item/I = locate(href_list["read"]) in contents
if(istype(I) && I.loc == src)
usr.examinate(I)
/obj/structure/noticeboard/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
new /obj/item/stack/sheet/metal (loc, 1)
qdel(src)
// Notice boards for the heads of staff (plus the qm)
/obj/structure/noticeboard/captain
name = "Captain's Notice Board"
desc = "Important notices from the Captain."
req_access = list(ACCESS_CAPTAIN)
/obj/structure/noticeboard/hop
name = "Head of Personnel's Notice Board"
desc = "Important notices from the Head of Personnel."
req_access = list(ACCESS_HOP)
/obj/structure/noticeboard/ce
name = "Chief Engineer's Notice Board"
desc = "Important notices from the Chief Engineer."
req_access = list(ACCESS_CE)
/obj/structure/noticeboard/hos
name = "Head of Security's Notice Board"
desc = "Important notices from the Head of Security."
req_access = list(ACCESS_HOS)
/obj/structure/noticeboard/cmo
name = "Chief Medical Officer's Notice Board"
desc = "Important notices from the Chief Medical Officer."
req_access = list(ACCESS_CMO)
/obj/structure/noticeboard/rd
name = "Research Director's Notice Board"
desc = "Important notices from the Research Director."
req_access = list(ACCESS_RD)
/obj/structure/noticeboard/qm
name = "Quartermaster's Notice Board"
desc = "Important notices from the Quartermaster."
req_access = list(ACCESS_QM)
/obj/structure/noticeboard/staff
name = "Staff Notice Board"
desc = "Important notices from the heads of staff."
req_access = list(ACCESS_HEADS)