mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 01:53:35 +01:00
Ports Holoprojectors
This commit is contained in:
@@ -1,203 +0,0 @@
|
||||
//Define all tape types in policetape.dm
|
||||
/obj/item/taperoll
|
||||
name = "tape roll"
|
||||
icon = 'icons/policetape.dmi'
|
||||
icon_state = "rollstart"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/turf/start
|
||||
var/turf/end
|
||||
var/tape_type = /obj/item/tape
|
||||
var/icon_base
|
||||
|
||||
var/list/image/hazard_overlays
|
||||
var/list/tape_roll_applications = list()
|
||||
|
||||
/obj/item/tape
|
||||
name = "tape"
|
||||
icon = 'icons/policetape.dmi'
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/icon_base
|
||||
|
||||
/obj/item/tape/New()
|
||||
..()
|
||||
if(!hazard_overlays)
|
||||
hazard_overlays = list()
|
||||
hazard_overlays["[NORTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "N")
|
||||
hazard_overlays["[EAST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "E")
|
||||
hazard_overlays["[SOUTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "S")
|
||||
hazard_overlays["[WEST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "W")
|
||||
|
||||
/obj/item/taperoll/New() //just using tape is not enough to guarantee the overlays are genned
|
||||
..()
|
||||
if(!hazard_overlays)
|
||||
hazard_overlays = list()
|
||||
hazard_overlays["[NORTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "N")
|
||||
hazard_overlays["[EAST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "E")
|
||||
hazard_overlays["[SOUTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "S")
|
||||
hazard_overlays["[WEST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "W")
|
||||
|
||||
/obj/item/taperoll/police
|
||||
name = "police tape"
|
||||
desc = "A roll of police tape used to block off crime scenes from the public."
|
||||
icon_state = "police_start"
|
||||
tape_type = /obj/item/tape/police
|
||||
icon_base = "police"
|
||||
|
||||
/obj/item/tape/police
|
||||
name = "police tape"
|
||||
desc = "A length of police tape. Do not cross."
|
||||
req_one_access = list(access_security,access_forensics_lockers)
|
||||
icon_base = "police"
|
||||
|
||||
/obj/item/taperoll/engineering
|
||||
name = "engineering tape"
|
||||
desc = "A roll of engineering tape used to block off working areas from the public."
|
||||
icon_state = "engineering_start"
|
||||
tape_type = /obj/item/tape/engineering
|
||||
icon_base = "engineering"
|
||||
|
||||
/obj/item/tape/engineering
|
||||
name = "engineering tape"
|
||||
desc = "A length of engineering tape. Better not cross it."
|
||||
req_one_access = list(access_engine,access_atmospherics)
|
||||
icon_base = "engineering"
|
||||
|
||||
/obj/item/taperoll/attack_self(mob/user as mob)
|
||||
if(icon_state == "[icon_base]_start")
|
||||
start = get_turf(src)
|
||||
to_chat(usr, "<span class='notice'>You place the first end of the [src].</span>")
|
||||
icon_state = "[icon_base]_stop"
|
||||
else
|
||||
icon_state = "[icon_base]_start"
|
||||
end = get_turf(src)
|
||||
if(start.y != end.y && start.x != end.x || start.z != end.z)
|
||||
to_chat(usr, "<span class='notice'>[src] can only be laid horizontally or vertically.</span>")
|
||||
return
|
||||
|
||||
var/turf/cur = start
|
||||
var/dir
|
||||
if(start.x == end.x)
|
||||
var/d = end.y-start.y
|
||||
if(d) d = d/abs(d)
|
||||
end = get_turf(locate(end.x,end.y+d,end.z))
|
||||
dir = "v"
|
||||
else
|
||||
var/d = end.x-start.x
|
||||
if(d) d = d/abs(d)
|
||||
end = get_turf(locate(end.x+d,end.y,end.z))
|
||||
dir = "h"
|
||||
|
||||
var/can_place = 1
|
||||
while(cur!=end && can_place)
|
||||
if(cur.density == 1)
|
||||
can_place = 0
|
||||
else if(istype(cur, /turf/space))
|
||||
can_place = 0
|
||||
else
|
||||
for(var/obj/O in cur)
|
||||
if(!istype(O, /obj/item/tape) && O.density)
|
||||
can_place = 0
|
||||
break
|
||||
cur = get_step_towards(cur,end)
|
||||
if(!can_place)
|
||||
to_chat(usr, "<span class='notice'>You can't run \the [src] through that!</span>")
|
||||
return
|
||||
|
||||
cur = start
|
||||
var/tapetest = 0
|
||||
while(cur!=end)
|
||||
for(var/obj/item/tape/Ptest in cur)
|
||||
if(Ptest.icon_state == "[Ptest.icon_base]_[dir]")
|
||||
tapetest = 1
|
||||
if(tapetest != 1)
|
||||
var/obj/item/tape/P = new tape_type(cur)
|
||||
P.icon_state = "[P.icon_base]_[dir]"
|
||||
cur = get_step_towards(cur,end)
|
||||
//is_blocked_turf(var/turf/T)
|
||||
to_chat(usr, "<span class='notice'>You finish placing the [src].</span>")//Git Test
|
||||
|
||||
|
||||
/obj/item/taperoll/afterattack(var/atom/A, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if(istype(A, /obj/machinery/door/airlock))
|
||||
var/turf/T = get_turf(A)
|
||||
var/obj/item/tape/P = new tape_type(T.x,T.y,T.z)
|
||||
P.loc = locate(T.x,T.y,T.z)
|
||||
P.icon_state = "[src.icon_base]_door"
|
||||
P.layer = 3.2
|
||||
to_chat(user, "<span class='notice'>You finish placing the [src].</span>")
|
||||
|
||||
if(istype(A, /turf/simulated/floor) ||istype(A, /turf/unsimulated/floor))
|
||||
var/turf/F = A
|
||||
var/direction = user.loc == F ? user.dir : turn(user.dir, 180)
|
||||
var/icon/hazard_overlay = hazard_overlays["[direction]"]
|
||||
if(tape_roll_applications[F] == null)
|
||||
tape_roll_applications[F] = 0
|
||||
|
||||
if(tape_roll_applications[F] & direction) // hazard_overlay in F.overlays wouldn't work.
|
||||
user.visible_message("[user] uses the adhesive of \the [src] to remove area markings from \the [F].", "You use the adhesive of \the [src] to remove area markings from \the [F].")
|
||||
F.overlays -= hazard_overlay
|
||||
tape_roll_applications[F] &= ~direction
|
||||
else
|
||||
user.visible_message("[user] applied \the [src] on \the [F] to create area markings.", "You apply \the [src] on \the [F] to create area markings.")
|
||||
F.overlays |= hazard_overlay
|
||||
tape_roll_applications[F] |= direction
|
||||
return
|
||||
|
||||
/obj/item/tape/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(!density) return 1
|
||||
if(height==0) return 1
|
||||
|
||||
if((mover.pass_flags & PASSTABLE || istype(mover, /obj/effect/meteor) || mover.throwing))
|
||||
return 1
|
||||
else if(ismob(mover) && allowed(mover))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/item/tape/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
breaktape(W, user)
|
||||
|
||||
/obj/item/tape/attack_hand(mob/user as mob)
|
||||
if(user.a_intent == INTENT_HELP && src.allowed(user))
|
||||
user.visible_message("<span class=notice>[user] lifts [src], allowing passage.</span>", "<span class=notice>You lift [src], allowing passage.</span>")
|
||||
src.density = 0
|
||||
spawn(200)
|
||||
src.density = 1
|
||||
else
|
||||
breaktape(/obj/item/soap, user)//cant be null, and can't be sharp.
|
||||
|
||||
/obj/item/tape/attack_alien(mob/user as mob)
|
||||
breaktape(/obj/item/wirecutters,user)
|
||||
|
||||
/obj/item/tape/proc/breaktape(obj/item/W as obj, mob/user as mob)
|
||||
if(user.a_intent == INTENT_HELP && ((!is_pointed(W) && src.allowed(user))))
|
||||
to_chat(user, "You can't break the [src] with that!")
|
||||
return
|
||||
user.visible_message("<span class=warning>[user] breaks the [src]!</span>", "<span class=warning>You break the [src]!</span>")
|
||||
|
||||
var/dir[2]
|
||||
var/icon_dir = src.icon_state
|
||||
if(icon_dir == "[src.icon_base]_h")
|
||||
dir[1] = EAST
|
||||
dir[2] = WEST
|
||||
if(icon_dir == "[src.icon_base]_v")
|
||||
dir[1] = NORTH
|
||||
dir[2] = SOUTH
|
||||
|
||||
for(var/i=1;i<3;i++)
|
||||
var/N = 0
|
||||
var/turf/cur = get_step(src,dir[i])
|
||||
while(N != 1)
|
||||
N = 1
|
||||
for(var/obj/item/tape/P in cur)
|
||||
if(P.icon_state == icon_dir)
|
||||
N = 0
|
||||
qdel(P)
|
||||
cur = get_step(cur,dir[i])
|
||||
|
||||
qdel(src)
|
||||
return
|
||||
@@ -1,53 +1,123 @@
|
||||
/obj/item/holosign_creator
|
||||
name = "holographic sign projector"
|
||||
desc = "A handy-dandy hologaphic projector that displays a janitorial sign."
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
desc = "A handy-dandy holographic projector that displays a janitorial sign."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "signmaker"
|
||||
item_state = "electronic"
|
||||
force = 5
|
||||
force = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
origin_tech = "magnets=1;programming=3"
|
||||
flags = NOBLUDGEON
|
||||
var/list/signs = list()
|
||||
var/max_signs = 20
|
||||
|
||||
/obj/item/holosign_creator/Destroy()
|
||||
QDEL_LIST(signs)
|
||||
return ..()
|
||||
var/max_signs = 10
|
||||
var/creation_time = 0 //time to create a holosign in deciseconds.
|
||||
var/holosign_type = /obj/structure/holosign/wetsign
|
||||
var/holocreator_busy = FALSE //to prevent placing multiple holo barriers at once
|
||||
|
||||
/obj/item/holosign_creator/afterattack(atom/target, mob/user, flag)
|
||||
if(flag)
|
||||
if(!check_allowed_items(target, 1))
|
||||
return
|
||||
var/turf/T = get_turf(target)
|
||||
var/obj/effect/overlay/holograph/H = locate() in T
|
||||
var/obj/structure/holosign/H = locate(holosign_type) in T
|
||||
if(H)
|
||||
to_chat(user, "<span class='notice'>You use [src] to destroy [H].</span>")
|
||||
signs -= H
|
||||
to_chat(user, "<span class='notice'>You use [src] to deactivate [H].</span>")
|
||||
qdel(H)
|
||||
else
|
||||
if(signs.len < max_signs)
|
||||
H = new(get_turf(target))
|
||||
signs += H
|
||||
to_chat(user, "<span class='notice'>You create \a [H] with [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] is projecting at max capacity!</span>")
|
||||
if(!is_blocked_turf(T, TRUE)) //can't put holograms on a tile that has dense stuff
|
||||
if(holocreator_busy)
|
||||
to_chat(user, "<span class='notice'>[src] is busy creating a hologram.</span>")
|
||||
return
|
||||
if(signs.len < max_signs)
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 20, 1)
|
||||
if(creation_time)
|
||||
holocreator_busy = TRUE
|
||||
if(!do_after(user, creation_time, target = target))
|
||||
holocreator_busy = FALSE
|
||||
return
|
||||
holocreator_busy = FALSE
|
||||
if(signs.len >= max_signs)
|
||||
return
|
||||
if(is_blocked_turf(T, TRUE)) //don't try to sneak dense stuff on our tile during the wait.
|
||||
return
|
||||
H = new holosign_type(get_turf(target), src)
|
||||
to_chat(user, "<span class='notice'>You create [H] with [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] is projecting at max capacity!</span>")
|
||||
|
||||
/obj/item/holosign_creator/attack(mob/living/carbon/human/M, mob/user)
|
||||
return
|
||||
|
||||
/obj/item/holosign_creator/attack_self(mob/user)
|
||||
if(signs.len)
|
||||
var/list/L = signs.Copy()
|
||||
for(var/sign in L)
|
||||
qdel(sign)
|
||||
signs -= sign
|
||||
for(var/H in signs)
|
||||
qdel(H)
|
||||
to_chat(user, "<span class='notice'>You clear all active holograms.</span>")
|
||||
|
||||
/obj/effect/overlay/holograph
|
||||
name = "wet floor sign"
|
||||
desc = "The words flicker as if they mean nothing."
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "holosign"
|
||||
anchored = 1
|
||||
armor = list(melee = 0, bullet = 50, laser = 50, energy = 50, bomb = 0, bio = 0, rad = 0)
|
||||
|
||||
/obj/item/holosign_creator/security
|
||||
name = "security holobarrier projector"
|
||||
desc = "A holographic projector that creates holographic security barriers."
|
||||
icon_state = "signmaker_sec"
|
||||
holosign_type = /obj/structure/holosign/barrier
|
||||
creation_time = 30
|
||||
max_signs = 6
|
||||
|
||||
/obj/item/holosign_creator/engineering
|
||||
name = "engineering holobarrier projector"
|
||||
desc = "A holographic projector that creates holographic engineering barriers."
|
||||
icon_state = "signmaker_engi"
|
||||
holosign_type = /obj/structure/holosign/barrier/engineering
|
||||
creation_time = 30
|
||||
max_signs = 6
|
||||
|
||||
/obj/item/holosign_creator/atmos
|
||||
name = "ATMOS holofan projector"
|
||||
desc = "A holographic projector that creates holographic barriers that prevent changes in atmosphere conditions."
|
||||
icon_state = "signmaker_engi"
|
||||
holosign_type = /obj/structure/holosign/barrier/atmos
|
||||
creation_time = 0
|
||||
max_signs = 3
|
||||
|
||||
/obj/item/holosign_creator/cyborg
|
||||
name = "Energy Barrier Projector"
|
||||
desc = "A holographic projector that creates fragile energy fields."
|
||||
creation_time = 15
|
||||
max_signs = 9
|
||||
holosign_type = /obj/structure/holosign/barrier/cyborg
|
||||
var/shock = 0
|
||||
|
||||
/obj/item/holosign_creator/cyborg/attack_self(mob/user)
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
|
||||
if(shock)
|
||||
to_chat(user, "<span class='notice'>You clear all active holograms, and reset your projector to normal.</span>")
|
||||
holosign_type = /obj/structure/holosign/barrier/cyborg
|
||||
creation_time = 5
|
||||
if(signs.len)
|
||||
for(var/H in signs)
|
||||
qdel(H)
|
||||
shock = 0
|
||||
return
|
||||
else if(R.emagged && !shock)
|
||||
to_chat(user, "<span class='warning'>You clear all active holograms, and overload your energy projector!</span>")
|
||||
holosign_type = /obj/structure/holosign/barrier/cyborg/hacked
|
||||
creation_time = 30
|
||||
if(signs.len)
|
||||
for(var/H in signs)
|
||||
qdel(H)
|
||||
shock = 1
|
||||
return
|
||||
else
|
||||
if(signs.len)
|
||||
for(var/H in signs)
|
||||
qdel(H)
|
||||
to_chat(user, "<span class='notice'>You clear all active holograms.</span>")
|
||||
if(signs.len)
|
||||
for(var/H in signs)
|
||||
qdel(H)
|
||||
to_chat(user, "<span class='notice'>You clear all active holograms.</span>")
|
||||
@@ -58,8 +58,8 @@
|
||||
/obj/item/stack/cable_coil,
|
||||
/obj/item/t_scanner,
|
||||
/obj/item/analyzer,
|
||||
/obj/item/taperoll/engineering,
|
||||
/obj/item/extinguisher/mini)
|
||||
/obj/item/extinguisher/mini,
|
||||
/obj/item/holosign_creator)
|
||||
|
||||
/obj/item/storage/belt/utility/full/New()
|
||||
..()
|
||||
@@ -192,7 +192,6 @@
|
||||
/obj/item/melee/baton,
|
||||
/obj/item/melee/classic_baton,
|
||||
/obj/item/flashlight/seclite,
|
||||
/obj/item/taperoll/police,
|
||||
/obj/item/melee/classic_baton/telescopic,
|
||||
/obj/item/restraints/legcuffs/bola)
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
new /obj/item/clothing/suit/storage/hazardvest(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/multitool(src)
|
||||
new /obj/item/holosign_creator/engineering(src)
|
||||
new /obj/item/flash(src)
|
||||
new /obj/item/taperoll/engineering(src)
|
||||
new /obj/item/clothing/head/beret/eng(src)
|
||||
new /obj/item/door_remote/chief_engineer(src)
|
||||
new /obj/item/rpd(src)
|
||||
@@ -102,6 +102,7 @@
|
||||
new /obj/item/storage/backpack/satchel_eng(src)
|
||||
new /obj/item/storage/backpack/duffel/engineering(src)
|
||||
new /obj/item/storage/toolbox/mechanical(src)
|
||||
new /obj/item/holosign_creator/engineering(src)
|
||||
new /obj/item/radio/headset/headset_eng(src)
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
new /obj/item/clothing/under/rank/engineer/skirt(src)
|
||||
@@ -109,7 +110,6 @@
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/clothing/glasses/meson(src)
|
||||
new /obj/item/cartridge/engineering(src)
|
||||
new /obj/item/taperoll/engineering(src)
|
||||
new /obj/item/clothing/head/beret/eng(src)
|
||||
|
||||
|
||||
@@ -128,7 +128,6 @@
|
||||
new /obj/item/radio/headset/headset_eng(src)
|
||||
new /obj/item/cartridge/atmos(src)
|
||||
new /obj/item/storage/toolbox/mechanical(src)
|
||||
new /obj/item/taperoll/engineering(src)
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/industrial(src)
|
||||
else
|
||||
@@ -138,6 +137,7 @@
|
||||
new /obj/item/clothing/suit/storage/hazardvest(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/tank/emergency_oxygen/engi(src)
|
||||
new /obj/item/holosign_creator/atmos(src)
|
||||
new /obj/item/watertank/atmos(src)
|
||||
new /obj/item/clothing/suit/fire/atmos(src)
|
||||
new /obj/item/clothing/head/hardhat/atmos(src)
|
||||
|
||||
@@ -115,11 +115,11 @@
|
||||
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
|
||||
new /obj/item/storage/lockbox/mindshield(src)
|
||||
new /obj/item/storage/box/flashbangs(src)
|
||||
new /obj/item/holosign_creator/security(src)
|
||||
new /obj/item/clothing/mask/gas/sechailer/hos(src)
|
||||
new /obj/item/shield/riot/tele(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/storage/belt/security/sec(src)
|
||||
new /obj/item/taperoll/police(src)
|
||||
new /obj/item/gun/energy/gun/hos(src)
|
||||
new /obj/item/door_remote/head_of_security(src)
|
||||
new /obj/item/reagent_containers/food/drinks/mug/hos(src)
|
||||
@@ -151,8 +151,8 @@
|
||||
new /obj/item/clothing/under/rank/warden/corp(src)
|
||||
new /obj/item/clothing/under/rank/warden/skirt(src)
|
||||
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
|
||||
new /obj/item/holosign_creator/security(src)
|
||||
new /obj/item/clothing/mask/gas/sechailer/warden(src)
|
||||
new /obj/item/taperoll/police(src)
|
||||
new /obj/item/storage/box/zipties(src)
|
||||
new /obj/item/storage/box/flashbangs(src)
|
||||
new /obj/item/reagent_containers/spray/pepper(src)
|
||||
@@ -190,7 +190,6 @@
|
||||
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
|
||||
new /obj/item/clothing/head/helmet(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/taperoll/police(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/brigdoc
|
||||
@@ -344,10 +343,10 @@
|
||||
new /obj/item/ammo_box/c38(src)
|
||||
new /obj/item/ammo_box/c38(src)
|
||||
new /obj/item/gun/projectile/revolver/detective(src)
|
||||
new /obj/item/taperoll/police(src)
|
||||
new /obj/item/clothing/accessory/holster/armpit(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/yeah(src)
|
||||
new /obj/item/flashlight/seclite(src)
|
||||
new /obj/item/holosign_creator/security(src)
|
||||
new /obj/item/clothing/accessory/black(src)
|
||||
new /obj/item/taperecorder(src)
|
||||
new /obj/item/storage/box/tapes(src)
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
var/obj/item/storage/toolbox/mechanical/mybluetoolbox = null
|
||||
var/obj/item/storage/toolbox/electrical/myyellowtoolbox = null
|
||||
var/obj/item/storage/toolbox/emergency/myredtoolbox = null
|
||||
var/obj/item/taperoll/engineering/myengitape = null
|
||||
|
||||
/obj/structure/engineeringcart/Destroy()
|
||||
QDEL_NULL(myglass)
|
||||
@@ -22,7 +21,6 @@
|
||||
QDEL_NULL(mybluetoolbox)
|
||||
QDEL_NULL(myyellowtoolbox)
|
||||
QDEL_NULL(myredtoolbox)
|
||||
QDEL_NULL(myengitape)
|
||||
return ..()
|
||||
|
||||
/obj/structure/engineeringcart/proc/put_in_cart(obj/item/I, mob/user)
|
||||
@@ -83,13 +81,6 @@
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, fail_msg)
|
||||
else if(istype(I, /obj/item/taperoll/engineering/))
|
||||
if(!myengitape)
|
||||
put_in_cart(I, user)
|
||||
myengitape=I
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, fail_msg)
|
||||
else if(istype(I, /obj/item/wrench))
|
||||
if(!anchored && !isinspace())
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
@@ -125,8 +116,6 @@
|
||||
dat += "<a href='?src=[UID()];redtoolbox=1'>[myredtoolbox.name]</a><br>"
|
||||
if(myyellowtoolbox)
|
||||
dat += "<a href='?src=[UID()];yellowtoolbox=1'>[myyellowtoolbox.name]</a><br>"
|
||||
if(myengitape)
|
||||
dat += "<a href='?src=[UID()];engitape=1'>[myengitape.name]</a><br>"
|
||||
var/datum/browser/popup = new(user, "engicart", name, 240, 160)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
@@ -171,16 +160,12 @@
|
||||
user.put_in_hands(myyellowtoolbox)
|
||||
to_chat(user, "<span class='notice'>You take [myyellowtoolbox] from [src].</span>")
|
||||
myyellowtoolbox = null
|
||||
if(href_list["engitape"])
|
||||
if(myengitape)
|
||||
user.put_in_hands(myengitape)
|
||||
to_chat(user, "<span class='notice'>You take [myengitape] from [src].</span>")
|
||||
myengitape = null
|
||||
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/structure/engineeringcart/update_icon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(myglass)
|
||||
overlays += "cart_glass"
|
||||
if(mymetal)
|
||||
@@ -194,6 +179,4 @@
|
||||
if(myredtoolbox)
|
||||
overlays += "cart_redtoolbox"
|
||||
if(myyellowtoolbox)
|
||||
overlays += "cart_yellowtoolbox"
|
||||
if(myengitape)
|
||||
overlays += "cart_engitape"
|
||||
overlays += "cart_yellowtoolbox"
|
||||
@@ -0,0 +1,135 @@
|
||||
|
||||
//holographic signs and barriers
|
||||
|
||||
/obj/structure/holosign
|
||||
name = "holo sign"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
anchored = TRUE
|
||||
max_integrity = 1
|
||||
armor = list("melee" = 0, "bullet" = 50, "laser" = 50, "energy" = 50, "bomb" = 0, "bio" = 0, "rad" = 0)
|
||||
var/obj/item/holosign_creator/projector
|
||||
|
||||
/obj/structure/holosign/New(loc, source_projector)
|
||||
if(source_projector)
|
||||
projector = source_projector
|
||||
projector.signs += src
|
||||
..()
|
||||
|
||||
/obj/structure/holosign/Destroy()
|
||||
if(projector)
|
||||
projector.signs -= src
|
||||
projector = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/holosign/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
user.do_attack_animation(src)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
take_damage(5 , BRUTE, "melee", 1)
|
||||
|
||||
/obj/structure/holosign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
playsound(loc, 'sound/weapons/egloves.ogg', 80, 1)
|
||||
if(BURN)
|
||||
playsound(loc, 'sound/weapons/egloves.ogg', 80, 1)
|
||||
|
||||
/obj/structure/holosign/wetsign
|
||||
name = "wet floor sign"
|
||||
desc = "The words flicker as if they mean nothing."
|
||||
icon_state = "holosign"
|
||||
|
||||
/obj/structure/holosign/barrier
|
||||
name = "holo barrier"
|
||||
desc = "A short holographic barrier which can only be passed by walking."
|
||||
icon_state = "holosign_sec"
|
||||
pass_flags = LETPASSTHROW
|
||||
density = TRUE
|
||||
max_integrity = 20
|
||||
var/allow_walk = TRUE //can we pass through it on walk intent
|
||||
|
||||
/obj/structure/holosign/barrier/CanPass(atom/movable/mover, turf/target)
|
||||
if(!density)
|
||||
return TRUE
|
||||
if(mover.pass_flags & (PASSGLASS|PASSTABLE|PASSGRILLE))
|
||||
return TRUE
|
||||
if(iscarbon(mover))
|
||||
var/mob/living/carbon/C = mover
|
||||
if(allow_walk && C.m_intent == MOVE_INTENT_WALK)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/holosign/barrier/engineering
|
||||
icon_state = "holosign_engi"
|
||||
|
||||
/obj/structure/holosign/barrier/atmos
|
||||
name = "holo firelock"
|
||||
desc = "A holographic barrier resembling a firelock. Though it does not prevent solid objects from passing through, gas is kept out."
|
||||
icon_state = "holo_firelock"
|
||||
density = FALSE
|
||||
layer = ABOVE_MOB_LAYER
|
||||
anchored = TRUE
|
||||
layer = ABOVE_MOB_LAYER
|
||||
alpha = 150
|
||||
|
||||
/obj/structure/holosign/barrier/atmos/New()
|
||||
..()
|
||||
air_update_turf(TRUE)
|
||||
|
||||
/obj/structure/holosign/barrier/atmos/CanAtmosPass(turf/T)
|
||||
return FALSE
|
||||
|
||||
/obj/structure/holosign/barrier/atmos/Destroy()
|
||||
var/turf/T = get_turf(src)
|
||||
T.air_update_turf(TRUE)
|
||||
return ..()
|
||||
|
||||
/obj/structure/holosign/barrier/cyborg
|
||||
name = "Energy Field"
|
||||
desc = "A fragile energy field that blocks movement. Excels at blocking lethal projectiles."
|
||||
density = TRUE
|
||||
max_integrity = 10
|
||||
allow_walk = FALSE
|
||||
|
||||
/obj/structure/holosign/barrier/cyborg/bullet_act(obj/item/projectile/P)
|
||||
take_damage((P.damage / 5) , BRUTE, "melee", 1) //Doesn't really matter what damage flag it is.
|
||||
if(istype(P, /obj/item/projectile/energy/electrode))
|
||||
take_damage(10, BRUTE, "melee", 1) //Tasers aren't harmful.
|
||||
if(istype(P, /obj/item/projectile/beam/disabler))
|
||||
take_damage(5, BRUTE, "melee", 1) //Disablers aren't harmful.
|
||||
|
||||
/obj/structure/holosign/barrier/cyborg/hacked
|
||||
name = "Charged Energy Field"
|
||||
desc = "A powerful energy field that blocks movement. Energy arcs off it."
|
||||
max_integrity = 20
|
||||
var/shockcd = 0
|
||||
|
||||
/obj/structure/holosign/barrier/cyborg/hacked/bullet_act(obj/item/projectile/P)
|
||||
take_damage(P.damage, BRUTE, "melee", 1) //Yeah no this doesn't get projectile resistance.
|
||||
|
||||
/obj/structure/holosign/barrier/cyborg/hacked/proc/cooldown()
|
||||
shockcd = FALSE
|
||||
|
||||
/obj/structure/holosign/barrier/cyborg/hacked/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!shockcd)
|
||||
if(ismob(user))
|
||||
var/mob/living/M = user
|
||||
M.electrocute_act(15,"Energy Barrier", safety=1)
|
||||
shockcd = TRUE
|
||||
addtimer(CALLBACK(src, .proc/cooldown), 5)
|
||||
|
||||
/obj/structure/holosign/barrier/cyborg/hacked/Bumped(atom/movable/AM)
|
||||
if(shockcd)
|
||||
return
|
||||
|
||||
if(!isliving(AM))
|
||||
return
|
||||
|
||||
var/mob/living/M = AM
|
||||
M.electrocute_act(15, "Energy Barrier", safety = 1)
|
||||
shockcd = TRUE
|
||||
addtimer(CALLBACK(src, .proc/cooldown), 5)
|
||||
Reference in New Issue
Block a user