mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 11:34:19 +01:00
@@ -1093,6 +1093,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
|
||||
contains = list(/obj/structure/filingcabinet/chestdrawer,
|
||||
/obj/item/device/camera_film,
|
||||
/obj/item/weapon/hand_labeler,
|
||||
/obj/item/stack/tape_roll,
|
||||
/obj/item/weapon/paper_bin,
|
||||
/obj/item/weapon/pen,
|
||||
/obj/item/weapon/pen/blue,
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
name = "Guitar"
|
||||
result = /obj/item/device/guitar
|
||||
reqs = list(/obj/item/stack/sheet/wood = 5,
|
||||
/obj/item/stack/cable_coil = 6)
|
||||
/obj/item/stack/cable_coil = 6,
|
||||
/obj/item/stack/tape_roll = 5)
|
||||
tools = list(/obj/item/weapon/screwdriver, /obj/item/weapon/wirecutters)
|
||||
time = 80
|
||||
@@ -0,0 +1,113 @@
|
||||
/obj/item/stack/tape_roll
|
||||
name = "tape roll"
|
||||
desc = "A roll of sticky tape. Possibly for taping ducks... or was that ducts?"
|
||||
icon = 'icons/obj/bureaucracy.dmi'
|
||||
icon_state = "taperoll"
|
||||
w_class = 1
|
||||
amount = 10
|
||||
max_amount = 10
|
||||
|
||||
/obj/item/stack/tape_roll/New(var/loc, var/amount=null)
|
||||
..()
|
||||
|
||||
update_icon()
|
||||
|
||||
/* -- Disabled for now until it has a use --
|
||||
/obj/item/stack/tape_roll/attack_self(mob/user as mob)
|
||||
user << "You remove a length of tape from [src]."
|
||||
|
||||
var/obj/item/weapon/ducttape/tape = new()
|
||||
user.put_in_hands(tape)
|
||||
*/
|
||||
|
||||
/obj/item/stack/tape_roll/proc/stick(var/obj/item/weapon/W, mob/user)
|
||||
if(!istype(W, /obj/item/weapon/paper))
|
||||
return
|
||||
|
||||
user.unEquip(W)
|
||||
var/obj/item/weapon/ducttape/tape = new(get_turf(src))
|
||||
tape.attach(W)
|
||||
user.put_in_hands(tape)
|
||||
|
||||
/obj/item/stack/tape_roll/update_icon()
|
||||
var/amount = get_amount()
|
||||
if((amount <= 2) && (amount > 0))
|
||||
icon_state = "taperoll"
|
||||
if((amount <= 4) && (amount > 2))
|
||||
icon_state = "taperoll-2"
|
||||
if((amount <= 6) && (amount > 4))
|
||||
icon_state = "taperoll-3"
|
||||
if((amount > 6))
|
||||
icon_state = "taperoll-4"
|
||||
else
|
||||
icon_state = "taperoll-4"
|
||||
|
||||
/obj/item/weapon/ducttape
|
||||
name = "tape"
|
||||
desc = "A piece of sticky tape."
|
||||
icon = 'icons/obj/bureaucracy.dmi'
|
||||
icon_state = "tape"
|
||||
w_class = 1
|
||||
layer = 4
|
||||
anchored = 1 //it's sticky, no you cant move it
|
||||
|
||||
var/obj/item/weapon/stuck = null
|
||||
|
||||
/obj/item/weapon/ducttape/New()
|
||||
..()
|
||||
flags |= NOBLUDGEON
|
||||
|
||||
/obj/item/weapon/ducttape/examine(mob/user)
|
||||
return stuck.examine(user)
|
||||
|
||||
/obj/item/weapon/ducttape/proc/attach(var/obj/item/weapon/W)
|
||||
stuck = W
|
||||
W.forceMove(src)
|
||||
icon_state = W.icon_state + "_taped"
|
||||
name = W.name + " (taped)"
|
||||
overlays = W.overlays
|
||||
|
||||
/obj/item/weapon/ducttape/attack_self(mob/user)
|
||||
if(!stuck)
|
||||
return
|
||||
|
||||
user << "You remove \the [initial(name)] from [stuck]."
|
||||
|
||||
user.unEquip(src)
|
||||
stuck.forceMove(get_turf(src))
|
||||
user.put_in_hands(stuck)
|
||||
stuck = null
|
||||
overlays = null
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/ducttape/afterattack(var/A, mob/user, flag, params)
|
||||
if(!in_range(user, A) || istype(A, /obj/machinery/door) || !stuck)
|
||||
return
|
||||
|
||||
var/turf/target_turf = get_turf(A)
|
||||
var/turf/source_turf = get_turf(user)
|
||||
|
||||
var/dir_offset = 0
|
||||
if(target_turf != source_turf)
|
||||
dir_offset = get_dir(source_turf, target_turf)
|
||||
if(!(dir_offset in cardinal))
|
||||
user << "You cannot reach that from here." // can only place stuck papers in cardinal directions, to
|
||||
return // reduce papers around corners issue.
|
||||
|
||||
user.unEquip(src)
|
||||
forceMove(source_turf)
|
||||
|
||||
if(params)
|
||||
var/list/mouse_control = params2list(params)
|
||||
if(mouse_control["icon-x"])
|
||||
pixel_x = text2num(mouse_control["icon-x"]) - 16
|
||||
if(dir_offset & EAST)
|
||||
pixel_x += 32
|
||||
else if(dir_offset & WEST)
|
||||
pixel_x -= 32
|
||||
if(mouse_control["icon-y"])
|
||||
pixel_y = text2num(mouse_control["icon-y"]) - 16
|
||||
if(dir_offset & NORTH)
|
||||
pixel_y += 32
|
||||
else if(dir_offset & SOUTH)
|
||||
pixel_y -= 32
|
||||
@@ -101,4 +101,5 @@
|
||||
prob(3);/obj/item/stack/cable_coil,\
|
||||
prob(2);/obj/random/toolbox,\
|
||||
prob(2);/obj/item/weapon/storage/belt/utility,\
|
||||
prob(5);/obj/random/tool)
|
||||
prob(5);/obj/random/tool,\
|
||||
prob(3);/obj/item/stack/tape_roll)
|
||||
@@ -358,6 +358,12 @@
|
||||
if(user.mind && (user.mind.assigned_role == "Clown"))
|
||||
clown = 1
|
||||
|
||||
if(istype(P, /obj/item/stack/tape_roll))
|
||||
var/obj/item/stack/tape_roll/tape = P
|
||||
tape.stick(src, user)
|
||||
tape.use(1)
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/photo))
|
||||
if (istype(P, /obj/item/weapon/paper/carbon))
|
||||
var/obj/item/weapon/paper/carbon/C = P
|
||||
|
||||
@@ -35,8 +35,9 @@
|
||||
user.unEquip(P)
|
||||
P.loc = src
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
user:update_inv_l_hand()
|
||||
user:update_inv_r_hand()
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.update_inv_l_hand()
|
||||
H.update_inv_r_hand()
|
||||
else if(istype(W, /obj/item/weapon/photo))
|
||||
amount++
|
||||
if(screen == 2)
|
||||
@@ -57,6 +58,8 @@
|
||||
user << "<span class='notice'>You add \the [W.name] to [(src.name == "paper bundle") ? "the paper bundle" : src.name].</span>"
|
||||
del(W)
|
||||
else
|
||||
if(istype(W, /obj/item/stack/tape_roll))
|
||||
return 0
|
||||
if(istype(W, /obj/item/weapon/pen) || istype(W, /obj/item/toy/crayon))
|
||||
usr << browse("", "window=[name]") //Closes the dialog
|
||||
P = src[page]
|
||||
|
||||
Reference in New Issue
Block a user