Files
Bubberstation/code/modules/asset_cache/assets/rcd.dm
T
SyncIt21andGitHub 3c908fc280 Some more RCD Designs & Patches (#72757)
## About The Pull Request
Adds some more stuff you can build with the RCD
1. Under structures you can now build/deconstruct catwalks & construct
Reflector Frames. Destorying a catwalk will cut any cable on it leaving
pieces of it behind
![Screenshot
(92)](https://user-images.githubusercontent.com/110812394/212850493-b7a5d25a-dab5-42e4-bd56-8e7045023984.png)


2. If you have the frames upgrade you can construct APC, Air Alarm &
Fire Alarm frames on walls & Flood light fixtures[fully wired]. It only
creates the wall mount and sticks it on the wall. Wiring, Circuits and
finishing the frame is still your job
![Screenshot
(94)](https://user-images.githubusercontent.com/110812394/214264787-188c7783-473a-4f34-84c1-00ad73520f22.png)

3. If you have the furnishing upgrade you can create racks & beds &
additional bar stool
![Screenshot
(95)](https://user-images.githubusercontent.com/110812394/214264893-96b52fc9-1502-45af-bee3-724cce1935af.png)


**Important Code Refractors**
1. `/turf/closed/wall/proc/try_wallmount()` will return true only after
you have successfully mounted the wallframe or stuck an poster on it &
not simply check if you are trying to mount a valid thing on it
2. `apc_tool_act/rcd_act()` was incorrectly checking passed_mode for the
simple circuit upgrade and not the `the_rcd.upgrade `flag. Thats fixed
now to
3. newly created APC's weren't assigning themselves to their areas
allowing multiple to be created in one area. Thats fixed now
4. Walls, Airlocks & other stuff could be built on tiles having
something dense that would block it. For example a wall could be build
on top of a machine frame!!. Thats also fixed now

## Why It's Good For The Game
More stuff you can build rapidly with the RCD

## Changelog
🆑
add: more designs for the rcd
refactor:` try_wallmount()` to return true only after successful mount
fix: `apc_tool_act/rcd_act()` incorrecly checking for simple circuits
upgrade in the wrong variable
fix: newly created APC's not assigning themselves to their areas.
fix: rcd building structures [walls, airlocks etc] on turf's that
already have structures on them
/🆑
2023-01-25 12:05:53 -08:00

63 lines
3.1 KiB
Plaintext

/datum/asset/spritesheet/rcd
name = "rcd-tgui"
/datum/asset/spritesheet/rcd/create_spritesheets()
//We load airlock icons seperatly from other icons cause they need overlays
//load all category essential icon_states. format is icon_file = list of icon states we need from that file
var/list/essentials = list(
'icons/obj/chairs.dmi' = list("bar"),
'icons/obj/lighting.dmi' = list("floodlight_c1"),
'icons/obj/monitors.dmi' = list("alarm_bitem", "fire_bitem"),
'icons/obj/wallframe.dmi' = list("apc"),
'icons/obj/stock_parts.dmi' = list("box_1"),
'icons/obj/objects.dmi' = list("bed", "rack"),
'icons/obj/smooth_structures/catwalk.dmi' = list("catwalk-0"),
'icons/hud/radial.dmi' = list("cnorth", "csouth", "ceast", "cwest", "chair", "secure_windoor", "stool", "wallfloor", "windowsize", "windowtype", "windoor"),
'icons/obj/structures.dmi' = list("glass_table", "rwindow0", "reflector_base", "table", "window0"),
)
var/icon/icon
for(var/icon_file as anything in essentials)
for(var/icon_state as anything in essentials[icon_file])
icon = icon(icon = icon_file, icon_state = icon_state)
if(icon_state == "window0" || icon_state == "rwindow0")
icon.Blend(icon(icon = 'icons/obj/structures.dmi', icon_state = "grille"), ICON_UNDERLAY)
Insert(sprite_name = sanitize_css_class_name(icon_state), I = icon)
//for each airlock type we create its overlayed version with the suffix Glass in the sprite name
var/list/airlocks = list(
"Standard" = 'icons/obj/doors/airlocks/station/public.dmi',
"Public" = 'icons/obj/doors/airlocks/station2/glass.dmi',
"Engineering" = 'icons/obj/doors/airlocks/station/engineering.dmi',
"Atmospherics" = 'icons/obj/doors/airlocks/station/atmos.dmi',
"Security" = 'icons/obj/doors/airlocks/station/security.dmi',
"Command" = 'icons/obj/doors/airlocks/station/command.dmi',
"Medical" = 'icons/obj/doors/airlocks/station/medical.dmi',
"Research" = 'icons/obj/doors/airlocks/station/research.dmi',
"Freezer" = 'icons/obj/doors/airlocks/station/freezer.dmi',
"Virology" = 'icons/obj/doors/airlocks/station/virology.dmi',
"Mining" = 'icons/obj/doors/airlocks/station/mining.dmi',
"Maintenance" = 'icons/obj/doors/airlocks/station/maintenance.dmi',
"External" = 'icons/obj/doors/airlocks/external/external.dmi',
"External Maintenance" = 'icons/obj/doors/airlocks/station/maintenanceexternal.dmi',
"Airtight Hatch" = 'icons/obj/doors/airlocks/hatch/centcom.dmi',
"Maintenance Hatch" = 'icons/obj/doors/airlocks/hatch/maintenance.dmi'
)
//these 3 types dont have glass doors
var/list/exclusion = list("Freezer", "Airtight Hatch", "Maintenance Hatch")
for(var/airlock_name in airlocks)
//solid door with overlay
icon = icon(icon = airlocks[airlock_name] , icon_state = "closed" , dir = SOUTH)
icon.Blend(icon(icon = airlocks[airlock_name], icon_state = "fill_closed", dir = SOUTH), ICON_OVERLAY)
Insert(sprite_name = sanitize_css_class_name(airlock_name), I = icon)
//exclude these glass types
if(airlock_name in exclusion)
continue
//glass door no overlay
icon = icon(airlocks[airlock_name] , "closed" , SOUTH)
Insert(sprite_name = sanitize_css_class_name("[airlock_name]Glass"), I = icon)