Files
Bubberstation/code/game/objects/structures/holosign.dm
SkyratBot d865ae2531 [MIRROR] Tram QoL Improvements [MDB IGNORE] (#17517)
* Tram QoL Improvements (#70774)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
- Tram destination sign is expanded, so it can say 'Central' and 'Not In
Service', fits in better sprite wise anyways
- Engineers now have access to control the tram doors
- The tram now has its own set of door icons, matching the rest of the
tram. It makes it a titanium windoor instead of the standard windoor
icon
- Tram doors are now their own subtype, because it was backwards for
some reason
- Tram doors are now faster opening, because nobody wants to wait 3
seconds for the doors to open. Nice on arrivals, or make your daring
escape mid travel!
- Tram doors are responsive and let you jump out mid travel, for those
daring escapes
- The tram now has a coherent visual look of silver and grey
- The tram now has a touchscreen display instead of an atmos computer,
reflecting the TGUI panel
- Adds a new tram floor sprite reflecting the propulsion of the tram
- Tram has its own holobarriers instead of using firelocks

![tram-relift-2](https://user-images.githubusercontent.com/83487515/199634713-a942c82e-f6d4-4489-adde-66f859cefebb.gif)

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game
Improving the tram based on feedback from players, and making it look
better too.
<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑 LT3
qol: Tram destination sign is expanded and now properly says Central and
Not In Service.
qol: Tram doors now open faster on arrival and mid travel, so you don't
have to wait, and can also make a daring high speed escape from a tram
in motion.
fix: Improved tram door logic so they don't end up open/closed at the
wrong place.
fix: Tram doors are now their own subtype, it was backwards for some
reason.
fix: Tram doors while idle at a station can only be interacted with by
Engineering staff.
add: Tram controls are now a responsive touchscreen.
add: Tram crossings have their own holobarrier instead of using the
generic atmos fire barrier.
add: Tram now has a new set of doors in shiny titanium glass.
add: Tram is now powered by linear induction motors.
fix: Deltastation's EVA windoor for magboots are no longer tram doors.
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@ users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>

* Tram QoL Improvements

Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@ users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
2022-11-17 08:37:58 -05:00

221 lines
7.1 KiB
Plaintext

//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, FIRE = 20, ACID = 20)
var/obj/item/holosign_creator/projector
var/use_vis_overlay = TRUE
/obj/structure/holosign/Initialize(mapload, source_projector)
. = ..()
var/turf/our_turf = get_turf(src)
if(use_vis_overlay)
alpha = 0
SSvis_overlays.add_vis_overlay(src, icon, icon_state, ABOVE_MOB_LAYER, MUTATE_PLANE(GAME_PLANE_UPPER, our_turf), dir, add_appearance_flags = RESET_ALPHA) //you see mobs under it, but you hit them like they are above it
if(source_projector)
projector = source_projector
LAZYADD(projector.signs, src)
/obj/structure/holosign/Destroy()
if(projector)
LAZYREMOVE(projector.signs, src)
projector = null
return ..()
/obj/structure/holosign/attack_hand(mob/living/user, list/modifiers)
. = ..()
if(.)
return
attack_holosign(user, modifiers)
/obj/structure/holosign/proc/attack_holosign(mob/living/user, list/modifiers)
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
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, TRUE)
if(BURN)
playsound(loc, 'sound/weapons/egloves.ogg', 80, TRUE)
/obj/structure/holosign/wetsign
name = "wet floor sign"
desc = "The words flicker as if they mean nothing."
icon = 'icons/effects/effects.dmi'
icon_state = "holosign"
/obj/structure/holosign/barrier
name = "holobarrier"
desc = "A short holographic barrier which can only be passed by walking."
icon_state = "holosign_sec"
pass_flags_self = PASSTABLE | PASSGRILLE | PASSGLASS | LETPASSTHROW
density = TRUE
max_integrity = 20
var/allow_walk = TRUE //can we pass through it on walk intent
/obj/structure/holosign/barrier/CanAllowThrough(atom/movable/mover, border_dir)
. = ..()
if(.)
return
if(iscarbon(mover))
var/mob/living/carbon/C = mover
if(C.stat) // Lets not prevent dragging unconscious/dead people.
return TRUE
if(allow_walk && C.m_intent == MOVE_INTENT_WALK)
return TRUE
/obj/structure/holosign/barrier/wetsign
name = "wet floor holobarrier"
desc = "When it says walk it means walk."
icon = 'icons/effects/effects.dmi'
icon_state = "holosign"
/obj/structure/holosign/barrier/wetsign/CanAllowThrough(atom/movable/mover, border_dir)
. = ..()
if(iscarbon(mover))
var/mob/living/carbon/C = mover
if(C.stat) // Lets not prevent dragging unconscious/dead people.
return TRUE
if(allow_walk && C.m_intent != MOVE_INTENT_WALK)
return FALSE
/obj/structure/holosign/barrier/engineering
icon_state = "holosign_engi"
rad_insulation = RAD_LIGHT_INSULATION
/obj/structure/holosign/barrier/atmos
name = "holofirelock"
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
anchored = TRUE
can_atmos_pass = ATMOS_PASS_NO
alpha = 150
rad_insulation = RAD_LIGHT_INSULATION
resistance_flags = FIRE_PROOF
/obj/structure/holosign/barrier/atmos/sturdy
name = "sturdy holofirelock"
max_integrity = 150
/obj/structure/holosign/barrier/atmos/tram
name = "tram atmos barrier"
max_integrity = 150
icon_state = "holo_tram"
/obj/structure/holosign/barrier/atmos/Initialize(mapload)
. = ..()
air_update_turf(TRUE, TRUE)
AddElement(/datum/element/trait_loc, TRAIT_FIREDOOR_STOP)
/obj/structure/holosign/barrier/atmos/block_superconductivity() //Didn't used to do this, but it's "normal", and will help ease heat flow transitions with the players.
return TRUE
/obj/structure/holosign/barrier/atmos/Destroy()
air_update_turf(TRUE, FALSE)
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/projectile/P)
take_damage((P.damage / 5) , BRUTE, MELEE, 1) //Doesn't really matter what damage flag it is.
if(istype(P, /obj/projectile/energy/electrode))
take_damage(10, BRUTE, MELEE, 1) //Tasers aren't harmful.
if(istype(P, /obj/projectile/beam/disabler))
take_damage(5, BRUTE, MELEE, 1) //Disablers aren't harmful.
return BULLET_ACT_HIT
/obj/structure/holosign/barrier/medical
name = "\improper PENLITE holobarrier"
desc = "A holobarrier that uses biometrics to detect human viruses. Denies passing to personnel with easily-detected, malicious viruses. Good for quarantines."
icon_state = "holo_medical"
alpha = 125 //lazy :)
var/force_allaccess = FALSE
var/buzzcd = 0
/obj/structure/holosign/barrier/medical/examine(mob/user)
. = ..()
. += span_notice("The biometric scanners are <b>[force_allaccess ? "off" : "on"]</b>.")
/obj/structure/holosign/barrier/medical/CanAllowThrough(atom/movable/mover, border_dir)
. = ..()
if(force_allaccess)
return TRUE
if(istype(mover, /obj/vehicle/ridden))
for(var/M in mover.buckled_mobs)
if(ishuman(M))
if(!CheckHuman(M))
return FALSE
if(ishuman(mover))
return CheckHuman(mover)
return TRUE
/obj/structure/holosign/barrier/medical/Bumped(atom/movable/AM)
. = ..()
icon_state = "holo_medical"
if(ishuman(AM) && !CheckHuman(AM))
if(buzzcd < world.time)
playsound(get_turf(src),'sound/machines/buzz-sigh.ogg',65,TRUE,4)
buzzcd = (world.time + 60)
icon_state = "holo_medical-deny"
/obj/structure/holosign/barrier/medical/proc/CheckHuman(mob/living/carbon/human/sickboi)
var/threat = sickboi.check_virus()
if(get_disease_severity_value(threat) > get_disease_severity_value(DISEASE_SEVERITY_MINOR))
return FALSE
return TRUE
/obj/structure/holosign/barrier/medical/attack_hand(mob/living/user, list/modifiers)
if(!user.combat_mode && CanPass(user, get_dir(src, user)))
force_allaccess = !force_allaccess
to_chat(user, span_warning("You [force_allaccess ? "deactivate" : "activate"] the biometric scanners.")) //warning spans because you can make the station sick!
else
return ..()
/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/projectile/P)
take_damage(P.damage, BRUTE, MELEE, 1) //Yeah no this doesn't get projectile resistance.
return BULLET_ACT_HIT
/obj/structure/holosign/barrier/cyborg/hacked/proc/cooldown()
shockcd = FALSE
/obj/structure/holosign/barrier/cyborg/hacked/attack_hand(mob/living/user, list/modifiers)
. = ..()
if(.)
return
if(!shockcd)
if(ismob(user))
var/mob/living/M = user
M.electrocute_act(15,"Energy Barrier")
shockcd = TRUE
addtimer(CALLBACK(src, PROC_REF(cooldown)), 5)
/obj/structure/holosign/barrier/cyborg/hacked/Bumped(atom/movable/AM)
if(shockcd)
return
if(!ismob(AM))
return
var/mob/living/M = AM
M.electrocute_act(15,"Energy Barrier")
shockcd = TRUE
addtimer(CALLBACK(src, PROC_REF(cooldown)), 5)