mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 03:25:49 +01:00
Lots of stuff, will elaborate later.
This commit is contained in:
@@ -1,167 +0,0 @@
|
||||
/obj/item/policetaperoll/attack_self(mob/user as mob)
|
||||
if(icon_state == "rollstart")
|
||||
tapestartx = src.loc.x
|
||||
tapestarty = src.loc.y
|
||||
tapestartz = src.loc.z
|
||||
usr << "\blue You place the first end of the police tape."
|
||||
icon_state = "rollstop"
|
||||
else
|
||||
tapeendx = src.loc.x
|
||||
tapeendy = src.loc.y
|
||||
tapeendz = src.loc.z
|
||||
var/tapetest = 0
|
||||
if(tapestartx == tapeendx && tapestarty > tapeendy && tapestartz == tapeendz)
|
||||
for(var/Y=tapestarty,Y>=tapeendy,Y--)
|
||||
var/turf/T = get_turf(locate(tapestartx,Y,tapestartz))
|
||||
if(T.density == 1)
|
||||
usr << "\blue You can't run police tape through a wall!"
|
||||
icon_state = "rollstart"
|
||||
return
|
||||
for(var/Y=tapestarty,Y>=tapeendy,Y--)
|
||||
var/turf/T = get_turf(locate(tapestartx,Y,tapestartz))
|
||||
for(var/obj/item/policetape/Ptest in T)
|
||||
if(Ptest.icon_state == "vertical")
|
||||
tapetest = 1
|
||||
if(tapetest != 1)
|
||||
var/obj/item/policetape/P = new/obj/item/policetape(tapestartx,Y,tapestartz)
|
||||
P.loc = locate(tapestartx,Y,tapestartz)
|
||||
P.icon_state = "vertical"
|
||||
usr << "\blue You finish placing the police tape." //Git Test
|
||||
|
||||
if(tapestartx == tapeendx && tapestarty < tapeendy && tapestartz == tapeendz)
|
||||
for(var/Y=tapestarty,Y<=tapeendy,Y++)
|
||||
var/turf/T = get_turf(locate(tapestartx,Y,tapestartz))
|
||||
if(T.density == 1)
|
||||
usr << "\blue You can't run police tape through a wall!"
|
||||
icon_state = "rollstart"
|
||||
return
|
||||
for(var/Y=tapestarty,Y<=tapeendy,Y++)
|
||||
var/turf/T = get_turf(locate(tapestartx,Y,tapestartz))
|
||||
for(var/obj/item/policetape/Ptest in T)
|
||||
if(Ptest.icon_state == "vertical")
|
||||
tapetest = 1
|
||||
if(tapetest != 1)
|
||||
var/obj/item/policetape/P = new/obj/item/policetape(tapestartx,Y,tapestartz)
|
||||
P.loc = locate(tapestartx,Y,tapestartz)
|
||||
P.icon_state = "vertical"
|
||||
usr << "\blue You finish placing the police tape."
|
||||
|
||||
if(tapestarty == tapeendy && tapestartx > tapeendx && tapestartz == tapeendz)
|
||||
for(var/X=tapestartx,X>=tapeendx,X--)
|
||||
var/turf/T = get_turf(locate(X,tapestarty,tapestartz))
|
||||
if(T.density == 1)
|
||||
usr << "\blue You can't run police tape through a wall!"
|
||||
icon_state = "rollstart"
|
||||
return
|
||||
for(var/X=tapestartx,X>=tapeendx,X--)
|
||||
var/turf/T = get_turf(locate(X,tapestarty,tapestartz))
|
||||
for(var/obj/item/policetape/Ptest in T)
|
||||
if(Ptest.icon_state == "horizontal")
|
||||
tapetest = 1
|
||||
if(tapetest != 1)
|
||||
var/obj/item/policetape/P = new/obj/item/policetape(X,tapestarty,tapestartz)
|
||||
P.loc = locate(X,tapestarty,tapestartz)
|
||||
P.icon_state = "horizontal"
|
||||
usr << "\blue You finish placing the police tape."
|
||||
|
||||
if(tapestarty == tapeendy && tapestartx < tapeendx && tapestartz == tapeendz)
|
||||
for(var/X=tapestartx,X<=tapeendx,X++)
|
||||
var/turf/T = get_turf(locate(X,tapestarty,tapestartz))
|
||||
if(T.density == 1)
|
||||
usr << "\blue You can't run police tape through a wall!"
|
||||
icon_state = "rollstart"
|
||||
return
|
||||
for(var/X=tapestartx,X<=tapeendx,X++)
|
||||
var/turf/T = get_turf(locate(X,tapestarty,tapestartz))
|
||||
for(var/obj/item/policetape/Ptest in T)
|
||||
if(Ptest.icon_state == "horizontal")
|
||||
tapetest = 1
|
||||
if(tapetest != 1)
|
||||
var/obj/item/policetape/P = new/obj/item/policetape(X,tapestarty,tapestartz)
|
||||
P.loc = locate(X,tapestarty,tapestartz)
|
||||
P.icon_state = "horizontal"
|
||||
usr << "\blue You finish placing the police tape."
|
||||
|
||||
if(tapestarty != tapeendy && tapestartx != tapeendx)
|
||||
usr << "\blue Police tape can only be laid horizontally or vertically."
|
||||
icon_state = "rollstart"
|
||||
|
||||
/obj/item/policetape/Bumped(M as mob)
|
||||
if(src.allowed(M))
|
||||
var/turf/T = get_turf(src)
|
||||
M:loc = T
|
||||
|
||||
/obj/item/policetape/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
|
||||
if ((mover.flags & 2 || istype(mover, /obj/effect/meteor) || mover.throwing == 1) )
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/item/policetape/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
breaktape(W, user)
|
||||
|
||||
/obj/item/policetape/attack_hand(mob/user as mob)
|
||||
breaktape(null, user)
|
||||
|
||||
/obj/item/policetape/attack_paw(mob/user as mob)
|
||||
breaktape(/obj/item/weapon/wirecutters,user)
|
||||
|
||||
/obj/item/policetape/proc/breaktape(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(user.a_intent == "help" && ((!is_sharp(W) && src.allowed(user)) ||(!is_cut(W) && !src.allowed(user))))
|
||||
user << "You can't break the tape with that!"
|
||||
return
|
||||
user.show_viewers(text("\blue [] breaks the police tape!", user))
|
||||
var/OX = src.x
|
||||
var/OY = src.y
|
||||
if(src.icon_state == "horizontal")
|
||||
var/N = 0
|
||||
var/X = OX + 1
|
||||
var/turf/T = src.loc
|
||||
while(N != 1)
|
||||
N = 1
|
||||
T = locate(X,T.y,T.z)
|
||||
for (var/obj/item/policetape/P in T)
|
||||
N = 0
|
||||
if(P.icon_state == "horizontal")
|
||||
del(P)
|
||||
X += 1
|
||||
|
||||
X = OX - 1
|
||||
N = 0
|
||||
while(N != 1)
|
||||
N = 1
|
||||
T = locate(X,T.y,T.z)
|
||||
for (var/obj/item/policetape/P in T)
|
||||
N = 0
|
||||
if(P.icon_state == "horizontal")
|
||||
del(P)
|
||||
X -= 1
|
||||
|
||||
if(src.icon_state == "vertical")
|
||||
var/N = 0
|
||||
var/Y = OY + 1
|
||||
var/turf/T = src.loc
|
||||
while(N != 1)
|
||||
N = 1
|
||||
T = locate(T.x,Y,T.z)
|
||||
for (var/obj/item/policetape/P in T)
|
||||
N = 0
|
||||
if(P.icon_state == "vertical")
|
||||
del(P)
|
||||
Y += 1
|
||||
|
||||
Y = OY - 1
|
||||
N = 0
|
||||
while(N != 1)
|
||||
N = 1
|
||||
T = locate(T.x,Y,T.z)
|
||||
for (var/obj/item/policetape/P in T)
|
||||
N = 0
|
||||
if(P.icon_state == "vertical")
|
||||
del(P)
|
||||
Y -= 1
|
||||
|
||||
del(src)
|
||||
return
|
||||
@@ -3,6 +3,7 @@
|
||||
desc = "Seems to have everything I need for my job in it, sweet."
|
||||
icon = 'suits.dmi'
|
||||
icon_state = "wardrobe"
|
||||
item_state = "wardrobe"
|
||||
w_class = 4
|
||||
var
|
||||
descriptor = "various clothing."
|
||||
|
||||
@@ -1,156 +0,0 @@
|
||||
// Contains: copy machine
|
||||
|
||||
/obj/machinery/copier
|
||||
name = "Copy Machine"
|
||||
icon = 'bureaucracy.dmi'
|
||||
icon_state = "copier"
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/num_copies = 1 // number of copies selected, will be maintained between jobs
|
||||
var/copying = 0 // are we copying
|
||||
var/job_num_copies = 0 // number of copies remaining
|
||||
var/top_open = 1 // the top is open
|
||||
var/obj/item/weapon/template // the paper OR photo being scanned
|
||||
var/copy_wait = 0 // wait for current page to finish
|
||||
var/max_copies = 10 // MAP EDITOR: can set the number of max copies, possibly to 5 or something for public, more for QM, robutist, etc.
|
||||
|
||||
/obj/machinery/copier/New()
|
||||
..()
|
||||
update()
|
||||
|
||||
/obj/machinery/copier/attackby(obj/item/weapon/O as obj, mob/user as mob)
|
||||
if(!top_open)
|
||||
return
|
||||
|
||||
if (istype(O, /obj/item/weapon/paper) || istype(O, /obj/item/weapon/photo))
|
||||
// put it inside
|
||||
template = O
|
||||
usr.drop_item()
|
||||
O.loc = src
|
||||
top_open = 0
|
||||
update()
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/copier/attack_paw(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/copier/attack_ai(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/copier/attack_hand(user as mob)
|
||||
// da UI
|
||||
var/dat
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(src.stat)
|
||||
user << "[name] does not seem to be responding to your button mashing."
|
||||
return
|
||||
|
||||
/*
|
||||
if(top_open)
|
||||
user << "[name] beeps, \"Please place a paper on top and close the lid.\""
|
||||
return
|
||||
*/
|
||||
|
||||
dat = "<HEAD><TITLE>Copy Machine</TITLE></HEAD><TT><b>Xeno Corp. Copying Machine</b><hr>"
|
||||
|
||||
if(copying)
|
||||
dat += "[job_num_copies] copies remaining.<br><br>"
|
||||
dat += "<A href='?src=\ref[src];cancel=1'>Cancel</a>"
|
||||
else
|
||||
if(!top_open)
|
||||
dat += "<A href='?src=\ref[src];open=1'>Open Top</a><br><br>"
|
||||
|
||||
dat += "Number of Copies: "
|
||||
|
||||
dat += "<A href='?src=\ref[src];num=-10'>-</a>"
|
||||
dat += "<A href='?src=\ref[src];num=-1'>-</a>"
|
||||
dat += " [num_copies] "
|
||||
dat += "<A href='?src=\ref[src];num=1'>+</a>"
|
||||
dat += "<A href='?src=\ref[src];num=10'>+</a><br><br>"
|
||||
|
||||
if(template)
|
||||
dat += "<A href='?src=\ref[src];copy=1'>Copy</a>"
|
||||
else
|
||||
dat += "<b>No paper to be copied.<br>"
|
||||
dat += "Please place a paper or photograph on top and close the lid.</b>"
|
||||
|
||||
dat += "<hr></TT>"
|
||||
|
||||
user << browse(dat, "window=copy_machine")
|
||||
onclose(user, "copy_machine")
|
||||
|
||||
/obj/machinery/copier/proc/update()
|
||||
if(top_open)
|
||||
icon_state = "copier_o"
|
||||
else if(copying)
|
||||
icon_state = "copier_s"
|
||||
else
|
||||
icon_state = "copier"
|
||||
|
||||
/obj/machinery/copier/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
if(href_list["num"])
|
||||
num_copies += text2num(href_list["num"])
|
||||
if(num_copies < 1)
|
||||
num_copies = 1
|
||||
else if(num_copies > max_copies)
|
||||
num_copies = max_copies
|
||||
updateDialog()
|
||||
if(href_list["open"])
|
||||
template.loc = src.loc
|
||||
template = null
|
||||
top_open = 1
|
||||
updateDialog()
|
||||
update()
|
||||
if(href_list["copy"])
|
||||
copying = 1
|
||||
job_num_copies = num_copies
|
||||
update()
|
||||
updateDialog()
|
||||
if(href_list["cancel"])
|
||||
copying = 0
|
||||
job_num_copies = 0
|
||||
update()
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/copier/process()
|
||||
if(src.stat)
|
||||
usr << "[name] does not seem to be responding to your button mashing."
|
||||
return
|
||||
|
||||
if(copying && !copy_wait)
|
||||
copy_wait = 1
|
||||
// make noise
|
||||
playsound(src, 'polaroid1.ogg', 50, 1)
|
||||
spawn(5)
|
||||
if(!copying)
|
||||
return // user cancelled
|
||||
|
||||
if(istype(template, /obj/item/weapon/paper))
|
||||
// make duplicate paper
|
||||
var/obj/item/weapon/paper/P = new(src.loc)
|
||||
P.name = template.name
|
||||
P.info = template:info
|
||||
P.stamped = template:stamped
|
||||
P.icon_state = template.icon_state
|
||||
else if(istype(template, /obj/item/weapon/photo))
|
||||
// make duplicate photo
|
||||
var/obj/item/weapon/photo/P = new(src.loc)
|
||||
P.name = template.name
|
||||
P.desc = template.desc
|
||||
P.icon = template.icon
|
||||
|
||||
// copy counting stuff
|
||||
job_num_copies -= 1
|
||||
if(job_num_copies == 0)
|
||||
usr << "[name] beeps happily."
|
||||
copying = 0
|
||||
update()
|
||||
updateDialog()
|
||||
copy_wait = 0
|
||||
@@ -1,23 +0,0 @@
|
||||
/obj/structure/filingcabinet
|
||||
name = "Filing Cabinet"
|
||||
desc = "A large cabinet with drawers."
|
||||
icon = 'computer.dmi'
|
||||
icon_state = "messyfiles"
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/filingcabinet/attackby(obj/item/weapon/paper/P,mob/M)
|
||||
if(istype(P))
|
||||
M << "You put the [P] in the [src]."
|
||||
M.drop_item()
|
||||
P.loc = src
|
||||
else
|
||||
M << "You can't put a [P] in the [src]!"
|
||||
|
||||
/obj/structure/filingcabinet/attack_hand(mob/user)
|
||||
if(src.contents.len <= 0)
|
||||
user << "The [src] is empty."
|
||||
return
|
||||
var/obj/item/weapon/paper/P = input(user,"Choose a sheet to take out.","[src]", "Cancel") as null|obj in src.contents
|
||||
if(in_range(src,user))
|
||||
P.loc = user.loc
|
||||
Reference in New Issue
Block a user