mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-15 02:03:48 +01:00
Merge branch 'map' into RadiantMaster
This commit is contained in:
@@ -57,7 +57,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
|
||||
data["cooldown"] = sendcooldown
|
||||
data["destination"] = destination
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "fax.tmpl", src.name, 500, 500)
|
||||
ui.set_initial_data(data)
|
||||
@@ -78,6 +78,9 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
|
||||
|
||||
else if(href_list["remove"])
|
||||
if(copyitem)
|
||||
if(get_dist(usr, src) >= 2)
|
||||
to_chat(usr, "\The [copyitem] is too far away for you to remove it.")
|
||||
return
|
||||
copyitem.loc = usr.loc
|
||||
usr.put_in_hands(copyitem)
|
||||
to_chat(usr, "<span class='notice'>You take \the [copyitem] out of \the [src].</span>")
|
||||
@@ -113,7 +116,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
|
||||
if(href_list["logout"])
|
||||
authenticated = 0
|
||||
|
||||
nanomanager.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/proc/sendfax(var/destination)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
icon_state = "tallcabinet"
|
||||
|
||||
|
||||
/obj/structure/filingcabinet/initialize()
|
||||
/obj/structure/filingcabinet/Initialize()
|
||||
for(var/obj/item/I in loc)
|
||||
if(istype(I, /obj/item/weapon/paper) || istype(I, /obj/item/weapon/folder) || istype(I, /obj/item/weapon/photo) || istype(I, /obj/item/weapon/paper_bundle))
|
||||
I.loc = src
|
||||
@@ -33,34 +33,34 @@
|
||||
|
||||
/obj/structure/filingcabinet/attackby(obj/item/P as obj, mob/user as mob)
|
||||
if(istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/folder) || istype(P, /obj/item/weapon/photo) || istype(P, /obj/item/weapon/paper_bundle))
|
||||
user << "<span class='notice'>You put [P] in [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You put [P] in [src].</span>")
|
||||
user.drop_item()
|
||||
P.loc = src
|
||||
icon_state = "[initial(icon_state)]-open"
|
||||
sleep(5)
|
||||
icon_state = initial(icon_state)
|
||||
updateUsrDialog()
|
||||
else if(istype(P, /obj/item/weapon/wrench))
|
||||
else if(P.is_wrench())
|
||||
playsound(loc, P.usesound, 50, 1)
|
||||
anchored = !anchored
|
||||
user << "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>"
|
||||
else if(istype(P, /obj/item/weapon/screwdriver))
|
||||
user << "<span class='notice'>You begin taking the [name] apart.</span>"
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>")
|
||||
else if(P.is_screwdriver())
|
||||
to_chat(user, "<span class='notice'>You begin taking the [name] apart.</span>")
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
if(do_after(user, 10 * P.toolspeed))
|
||||
playsound(loc, P.usesound, 50, 1)
|
||||
user << "<span class='notice'>You take the [name] apart.</span>"
|
||||
to_chat(user, "<span class='notice'>You take the [name] apart.</span>")
|
||||
new /obj/item/stack/material/steel( src.loc, 4 )
|
||||
for(var/obj/item/I in contents)
|
||||
I.forceMove(loc)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
user << "<span class='notice'>You can't put [P] in [src]!</span>"
|
||||
to_chat(user, "<span class='notice'>You can't put [P] in [src]!</span>")
|
||||
|
||||
/obj/structure/filingcabinet/attack_hand(mob/user as mob)
|
||||
if(contents.len <= 0)
|
||||
user << "<span class='notice'>\The [src] is empty.</span>"
|
||||
to_chat(user, "<span class='notice'>\The [src] is empty.</span>")
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
@@ -85,9 +85,9 @@
|
||||
I.loc = loc
|
||||
if(prob(25))
|
||||
step_rand(I)
|
||||
user << "<span class='notice'>You pull \a [I] out of [src] at random.</span>"
|
||||
to_chat(user, "<span class='notice'>You pull \a [I] out of [src] at random.</span>")
|
||||
return
|
||||
user << "<span class='notice'>You find nothing in [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You find nothing in [src].</span>")
|
||||
|
||||
/obj/structure/filingcabinet/Topic(href, href_list)
|
||||
if(href_list["retrieve"])
|
||||
|
||||
@@ -309,6 +309,7 @@
|
||||
t = replacetext(t, "\[/h2\]", "</H2>")
|
||||
t = replacetext(t, "\[h3\]", "<H3>")
|
||||
t = replacetext(t, "\[/h3\]", "</H3>")
|
||||
t = replacetext(t, "\[tab\]", " ")
|
||||
|
||||
if(!iscrayon)
|
||||
t = replacetext(t, "\[*\]", "<li>")
|
||||
@@ -635,3 +636,8 @@
|
||||
/obj/item/weapon/paper/shieldgen
|
||||
name = "Memo:Station Bubble Shield Generator."
|
||||
info = "<B>Hello Engineers</B><BR>\n<BR>\nYou might be wondering what happened to the shield generator.<BR>\nWell, Long story short, a bottle of vodka, and one 'enlightened' scientist later,<BR>\n It's particularly non-existing. We don't have time to replace it this shift, so grab a spare from your Secure storage. Good luck! -Interim Construction Specialist Tahls"
|
||||
|
||||
|
||||
/obj/item/weapon/paper/manifest
|
||||
name = "supply manifest"
|
||||
var/is_copy = 1
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
/obj/item/weapon/paper_bin/MouseDrop(mob/user as mob)
|
||||
if((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr))))))
|
||||
if(!istype(usr, /mob/living/simple_animal))
|
||||
if(!istype(usr, /mob/living/simple_mob))
|
||||
if( !usr.get_active_hand() ) //if active hand is empty
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
|
||||
|
||||
@@ -40,10 +40,10 @@
|
||||
if(istype(W, /obj/item/weapon/storage))
|
||||
empty_bin(user, W)
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
else if(W.is_wrench())
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
anchored = !anchored
|
||||
user << "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>")
|
||||
return
|
||||
else if(default_part_replacement(user, W))
|
||||
return
|
||||
@@ -60,7 +60,7 @@
|
||||
if(inoperable())
|
||||
return // Need powah!
|
||||
if(paperamount == max_paper)
|
||||
user << "<span class='warning'>\The [src] is full; please empty it before you continue.</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] is full; please empty it before you continue.</span>")
|
||||
return
|
||||
paperamount += paper_result
|
||||
user.drop_from_inventory(W)
|
||||
@@ -68,7 +68,7 @@
|
||||
playsound(src.loc, 'sound/items/pshred.ogg', 75, 1)
|
||||
flick(shred_anim, src)
|
||||
if(paperamount > max_paper)
|
||||
user <<"<span class='danger'>\The [src] was too full, and shredded paper goes everywhere!</span>"
|
||||
to_chat(user,"<span class='danger'>\The [src] was too full, and shredded paper goes everywhere!</span>")
|
||||
for(var/i=(paperamount-max_paper);i>0;i--)
|
||||
var/obj/item/weapon/shreddedp/SP = get_shredded_paper()
|
||||
SP.loc = get_turf(src)
|
||||
@@ -87,7 +87,7 @@
|
||||
return
|
||||
|
||||
if(!paperamount)
|
||||
usr << "<span class='notice'>\The [src] is empty.</span>"
|
||||
to_chat(usr, "<span class='notice'>\The [src] is empty.</span>")
|
||||
return
|
||||
|
||||
empty_bin(usr)
|
||||
@@ -99,7 +99,7 @@
|
||||
empty_into = null
|
||||
|
||||
if(empty_into && empty_into.contents.len >= empty_into.storage_slots)
|
||||
user << "<span class='notice'>\The [empty_into] is full.</span>"
|
||||
to_chat(user, "<span class='notice'>\The [empty_into] is full.</span>")
|
||||
return
|
||||
|
||||
while(paperamount)
|
||||
@@ -111,12 +111,12 @@
|
||||
break
|
||||
if(empty_into)
|
||||
if(paperamount)
|
||||
user << "<span class='notice'>You fill \the [empty_into] with as much shredded paper as it will carry.</span>"
|
||||
to_chat(user, "<span class='notice'>You fill \the [empty_into] with as much shredded paper as it will carry.</span>")
|
||||
else
|
||||
user << "<span class='notice'>You empty \the [src] into \the [empty_into].</span>"
|
||||
to_chat(user, "<span class='notice'>You empty \the [src] into \the [empty_into].</span>")
|
||||
|
||||
else
|
||||
user << "<span class='notice'>You empty \the [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You empty \the [src].</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/papershredder/proc/get_shredded_paper()
|
||||
@@ -137,7 +137,7 @@
|
||||
else
|
||||
icon_state = "shredder-off"
|
||||
// Fullness overlay
|
||||
overlays += "shredder-[max(0,min(5,Floor(paperamount/max_paper*5)))]"
|
||||
overlays += "shredder-[max(0,min(5,FLOOR(paperamount/max_paper*5, 1)))]"
|
||||
if (panel_open)
|
||||
overlays += "panel_open"
|
||||
|
||||
@@ -171,12 +171,12 @@
|
||||
if(user.restrained())
|
||||
return
|
||||
if(!P.lit)
|
||||
user << "<span class='warning'>\The [P] is not lit.</span>"
|
||||
to_chat(user, "<span class='warning'>\The [P] is not lit.</span>")
|
||||
return
|
||||
user.visible_message("<span class='warning'>\The [user] holds \the [P] up to \the [src]. It looks like [TU.he] [TU.is] trying to burn it!</span>", \
|
||||
"<span class='warning'>You hold \the [P] up to \the [src], burning it slowly.</span>")
|
||||
if(!do_after(user,20))
|
||||
user << "<span class='warning'>You must hold \the [P] steady to burn \the [src].</span>"
|
||||
to_chat(user, "<span class='warning'>You must hold \the [P] steady to burn \the [src].</span>")
|
||||
return
|
||||
user.visible_message("<span class='danger'>\The [user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.</span>", \
|
||||
"<span class='danger'>You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.</span>")
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
else
|
||||
data["isSilicon"] = null
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "photocopier.tmpl", src.name, 300, 250)
|
||||
ui.set_initial_data(data)
|
||||
@@ -80,7 +80,7 @@
|
||||
var/obj/item/weapon/paper_bundle/B = bundlecopy(copyitem)
|
||||
sleep(11*B.pages.len)
|
||||
else
|
||||
usr << "<span class='warning'>\The [copyitem] can't be copied by \the [src].</span>"
|
||||
to_chat(usr, "<span class='warning'>\The [copyitem] can't be copied by \the [src].</span>")
|
||||
break
|
||||
|
||||
use_power(active_power_usage)
|
||||
@@ -88,7 +88,7 @@
|
||||
if(copyitem)
|
||||
copyitem.loc = usr.loc
|
||||
usr.put_in_hands(copyitem)
|
||||
usr << "<span class='notice'>You take \the [copyitem] out of \the [src].</span>"
|
||||
to_chat(usr, "<span class='notice'>You take \the [copyitem] out of \the [src].</span>")
|
||||
copyitem = null
|
||||
else if(href_list["min"])
|
||||
if(copies > 1)
|
||||
@@ -118,7 +118,7 @@
|
||||
toner -= 5
|
||||
sleep(15)
|
||||
|
||||
nanomanager.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/photocopier/attackby(obj/item/O as obj, mob/user as mob)
|
||||
if(istype(O, /obj/item/weapon/paper) || istype(O, /obj/item/weapon/photo) || istype(O, /obj/item/weapon/paper_bundle))
|
||||
@@ -126,24 +126,24 @@
|
||||
user.drop_item()
|
||||
copyitem = O
|
||||
O.loc = src
|
||||
user << "<span class='notice'>You insert \the [O] into \the [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You insert \the [O] into \the [src].</span>")
|
||||
playsound(loc, "sound/machines/click.ogg", 100, 1)
|
||||
flick(insert_anim, src)
|
||||
else
|
||||
user << "<span class='notice'>There is already something in \the [src].</span>"
|
||||
to_chat(user, "<span class='notice'>There is already something in \the [src].</span>")
|
||||
else if(istype(O, /obj/item/device/toner))
|
||||
if(toner <= 10) //allow replacing when low toner is affecting the print darkness
|
||||
user.drop_item()
|
||||
user << "<span class='notice'>You insert the toner cartridge into \the [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You insert the toner cartridge into \the [src].</span>")
|
||||
var/obj/item/device/toner/T = O
|
||||
toner += T.toner_amount
|
||||
qdel(O)
|
||||
else
|
||||
user << "<span class='notice'>This cartridge is not yet ready for replacement! Use up the rest of the toner.</span>"
|
||||
else if(istype(O, /obj/item/weapon/wrench))
|
||||
to_chat(user, "<span class='notice'>This cartridge is not yet ready for replacement! Use up the rest of the toner.</span>")
|
||||
else if(O.is_wrench())
|
||||
playsound(loc, O.usesound, 50, 1)
|
||||
anchored = !anchored
|
||||
user << "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>")
|
||||
|
||||
else if(default_deconstruction_screwdriver(user, O))
|
||||
return
|
||||
|
||||
@@ -33,7 +33,6 @@ var/global/photo_count = 0
|
||||
var/icon/img //Big photo image
|
||||
var/scribble //Scribble on the back.
|
||||
var/icon/tiny
|
||||
var/cursed = 0
|
||||
var/photo_size = 3
|
||||
|
||||
/obj/item/weapon/photo/New()
|
||||
@@ -125,7 +124,6 @@ var/global/photo_count = 0
|
||||
icon_state = "camera"
|
||||
item_state = "camera"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 2000)
|
||||
var/pictures_max = 10
|
||||
@@ -237,10 +235,6 @@ var/global/photo_count = 0
|
||||
else
|
||||
mob_detail += "You can also see [A] on the photo[A:health < 75 ? " - [A] looks hurt":""].[holding ? " [holding]":"."]."
|
||||
|
||||
for(var/mob/living/simple_animal/hostile/statue/S in the_turf)
|
||||
if(S)
|
||||
mob_detail += "You can see \a [S] on the photo. Its stare makes you feel uneasy." //"That which holds the image of an angel, becomes itself an angel."
|
||||
|
||||
return mob_detail
|
||||
|
||||
/obj/item/device/camera/afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
|
||||
@@ -282,20 +276,7 @@ var/global/photo_count = 0
|
||||
y_c--
|
||||
x_c = x_c - size
|
||||
|
||||
|
||||
|
||||
|
||||
var/obj/item/weapon/photo/p = createpicture(target, user, turfs, mobs, flag)
|
||||
if(findtext(mobs, "Its stare makes you feel uneasy"))
|
||||
p.cursed = 1
|
||||
user.visible_message("<span class='userdanger'>Something starts to slowly manifest from the picture!</span>")
|
||||
spawn(150)
|
||||
var/turf/T = get_turf(p)
|
||||
var/mob/living/simple_animal/hostile/statue/S = new /mob/living/simple_animal/hostile/statue/(T)
|
||||
S.banishable = 1//At least you can get rid of those bastards
|
||||
T.visible_message("<span class='userdanger'>The photo turns into \a [S]!</span>")
|
||||
qdel(p)
|
||||
|
||||
|
||||
printpicture(user, p)
|
||||
|
||||
@@ -339,16 +320,6 @@ var/global/photo_count = 0
|
||||
p.pixel_y = pixel_y
|
||||
p.photo_size = photo_size
|
||||
p.scribble = scribble
|
||||
p.cursed = cursed
|
||||
if(p.cursed)
|
||||
var/turf/T = get_turf(p)
|
||||
T.visible_message("<span class='userdanger'>Something starts to slowly manifest from the picture!</span>")
|
||||
spawn(150)
|
||||
T = get_turf(p) //second time, because the photo could've moved
|
||||
var/mob/living/simple_animal/hostile/statue/S = new /mob/living/simple_animal/hostile/statue/(T)
|
||||
S.banishable = 1//At least you can get rid of those bastards
|
||||
T.visible_message("<span class='userdanger'>The photo turns into \a [S]!</span>")
|
||||
qdel(p)
|
||||
|
||||
if(copy_id)
|
||||
p.id = id
|
||||
|
||||
Reference in New Issue
Block a user