Files
Bubberstation/code/game/objects/items/control_wand.dm
SkyratBot 461745346c [MIRROR] Throws gangtools into a bottomless pit (#26992)
* Throws gangtools into a bottomless pit (#82145)

## About The Pull Request

Resprites everything that used to use the old gangtool sprites (door
remotes, augment choice beacon, landing zone designators, and nuke op
borg spawners.)


![image](https://github.com/tgstation/tgstation/assets/5479091/346d4a1b-59cc-47c3-b6ff-b66c75d7730b)

- Added a new non-gangtool generic choice beacon, and a specific
S.E.L.F. one.
- Door remotes are now fancy garage door openers.
- Landing designators have cannibalised the cell phone sprites from the
less old version of gang.
- Nuke op borg spawners use the same walkie talkie as other
reinforcements

Door remotes now have individual sprites for each mode, so you can see
the mode at a glance.

## Why It's Good For The Game

Having a range of very different items sharing the same old sprites is
pretty confusing, better to have them all be unique and up to date.

## Changelog
🆑
image: Everything that used the old gangtool sprites (door remotes,
landing field designators, some choice beacons, windicate borg
reinforcements) has been resprited.
image: Door remotes now visibly show their current mode.
/🆑

* Oh yeah

* I'm dum

* Oh wow

* placeholder for now

* Bam?

* pls

---------

Co-authored-by: Thunder12345 <Thunder12345@users.noreply.github.com>
Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com>
Co-authored-by: Waterpig <wtryoutube@seznam.cz>
Co-authored-by: Waterpig <49160555+Majkl-J@users.noreply.github.com>
2024-04-17 08:06:19 +02:00

151 lines
3.8 KiB
Plaintext

#define WAND_OPEN "open"
#define WAND_BOLT "bolt"
#define WAND_EMERGENCY "emergency"
/obj/item/door_remote
icon_state = "remote"
base_icon_state = "remote"
inhand_icon_state = "electronic"
lefthand_file = 'icons/mob/inhands/items/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/items/devices_righthand.dmi'
icon = 'icons/obj/devices/remote.dmi'
name = "control wand"
desc = "A remote for controlling a set of airlocks."
w_class = WEIGHT_CLASS_TINY
var/department = "civilian"
var/mode = WAND_OPEN
var/region_access = REGION_GENERAL
var/list/access_list
/obj/item/door_remote/Initialize(mapload)
. = ..()
access_list = SSid_access.get_region_access_list(list(region_access))
update_icon_state()
/obj/item/door_remote/attack_self(mob/user)
var/static/list/desc = list(WAND_OPEN = "Open Door", WAND_BOLT = "Toggle Bolts", WAND_EMERGENCY = "Toggle Emergency Access")
switch(mode)
if(WAND_OPEN)
mode = WAND_BOLT
if(WAND_BOLT)
mode = WAND_EMERGENCY
if(WAND_EMERGENCY)
mode = WAND_OPEN
update_icon_state()
balloon_alert(user, "mode: [desc[mode]]")
// Airlock remote works by sending NTNet packets to whatever it's pointed at.
/obj/item/door_remote/afterattack(atom/target, mob/user)
. = ..()
var/obj/machinery/door/door
if (istype(target, /obj/machinery/door))
door = target
if (!door.opens_with_door_remote)
return
else
for (var/obj/machinery/door/door_on_turf in get_turf(target))
if (door_on_turf.opens_with_door_remote)
door = door_on_turf
break
if (isnull(door))
return
if (!door.check_access_list(access_list) || !door.requiresID())
target.balloon_alert(user, "can't access!")
return
var/obj/machinery/door/airlock/airlock = door
if (!door.hasPower() || (istype(airlock) && !airlock.canAIControl()))
target.balloon_alert(user, mode == WAND_OPEN ? "it won't budge!" : "nothing happens!")
return
switch (mode)
if (WAND_OPEN)
if (door.density)
door.open()
else
door.close()
if (WAND_BOLT)
if (!istype(airlock))
target.balloon_alert(user, "only airlocks!")
return
if (airlock.locked)
airlock.unbolt()
log_combat(user, airlock, "unbolted", src)
else
airlock.bolt()
log_combat(user, airlock, "bolted", src)
if (WAND_EMERGENCY)
if (!istype(airlock))
target.balloon_alert(user, "only airlocks!")
return
airlock.emergency = !airlock.emergency
airlock.update_appearance(UPDATE_ICON)
/obj/item/door_remote/update_icon_state()
var/icon_state_mode
switch(mode)
if(WAND_OPEN)
icon_state_mode = "open"
if(WAND_BOLT)
icon_state_mode = "bolt"
if(WAND_EMERGENCY)
icon_state_mode = "emergency"
icon_state = "[base_icon_state]_[department]_[icon_state_mode]"
return ..()
/obj/item/door_remote/omni
name = "omni door remote"
desc = "This control wand can access any door on the station."
department = "omni"
region_access = REGION_ALL_STATION
/obj/item/door_remote/captain
name = "command door remote"
department = "command"
region_access = REGION_COMMAND
/obj/item/door_remote/chief_engineer
name = "engineering door remote"
department = "engi"
region_access = REGION_ENGINEERING
/obj/item/door_remote/research_director
name = "research door remote"
department = "sci"
region_access = REGION_RESEARCH
/obj/item/door_remote/head_of_security
name = "security door remote"
department = "security"
region_access = REGION_SECURITY
/obj/item/door_remote/quartermaster
name = "supply door remote"
desc = "Remotely controls airlocks. This remote has additional Vault access."
department = "cargo"
region_access = REGION_SUPPLY
/obj/item/door_remote/chief_medical_officer
name = "medical door remote"
department = "med"
region_access = REGION_MEDBAY
/obj/item/door_remote/civilian
name = "civilian door remote"
department = "civilian"
region_access = REGION_GENERAL
#undef WAND_OPEN
#undef WAND_BOLT
#undef WAND_EMERGENCY