Skip to content

Commit

Permalink
[MISSED MIRROR] Icon Autoslicing (#1038)
Browse files Browse the repository at this point in the history
* Icon Autoslicing (#79659)

* Update false_walls.dm

* Modular

* Fixes override for reinforced walls, removals skyrat edits in favor of overrides

---------

Co-authored-by: Bloop <[email protected]>
Co-authored-by: LemonInTheDark <[email protected]>
  • Loading branch information
3 people authored Dec 9, 2023
1 parent cc3eb05 commit b648516
Show file tree
Hide file tree
Showing 377 changed files with 1,116 additions and 87 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ jobs:
with:
path: ~/.cargo
key: ${{ runner.os }}-rust
- name: Restore Cutter cache
uses: actions/cache@v3
with:
path: tools/icon_cutter/cache
key: ${{ runner.os }}-cutter-${{ hashFiles('dependencies.sh') }}
- name: Install Tools
run: |
pip3 install setuptools
Expand Down Expand Up @@ -91,6 +96,9 @@ jobs:
run: |
tools/bootstrap/python -m mapmerge2.dmm_test
tools/bootstrap/python -m tools.maplint.source
- name: Check Cutter
if: steps.linter-setup.conclusion == 'success' && !cancelled()
run: tools/bootstrap/python -m tools.icon_cutter.check
- name: Run DMI Tests
if: steps.linter-setup.conclusion == 'success' && !cancelled()
run: tools/bootstrap/python -m dmi.test
Expand All @@ -111,7 +119,7 @@ jobs:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Compile Maps
needs: [collect_data]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
concurrency:
group: compile_all_maps-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
Expand All @@ -136,7 +144,7 @@ jobs:
collect_data:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Collect data for other tasks
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
maps: ${{ steps.map_finder.outputs.maps }}
alternate_tests: ${{ steps.alternate_test_finder.outputs.alternate_tests }}
Expand Down Expand Up @@ -202,15 +210,15 @@ jobs:
if: ( !contains(github.event.head_commit.message, '[ci skip]') && needs.find_all_maps.outputs.alternate_tests != '[]' )
name: Check Alternate Tests
needs: [run_alternate_tests]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- run: echo Alternate tests passed.

compare_screenshots:
if: ( !contains(github.event.head_commit.message, '[ci skip]') && (success() || failure()) )
needs: [run_all_tests, run_alternate_tests]
name: Compare Screenshot Tests
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
# If we ever add more artifacts, this is going to break, but it'll be obvious.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compile_changelogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
compile:
name: "Compile changelogs"
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: "Check for ACTION_ENABLER secret and pass true to output if it exists to be checked by later steps"
id: value_holder
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
permissions:
contents: write # for JamesIves/github-pages-deploy-action to push changes in repo
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
concurrency: gen-docs
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr_emoji.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ permissions:

jobs:
title_and_changelog:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: Wayland-Smithy/emoji-stripper-action@de0c1d158edee50700583d6454aa5f5117337599
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/round_id_linker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
link_rounds:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: tgstation/round_linker@master
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/show_screenshot_test_results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
show_screenshot_test_results:
if: ( !contains(github.event.head_commit.message, '[ci skip]') && github.event.workflow_run.run_attempt == 1 )
name: Show Screenshot Test Results
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: "Check for ARTIFACTS_FILE_HOUSE_KEY"
id: secrets_set
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
permissions:
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/stale@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_merge_bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
test_merge_bot:
name: Test Merge Detector
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Check for GET_TEST_MERGES_URL
id: secrets_set
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_tgs_dmapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
update-dmapi:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
name: Update the TGS DMAPI
steps:
- name: Clone
Expand Down
4 changes: 2 additions & 2 deletions _maps/map_files/Mafia/mafia_spiderclan.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
name = "Station Night Shutters"
},
/turf/closed/indestructible/fakeglass{
icon = 'icons/obj/smooth_structures/paperframes.dmi';
icon_state = "paper"
icon = 'icons/obj/smooth_structures/structure_variations.dmi';
icon_state = "paper-whole"
},
/area/centcom/mafia)
"q" = (
Expand Down
80 changes: 44 additions & 36 deletions code/game/objects/structures/false_walls.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
name = "wall"
desc = "A huge chunk of metal used to separate rooms."
anchored = TRUE
//icon = 'icons/turf/walls/wall.dmi' //ORIGINAL
icon = 'modular_skyrat/modules/aesthetics/walls/icons/wall.dmi' //SKYRAT EDIT CHANGE - AESTHETICS
icon_state = "wall-0"
icon = 'icons/turf/walls/false_walls.dmi'
icon_state = "wall-open"
base_icon_state = "wall"
layer = LOW_OBJ_LAYER
density = TRUE
Expand All @@ -20,6 +19,8 @@
can_atmos_pass = ATMOS_PASS_DENSITY
rad_insulation = RAD_MEDIUM_INSULATION
material_flags = MATERIAL_EFFECTS
/// The icon this falsewall is faking being. we'll switch out our icon with this when we're in fake mode
var/fake_icon = 'icons/turf/walls/wall.dmi'
var/mineral = /obj/item/stack/sheet/iron
var/mineral_amount = 2
var/walltype = /turf/closed/wall
Expand Down Expand Up @@ -72,9 +73,15 @@

/obj/structure/falsewall/update_icon_state()
if(opening)
icon_state = "fwall_[density ? "opening" : "closing"]"
icon = fake_icon
icon_state = "[base_icon_state]-[density ? "opening" : "closing"]"
return ..()
icon_state = density ? "[base_icon_state]-[smoothing_junction]" : "fwall_open"
if(density)
icon = initial(icon)
icon_state = "[base_icon_state]-[smoothing_junction]"
else
icon = fake_icon
icon_state = "[base_icon_state]-open"
return ..()

/obj/structure/falsewall/proc/ChangeToWall(delete = 1)
Expand Down Expand Up @@ -149,9 +156,8 @@
/obj/structure/falsewall/reinforced
name = "reinforced wall"
desc = "A huge chunk of reinforced metal used to separate rooms."
//icon = 'icons/turf/walls/reinforced_wall.dmi'
icon = 'modular_skyrat/modules/aesthetics/walls/icons/reinforced_wall.dmi' //SKYRAT EDIT CHANGE - AESTHETICS
icon_state = "reinforced_wall-0"
fake_icon = 'icons/turf/walls/reinforced_wall.dmi'
icon_state = "reinforced_wall-open"
base_icon_state = "reinforced_wall"
walltype = /turf/closed/wall/r_wall
mineral = /obj/item/stack/sheet/plasteel
Expand All @@ -173,8 +179,8 @@
/obj/structure/falsewall/uranium
name = "uranium wall"
desc = "A wall with uranium plating. This is probably a bad idea."
icon = 'icons/turf/walls/uranium_wall.dmi'
icon_state = "uranium_wall-0"
fake_icon = 'icons/turf/walls/uranium_wall.dmi'
icon_state = "uranium_wall-open"
base_icon_state = "uranium_wall"
mineral = /obj/item/stack/sheet/mineral/uranium
walltype = /turf/closed/wall/mineral/uranium
Expand Down Expand Up @@ -224,8 +230,8 @@
/obj/structure/falsewall/gold
name = "gold wall"
desc = "A wall with gold plating. Swag!"
icon = 'icons/turf/walls/gold_wall.dmi'
icon_state = "gold_wall-0"
fake_icon = 'icons/turf/walls/gold_wall.dmi'
icon_state = "gold_wall-open"
base_icon_state = "gold_wall"
mineral = /obj/item/stack/sheet/mineral/gold
walltype = /turf/closed/wall/mineral/gold
Expand All @@ -236,8 +242,8 @@
/obj/structure/falsewall/silver
name = "silver wall"
desc = "A wall with silver plating. Shiny."
icon = 'icons/turf/walls/silver_wall.dmi'
icon_state = "silver_wall-0"
fake_icon = 'icons/turf/walls/silver_wall.dmi'
icon_state = "silver_wall-open"
base_icon_state = "silver_wall"
mineral = /obj/item/stack/sheet/mineral/silver
walltype = /turf/closed/wall/mineral/silver
Expand All @@ -248,8 +254,8 @@
/obj/structure/falsewall/diamond
name = "diamond wall"
desc = "A wall with diamond plating. You monster."
icon = 'icons/turf/walls/diamond_wall.dmi'
icon_state = "diamond_wall-0"
fake_icon = 'icons/turf/walls/diamond_wall.dmi'
icon_state = "diamond_wall-open"
base_icon_state = "diamond_wall"
mineral = /obj/item/stack/sheet/mineral/diamond
walltype = /turf/closed/wall/mineral/diamond
Expand All @@ -261,8 +267,8 @@
/obj/structure/falsewall/plasma
name = "plasma wall"
desc = "A wall with plasma plating. This is definitely a bad idea."
icon = 'icons/turf/walls/plasma_wall.dmi'
icon_state = "plasma_wall-0"
fake_icon = 'icons/turf/walls/plasma_wall.dmi'
icon_state = "plasma_wall-open"
base_icon_state = "plasma_wall"
mineral = /obj/item/stack/sheet/mineral/plasma
walltype = /turf/closed/wall/mineral/plasma
Expand All @@ -273,8 +279,8 @@
/obj/structure/falsewall/bananium
name = "bananium wall"
desc = "A wall with bananium plating. Honk!"
icon = 'icons/turf/walls/bananium_wall.dmi'
icon_state = "bananium_wall-0"
fake_icon = 'icons/turf/walls/bananium_wall.dmi'
icon_state = "bananium_wall-open"
base_icon_state = "bananium_wall"
mineral = /obj/item/stack/sheet/mineral/bananium
walltype = /turf/closed/wall/mineral/bananium
Expand All @@ -286,8 +292,8 @@
/obj/structure/falsewall/sandstone
name = "sandstone wall"
desc = "A wall with sandstone plating. Rough."
icon = 'icons/turf/walls/sandstone_wall.dmi'
icon_state = "sandstone_wall-0"
fake_icon = 'icons/turf/walls/sandstone_wall.dmi'
icon_state = "sandstone_wall-open"
base_icon_state = "sandstone_wall"
mineral = /obj/item/stack/sheet/mineral/sandstone
walltype = /turf/closed/wall/mineral/sandstone
Expand All @@ -298,8 +304,8 @@
/obj/structure/falsewall/wood
name = "wooden wall"
desc = "A wall with wooden plating. Stiff."
icon = 'icons/turf/walls/wood_wall.dmi'
icon_state = "wood_wall-0"
fake_icon = 'icons/turf/walls/wood_wall.dmi'
icon_state = "wood_wall-open"
base_icon_state = "wood_wall"
mineral = /obj/item/stack/sheet/mineral/wood
walltype = /turf/closed/wall/mineral/wood
Expand All @@ -310,7 +316,9 @@
/obj/structure/falsewall/bamboo
name = "bamboo wall"
desc = "A wall with bamboo finish. Zen."
icon = 'icons/turf/walls/bamboo_wall.dmi'
fake_icon = 'icons/turf/walls/bamboo_wall.dmi'
icon_state = "bamboo_wall-open"
base_icon_state = "bamboo_wall"
mineral = /obj/item/stack/sheet/mineral/bamboo
walltype = /turf/closed/wall/mineral/bamboo
smoothing_flags = SMOOTH_BITMASK
Expand All @@ -320,8 +328,8 @@
/obj/structure/falsewall/iron
name = "rough iron wall"
desc = "A wall with rough metal plating."
icon = 'icons/turf/walls/iron_wall.dmi'
icon_state = "iron_wall-0"
fake_icon = 'icons/turf/walls/iron_wall.dmi'
icon_state = "iron_wall-open"
base_icon_state = "iron_wall"
mineral = /obj/item/stack/rods
mineral_amount = 5
Expand All @@ -334,8 +342,8 @@
/obj/structure/falsewall/abductor
name = "alien wall"
desc = "A wall with alien alloy plating."
icon = 'icons/turf/walls/abductor_wall.dmi'
icon_state = "abductor_wall-0"
fake_icon = 'icons/turf/walls/abductor_wall.dmi'
icon_state = "abductor_wall-open"
base_icon_state = "abductor_wall"
mineral = /obj/item/stack/sheet/mineral/abductor
walltype = /turf/closed/wall/mineral/abductor
Expand All @@ -346,8 +354,8 @@
/obj/structure/falsewall/titanium
name = "wall"
desc = "A light-weight titanium wall used in shuttles."
icon = 'icons/turf/walls/shuttle_wall.dmi'
icon_state = "shuttle_wall-0"
fake_icon = 'icons/turf/walls/shuttle_wall.dmi'
icon_state = "shuttle_wall-open"
base_icon_state = "shuttle_wall"
mineral = /obj/item/stack/sheet/mineral/titanium
walltype = /turf/closed/wall/mineral/titanium
Expand All @@ -358,8 +366,8 @@
/obj/structure/falsewall/plastitanium
name = "wall"
desc = "An evil wall of plasma and titanium."
icon = 'icons/turf/walls/plastitanium_wall.dmi'
icon_state = "plastitanium_wall-0"
fake_icon = 'icons/turf/walls/plastitanium_wall.dmi'
icon_state = "plastitanium_wall-open"
base_icon_state = "plastitanium_wall"
mineral = /obj/item/stack/sheet/mineral/plastitanium
walltype = /turf/closed/wall/mineral/plastitanium
Expand All @@ -370,9 +378,9 @@
/obj/structure/falsewall/material
name = "wall"
desc = "A huge chunk of material used to separate rooms."
icon = 'icons/turf/walls/materialwall.dmi'
icon_state = "materialwall-0"
base_icon_state = "materialwall"
fake_icon = 'icons/turf/walls/material_wall.dmi'
icon_state = "material_wall-open"
base_icon_state = "material_wall"
walltype = /turf/closed/wall/material
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = SMOOTH_GROUP_WALLS + SMOOTH_GROUP_CLOSED_TURFS + SMOOTH_GROUP_MATERIAL_WALLS
Expand Down
9 changes: 5 additions & 4 deletions code/game/objects/structures/window.dm
Original file line number Diff line number Diff line change
Expand Up @@ -867,8 +867,8 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/reinforced/tinted/frosted/spaw
bash_sound = 'sound/weapons/slashmiss.ogg'
break_sound = 'sound/items/poster_ripped.ogg'
hit_sound = 'sound/weapons/slashmiss.ogg'
var/static/mutable_appearance/torn = mutable_appearance('icons/obj/smooth_structures/paperframes.dmi',icon_state = "torn", layer = ABOVE_OBJ_LAYER - 0.1)
var/static/mutable_appearance/paper = mutable_appearance('icons/obj/smooth_structures/paperframes.dmi',icon_state = "paper", layer = ABOVE_OBJ_LAYER - 0.1)
var/static/mutable_appearance/torn = mutable_appearance('icons/obj/smooth_structures/structure_variations.dmi',icon_state = "paper-torn", layer = ABOVE_OBJ_LAYER - 0.1)
var/static/mutable_appearance/paper = mutable_appearance('icons/obj/smooth_structures/structure_variations.dmi',icon_state = "paper-whole", layer = ABOVE_OBJ_LAYER - 0.1)

/obj/structure/window/paperframe/Initialize(mapload)
. = ..()
Expand Down Expand Up @@ -927,14 +927,15 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/reinforced/tinted/frosted/spaw
/obj/structure/window/bronze
name = "brass window"
desc = "A paper-thin pane of translucent yet reinforced brass. Nevermind, this is just weak bronze!"
icon = 'icons/obj/smooth_structures/clockwork_window.dmi'
icon_state = "clockwork_window_single"
icon = 'icons/obj/smooth_structures/structure_variations.dmi'
icon_state = "clockwork_window-single"
glass_type = /obj/item/stack/sheet/bronze

/obj/structure/window/bronze/unanchored
anchored = FALSE

/obj/structure/window/bronze/fulltile
icon = 'icons/obj/smooth_structures/clockwork_window.dmi'
icon_state = "clockwork_window-0"
base_icon_state = "clockwork_window"
smoothing_flags = SMOOTH_BITMASK
Expand Down
Loading

0 comments on commit b648516

Please sign in to comment.