mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-26 00:51:23 +00:00
## About The Pull Request Interior decor at its finest & fastest available in engineering Proto lathe after research - Left click on a tile to infer its type. If the tile is supported by the RTD then a balloon alert will be displayed showing "Tile changed to XXX". If not supported, it will tell you that - Right click on tile to convert it back to plating. It can only deconstruct floor types which are supported - Left click on plating to place your floor tile - Only iron & glass floor types are supported because you can only feed iron & glass to the RTD to keep it consistent Also, this is my first time ever making sprites so expect less. https://user-images.githubusercontent.com/110812394/209545438-6a51e7bf-163a-4a18-9102-7b77107eb1b7.mp4 Cleaned up some code in the RCD file as a bonus some notables ones are - moved `update_overlays()` from rcd to `obj/item/construction `so any class extending from this can use it - removed `do_after()` when changing turf types cause its unessassary & doesn't play well with the RTD ## Why It's Good For The Game - Replace damaged or dirty tiles without the need of a janitor, crowbar & removes manual labour by hand - Give your room some style quickly maybe replace the whole station floor with glass tiles I don't know you decide - Maybe lay floor tiles quickly in maintenance to stop rats from chewing on those cables ## Changelog 🆑 add: RTD Rapid Tiling Device imageadd: Sprite for RTD code: moved update_overlays() from rcd to obj/item/construction so anyone can use it del: cooldown of 3 seconds when changing turf type qol: Faster Turf decoration /🆑 Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
55 lines
2.1 KiB
Plaintext
55 lines
2.1 KiB
Plaintext
/datum/asset/spritesheet/rtd
|
|
name = "rtd"
|
|
|
|
/datum/asset/spritesheet/rtd/create_spritesheets()
|
|
//some tiles may share the same icon but have diffrent properties to animate that icon
|
|
//so we keep track of what icons we registered
|
|
var/list/registered = list()
|
|
|
|
for(var/main_root in GLOB.floor_designs)
|
|
for(var/sub_category in GLOB.floor_designs[main_root])
|
|
for(var/list/design in GLOB.floor_designs[main_root][sub_category])
|
|
var/obj/item/stack/tile/type = design["type"]
|
|
var/icon_state = initial(type.icon_state)
|
|
if(registered[icon_state])
|
|
continue
|
|
|
|
Insert(sprite_name = icon_state, I = 'icons/obj/tiles.dmi', icon_state = icon_state)
|
|
registered[icon_state] = TRUE
|
|
|
|
var/list/tile_directions = design["tile_rotate_dirs"]
|
|
if(tile_directions == null)
|
|
continue
|
|
|
|
for(var/direction as anything in tile_directions)
|
|
//we can rotate the icon is css for these directions
|
|
if(direction in GLOB.tile_dont_rotate)
|
|
continue
|
|
|
|
//but for these directions we have to do some hacky stuff
|
|
var/icon/img = icon(icon = 'icons/obj/tiles.dmi', icon_state = icon_state)
|
|
switch(direction)
|
|
if(NORTHEAST)
|
|
img.Turn(-180)
|
|
var/icon/east_rotated = icon(icon = 'icons/obj/tiles.dmi', icon_state = icon_state)
|
|
east_rotated.Turn(-90)
|
|
img.Blend(east_rotated,ICON_MULTIPLY)
|
|
img.SetIntensity(2,2,2)
|
|
if(NORTHWEST)
|
|
img.Turn(-180)
|
|
var/icon/west_rotated = icon(icon = 'icons/obj/tiles.dmi', icon_state = icon_state)
|
|
west_rotated.Turn(90)
|
|
img.Blend(west_rotated,ICON_MULTIPLY)
|
|
img.SetIntensity(2,2,2)
|
|
if(SOUTHEAST)
|
|
var/icon/east_rotated = icon(icon = 'icons/obj/tiles.dmi', icon_state = icon_state)
|
|
east_rotated.Turn(-90)
|
|
img.Blend(east_rotated,ICON_MULTIPLY)
|
|
img.SetIntensity(2,2,2)
|
|
if(SOUTHWEST)
|
|
var/icon/west_rotated = icon(icon = 'icons/obj/tiles.dmi', icon_state = icon_state)
|
|
west_rotated.Turn(90)
|
|
img.Blend(west_rotated,ICON_MULTIPLY)
|
|
img.SetIntensity(2,2,2)
|
|
Insert(sprite_name = "[icon_state]-[dir2text(direction)]", I = img)
|