Files
Bubberstation/code/game/objects/items/holosign_creator.dm
SkyratBot 36ac91b093 [MIRROR] Engineering, janitor and medical holosign projector changes. Much faster, more capacity, less integrity. [MDB IGNORE] (#21542)
* Engineering, janitor and medical holosign projector changes. Much faster, more capacity, less integrity. (#75543)

## About The Pull Request
The engineering, janitor and medical holosign projectors can project
their holosigns in 1 second. The holosign integrity has been reduced to
1. Engineering max capacity increased to 12, medical to 6.
## Why It's Good For The Game
The long time to project made these projectors, especially the
engineering ones, impractical to use during an emergency that warrents
their usage. Medical capacity increase allows them to block off a
typical hallway, which could be used if there's a biohazard (60 gibbed
monkeys, or botanist). Engineering capacity increase is warrented due to
the nature of breaches and how large they can get.

The integrity reduction should help prevent them from being used to
Fortnite people.
## Changelog
🆑
balance: Engineering, janitor and medical holosign projector projection
time reduced to 1 second.
balance: Engineering, janitor, and medical holosign integrity reduced to
1.
balance: Engineering holosign projector max capacity increased to 12.
balance: Medical holosign projector max capacity increased to 6.
/🆑

* Engineering, janitor and medical holosign projector changes. Much faster, more capacity, less integrity.

---------

Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com>
2023-05-31 23:21:09 +12:00

155 lines
5.0 KiB
Plaintext

/obj/item/holosign_creator
name = "holographic sign projector"
desc = "A handy-dandy holographic projector that displays a janitorial sign."
icon = 'icons/obj/device.dmi'
icon_state = "signmaker"
inhand_icon_state = "electronic"
worn_icon_state = "electronic"
lefthand_file = 'icons/mob/inhands/items/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/items/devices_righthand.dmi'
force = 0
w_class = WEIGHT_CLASS_SMALL
throwforce = 0
throw_speed = 3
throw_range = 7
item_flags = NOBLUDGEON
var/list/signs
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/Initialize(mapload)
. = ..()
AddElement(/datum/element/openspace_item_click_handler)
/obj/item/holosign_creator/handle_openspace_click(turf/target, mob/user, proximity_flag, click_parameters)
afterattack(target, user, proximity_flag, click_parameters)
/obj/item/holosign_creator/examine(mob/user)
. = ..()
if(!signs)
return
. += span_notice("It is currently maintaining <b>[signs.len]/[max_signs]</b> projections.")
/obj/item/holosign_creator/afterattack(atom/target, mob/user, proximity_flag)
. = ..()
if(!proximity_flag)
return
. |= AFTERATTACK_PROCESSED_ITEM
if(!check_allowed_items(target, not_inside = TRUE))
return .
var/turf/target_turf = get_turf(target)
var/obj/structure/holosign/target_holosign = locate(holosign_type) in target_turf
if(target_holosign)
qdel(target_holosign)
return .
if(target_turf.is_blocked_turf(TRUE)) //can't put holograms on a tile that has dense stuff
return .
if(holocreator_busy)
to_chat(user, span_notice("[src] is busy creating a hologram."))
return .
if(LAZYLEN(signs) >= max_signs)
balloon_alert(user, "max capacity!")
return .
playsound(loc, 'sound/machines/click.ogg', 20, TRUE)
if(creation_time)
holocreator_busy = TRUE
if(!do_after(user, creation_time, target = target))
holocreator_busy = FALSE
return .
holocreator_busy = FALSE
if(LAZYLEN(signs) >= max_signs)
return .
if(target_turf.is_blocked_turf(TRUE)) //don't try to sneak dense stuff on our tile during the wait.
return .
target_holosign = new holosign_type(get_turf(target), src)
return .
/obj/item/holosign_creator/attack(mob/living/carbon/human/M, mob/user)
return
/obj/item/holosign_creator/attack_self(mob/user)
if(LAZYLEN(signs))
for(var/H in signs)
qdel(H)
balloon_alert(user, "holograms cleared")
/obj/item/holosign_creator/Destroy()
. = ..()
if(LAZYLEN(signs))
for(var/H in signs)
qdel(H)
/obj/item/holosign_creator/janibarrier
name = "custodial holobarrier projector"
desc = "A holographic projector that creates hard light wet floor barriers."
holosign_type = /obj/structure/holosign/barrier/wetsign
creation_time = 1 SECONDS
max_signs = 12
/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 = 3 SECONDS
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 = 1 SECONDS
max_signs = 12
/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_atmos"
holosign_type = /obj/structure/holosign/barrier/atmos
creation_time = 0
max_signs = 6
/obj/item/holosign_creator/medical
name = "\improper PENLITE barrier projector"
desc = "A holographic projector that creates PENLITE holobarriers. Useful during quarantines since they halt those with malicious diseases."
icon_state = "signmaker_med"
holosign_type = /obj/structure/holosign/barrier/medical
creation_time = 1 SECONDS
max_signs = 6
/obj/item/holosign_creator/cyborg
name = "Energy Barrier Projector"
desc = "A holographic projector that creates fragile energy fields."
creation_time = 1.5 SECONDS
max_signs = 9
holosign_type = /obj/structure/holosign/barrier/cyborg
var/shock = 0
/obj/item/holosign_creator/cyborg/attack_self(mob/user)
if(iscyborg(user))
var/mob/living/silicon/robot/R = user
if(shock)
to_chat(user, span_notice("You clear all active holograms, and reset your projector to normal."))
holosign_type = /obj/structure/holosign/barrier/cyborg
creation_time = 5
for(var/sign in signs)
qdel(sign)
shock = 0
return
if(R.emagged && !shock)
to_chat(user, span_warning("You clear all active holograms, and overload your energy projector!"))
holosign_type = /obj/structure/holosign/barrier/cyborg/hacked
creation_time = 30
for(var/sign in signs)
qdel(sign)
shock = 1
return
for(var/sign in signs)
qdel(sign)
balloon_alert(user, "holograms cleared")