mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-01 20:42:08 +00:00
* Add the system for managed global variables * Travis ban old globals * So you CAN inline proccall, that's neat * Fix that * master.dm * Remove the hack procs * Move InitGlobals to the proper spot * configuration.dm * Fix the missing pre-slash * clockcult.dm * This is probably for the best * Doy * Fix shit * Rest of the DEFINES tree * Fix * Use global. for access * Update find_references_in_globals Always hated that proc Whoever made it must've bee a r e a l idiot... * __HELPERS tree * Move global initialization to master. Fix the declaration * database.dm * Dat newline * I said DECLARATIVE order! * Here's something you can chew on @Iamgoofball * game_modes.dm * Fix this * genetics.dm * flavor_misc.dm * More stuff * Do it mso's way. Keep the controllers as global * Make master actually see it * Fix * Finish _globalvars/lists * Finish the rest of the _globalvars tree * This is weird * Migrate the controllers * SLOTH -> GLOB * Lighting globals * round_start_time -> ticker * PAI card list -> pai SS * record_id_num -> static * Diseases list -> SSdisease * More disease globals to the SS * More disease stuff * Emote list * Better and better * Bluh * So much stuff * Ahh * Wires * dview * station_areas * Teleportlocs * blood_splatter_icons * Stuff and such * More stuff * RAD IO * More stuff and such * Blob shit * Changeling stuff * Add "Balance" to changelogs * Balance for changelog compiler + Auto Tagging * Update the PR template * hivemind_bank * Bip * sacrificed * Good shit * Better define * More cult shit * Devil shit * Gang shit * > borers Fix shit * Rename the define * Nuke * Objectives * Sandbox * Multiverse sword * Announce systems * Stuff and such * TC con * Airlock * doppllllerrrrrr * holopads * Shut up byond you inconsistent fuck * Sneaky fuck * Burp * Bip * Fixnshit * Port without regard * askdlfjs; * asdfjasoidojfi * Protected globals and more * SO MANY * ajsimkvahsaoisd * akfdsiaopwimfeoiwafaw * gsdfigjosidjfgiosdg * AHHHHHHHHHHHHHHHHHHHHHHH!!!!! * facerolll * ASDFASDFASDF * Removes the unused parts of dmm_suite * WIP * Fix quote * asdfjauwfnkjs * afwlunhskjfda * asfjlaiwuefhaf * SO CLOSE * wwwweeeeeewwwww * agdgmoewranwg * HOLY MOTHER OF FUCK AND THATS JUST HALF THE JOB?!? * Fix syntax errors * 100 errors * Another 100 * So many... * Ugh * More shit * kilme * Stuuuuuufffff * ajrgmrlshio;djfa;sdkl * jkbhkhjbmjvjmh * soi soi soi * butt * TODAY WE LEARNED THAT GLOBAL AND STATIC ARE THE EXACT SAME FUCKING THING * lllllllllllllllllllllllllllllllllllllllllll * afsdijfiawhnflnjhnwsdfs * yugykihlugk,kj * time to go * STUFFF!!! * AAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!! * ngoaijdjlfkamsdlkf * Break time * aufjsdklfalsjfi * CONTROL KAY AND PRAY * IT COMPILEELEELELAKLJFKLDAFJLKFDJLADKJHFLJKAJGAHIEJALDFJ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * Goteem * Fix testing mode * This does not belong in this PR * Convert it to a controller * Eh, fuck this option * Revert controllerization Ill do it some other time * Fix * Working controllerization * FOR THE LOVE OF CHRIST PROTECT THE LOGS * Protect admins and deadmins * Use the inbuilt proc
129 lines
4.2 KiB
Plaintext
129 lines
4.2 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 = 0
|
|
anchored = 1
|
|
obj_integrity = 150
|
|
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/weapon/paper))
|
|
I.loc = src
|
|
notices++
|
|
icon_state = "nboard0[notices]"
|
|
|
|
//attaching papers!!
|
|
/obj/structure/noticeboard/attackby(obj/item/weapon/O, mob/user, params)
|
|
if(istype(O, /obj/item/weapon/paper) || istype(O, /obj/item/weapon/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/weapon/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/weapon/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 & NODECONSTRUCT))
|
|
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(GLOB.access_captain)
|
|
|
|
/obj/structure/noticeboard/hop
|
|
name = "Head of Personnel's Notice Board"
|
|
desc = "Important notices from the Head of Personnel."
|
|
req_access = list(GLOB.access_hop)
|
|
|
|
/obj/structure/noticeboard/ce
|
|
name = "Chief Engineer's Notice Board"
|
|
desc = "Important notices from the Chief Engineer."
|
|
req_access = list(GLOB.access_ce)
|
|
|
|
/obj/structure/noticeboard/hos
|
|
name = "Head of Security's Notice Board"
|
|
desc = "Important notices from the Head of Security."
|
|
req_access = list(GLOB.access_hos)
|
|
|
|
/obj/structure/noticeboard/cmo
|
|
name = "Chief Medical Officer's Notice Board"
|
|
desc = "Important notices from the Chief Medical Officer."
|
|
req_access = list(GLOB.access_cmo)
|
|
|
|
/obj/structure/noticeboard/rd
|
|
name = "Research Director's Notice Board"
|
|
desc = "Important notices from the Research Director."
|
|
req_access = list(GLOB.access_rd)
|
|
|
|
/obj/structure/noticeboard/qm
|
|
name = "Quartermaster's Notice Board"
|
|
desc = "Important notices from the Quartermaster."
|
|
req_access = list(GLOB.access_qm)
|
|
|
|
/obj/structure/noticeboard/staff
|
|
name = "Staff Notice Board"
|
|
desc = "Important notices from the heads of staff."
|
|
req_access = list(GLOB.access_heads)
|