Fixes table construction. (#17276)

* Fixes table construction.

* you see yourself a victim?

---------

Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
Matt Atlas
2023-09-08 22:21:17 +02:00
committed by GitHub
parent 1a4f87318d
commit 1343dc97cb
3 changed files with 57 additions and 15 deletions

View File

@@ -55,11 +55,12 @@
var/colour_blend = TRUE var/colour_blend = TRUE
var/icon_colour // Colour applied to products of this material. var/icon_colour // Colour applied to products of this material.
var/wall_colour // Colour applied to walls specifically. var/wall_colour // Colour applied to walls specifically.
var/icon_base = "metal" // Wall and table base icon tag. See header. var/icon_base = "solid" // Wall and table base icon tag. See header.
var/door_icon_base = "metal" // Door base icon tag. See header. var/door_icon_base = "metal" // Door base icon tag. See header.
var/icon_reinf = "reinf_metal" // Overlay used var/icon_reinf = "reinf_metal" // Overlay used
var/list/stack_origin_tech = list(TECH_MATERIAL = 1) // Research level for stacks. var/list/stack_origin_tech = list(TECH_MATERIAL = 1) // Research level for stacks.
var/icon/wall_icon var/icon/wall_icon
var/icon/table_icon = 'icons/obj/structure/tables/greyscale_table.dmi'
var/icon/multipart_reinf_icon var/icon/multipart_reinf_icon
// Attributes // Attributes
@@ -377,6 +378,7 @@
/material/stone/marble /material/stone/marble
name = MATERIAL_MARBLE name = MATERIAL_MARBLE
icon_colour = "#b4b1a6" icon_colour = "#b4b1a6"
table_icon = 'icons/obj/structure/tables/marble_table.dmi'
weight = 26 weight = 26
hardness = 70 hardness = 70
integrity = 201 //hack to stop kitchen benches being flippable, todo: refactor into weight system integrity = 201 //hack to stop kitchen benches being flippable, todo: refactor into weight system
@@ -400,8 +402,8 @@
integrity = 150 integrity = 150
conductivity = 11 conductivity = 11
protectiveness = 10 // 33% protectiveness = 10 // 33%
icon_base = "solid"
wall_icon = 'icons/turf/smooth/composite_solid_color.dmi' wall_icon = 'icons/turf/smooth/composite_solid_color.dmi'
table_icon = 'icons/obj/structure/tables/steel_table.dmi'
icon_reinf = "reinf_over" icon_reinf = "reinf_over"
icon_colour = COLOR_GRAY40 icon_colour = COLOR_GRAY40
wall_colour = COLOR_GRAY20 wall_colour = COLOR_GRAY20
@@ -415,6 +417,7 @@
icon_colour = null icon_colour = null
stack_type = null stack_type = null
wall_icon = 'icons/turf/smooth/diona_wall.dmi' wall_icon = 'icons/turf/smooth/diona_wall.dmi'
table_icon = 'icons/obj/structure/tables/diona_table.dmi'
icon_base = "biomass" icon_base = "biomass"
colour_blend = FALSE colour_blend = FALSE
integrity = 100 integrity = 100
@@ -442,7 +445,7 @@
integrity = 400 integrity = 400
melting_point = 6000 melting_point = 6000
wall_icon = 'icons/turf/smooth/composite_solid_color.dmi' wall_icon = 'icons/turf/smooth/composite_solid_color.dmi'
icon_base = "solid" table_icon = 'icons/obj/structure/tables/reinforced_table.dmi'
icon_reinf = "reinf_over" icon_reinf = "reinf_over"
icon_colour = "#545c68" icon_colour = "#545c68"
wall_colour = COLOR_GRAY20 wall_colour = COLOR_GRAY20
@@ -474,6 +477,7 @@
/material/glass /material/glass
name = MATERIAL_GLASS name = MATERIAL_GLASS
stack_type = /obj/item/stack/material/glass stack_type = /obj/item/stack/material/glass
table_icon = 'icons/obj/structure/tables/glass_table.dmi'
flags = MATERIAL_BRITTLE flags = MATERIAL_BRITTLE
icon_colour = null icon_colour = null
opacity = 0.3 opacity = 0.3
@@ -590,6 +594,7 @@
name = MATERIAL_GLASS_REINFORCED name = MATERIAL_GLASS_REINFORCED
display_name = "reinforced glass" display_name = "reinforced glass"
stack_type = /obj/item/stack/material/glass/reinforced stack_type = /obj/item/stack/material/glass/reinforced
table_icon = 'icons/obj/structure/tables/rglass_table.dmi'
flags = MATERIAL_BRITTLE flags = MATERIAL_BRITTLE
icon_colour = "#00E1FF" icon_colour = "#00E1FF"
opacity = 0.3 opacity = 0.3
@@ -635,7 +640,6 @@
name = MATERIAL_PLASTIC name = MATERIAL_PLASTIC
stack_type = /obj/item/stack/material/plastic stack_type = /obj/item/stack/material/plastic
flags = MATERIAL_BRITTLE flags = MATERIAL_BRITTLE
icon_base = "solid"
icon_reinf = "reinf_over" icon_reinf = "reinf_over"
icon_colour = "#CCCCCC" icon_colour = "#CCCCCC"
hardness = 10 hardness = 10
@@ -721,6 +725,7 @@
integrity = 50 integrity = 50
icon_base = "wood" icon_base = "wood"
wall_icon = 'icons/turf/smooth/composite_wood.dmi' wall_icon = 'icons/turf/smooth/composite_wood.dmi'
table_icon = 'icons/obj/structure/tables/wood_table.dmi'
explosion_resistance = 2 explosion_resistance = 2
shard_type = SHARD_SPLINTER shard_type = SHARD_SPLINTER
shard_can_repair = 0 // you can't weld splinters back into planks shard_can_repair = 0 // you can't weld splinters back into planks
@@ -786,7 +791,6 @@
stack_type = /obj/item/stack/material/wood/log stack_type = /obj/item/stack/material/wood/log
icon_colour = "#824B28" icon_colour = "#824B28"
integrity = 50 integrity = 50
icon_base = "solid"
explosion_resistance = 4 explosion_resistance = 4
hardness = 30 hardness = 30
weight = 30 //Logs are heavier then normal pieces of wood weight = 30 //Logs are heavier then normal pieces of wood
@@ -802,7 +806,6 @@
stack_type = /obj/item/stack/material/wood/branch stack_type = /obj/item/stack/material/wood/branch
icon_colour = "#824B28" icon_colour = "#824B28"
integrity = 10 integrity = 10
icon_base = "solid"
explosion_resistance = 0 explosion_resistance = 0
hardness = 0.1 hardness = 0.1
weight = 7 weight = 7
@@ -835,7 +838,6 @@
stack_type = /obj/item/stack/material/cardboard stack_type = /obj/item/stack/material/cardboard
flags = MATERIAL_BRITTLE flags = MATERIAL_BRITTLE
integrity = 10 integrity = 10
icon_base = "solid"
icon_reinf = "reinf_over" icon_reinf = "reinf_over"
icon_colour = "#AAAAAA" icon_colour = "#AAAAAA"
hardness = 1 hardness = 1
@@ -1066,6 +1068,7 @@
/material/shuttle/skrell /material/shuttle/skrell
name = MATERIAL_SHUTTLE_SKRELL name = MATERIAL_SHUTTLE_SKRELL
table_icon = 'icons/obj/structure/tables/skrell_table.dmi'
display_name = "superadvanced alloy" display_name = "superadvanced alloy"
colour_blend = FALSE colour_blend = FALSE
icon_colour = null icon_colour = null
@@ -1074,7 +1077,6 @@
/material/graphite /material/graphite
name = MATERIAL_GRAPHITE name = MATERIAL_GRAPHITE
stack_type = /obj/item/stack/material/graphite stack_type = /obj/item/stack/material/graphite
icon_base = "solid"
icon_colour = "#666666" icon_colour = "#666666"
shard_type = SHARD_STONE_PIECE shard_type = SHARD_STONE_PIECE
weight = 20 weight = 20

View File

@@ -322,19 +322,18 @@
var/image/I var/image/I
// Base frame shape. Mostly done for glass/diamond tables, where this is visible. // Standard table image.
for(var/i = 1 to 4)
I = image(icon, dir = 1<<(i-1), icon_state = connections[i])
add_overlay(I)
// Standard table image
if(material) if(material)
for(var/i = 1 to 4) for(var/i = 1 to 4)
I = image(icon, "[material.icon_base]_[connections[i]]", dir = 1<<(i-1)) I = image(icon, "[material.icon_base]_[connections[i]]", dir = 1<<(i-1))
if(material_alteration & MATERIAL_ALTERATION_COLOR) I.color = material.icon_colour if(material_alteration & MATERIAL_ALTERATION_COLOR) I.color = material.icon_colour
add_overlay(I) add_overlay(I)
else
for(var/i = 1 to 4)
I = image(icon, dir = 1<<(i-1), icon_state = connections[i])
add_overlay(I)
// Reinforcements // Reinforcements.
if(reinforced) if(reinforced)
for(var/i = 1 to 4) for(var/i = 1 to 4)
I = image(icon, "[reinforced.icon_reinf]_[connections[i]]", dir = 1<<(i-1)) I = image(icon, "[reinforced.icon_reinf]_[connections[i]]", dir = 1<<(i-1))

View File

@@ -0,0 +1,41 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: MattAtlas
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- bugfix: "Fixed table construction."