[READY] Meat material & material datum turf support (#49402)

* temp

* meatwalls

* more

* adds sheetifier

* fix

* two

* mat texture + 4dplanner admin (#21)

* mat texture + 4dplanner admin

* keep together trait

* counter instead of trait

* finalizations

* woops

* fixes

* oopsie

* only set starting keep_together if necessary (#24)

* keep together as trait again

* remove false comment

* doc for TRAIT_KEEP_TOGETHER

* remove needless scoping

Co-authored-by: 4dplanner <3combined@gmail.com>
This commit is contained in:
Qustinnus
2020-03-04 23:18:08 +08:00
committed by GitHub
co-authored by 4dplanner
parent ad3fd3fec2
commit 4b2a8aebe5
35 changed files with 317 additions and 41 deletions
+15
View File
@@ -128,3 +128,18 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
//alternate appearance flags
#define AA_TARGET_SEE_APPEARANCE (1<<0)
#define AA_MATCH_TARGET_OVERLAYS (1<<1)
#define KEEP_TOGETHER_ORIGINAL "keep_together_original"
//setter for KEEP_TOGETHER to allow for multiple sources to set and unset it
#define ADD_KEEP_TOGETHER(x, source)\
if ((x.appearance_flags & KEEP_TOGETHER) && !HAS_TRAIT(x, TRAIT_KEEP_TOGETHER)) ADD_TRAIT(x, TRAIT_KEEP_TOGETHER, KEEP_TOGETHER_ORIGINAL); \
ADD_TRAIT(x, TRAIT_KEEP_TOGETHER, source);\
x.appearance_flags |= KEEP_TOGETHER
#define REMOVE_KEEP_TOGETHER(x, source)\
REMOVE_TRAIT(x, TRAIT_KEEP_TOGETHER, source);\
if(HAS_TRAIT_FROM_ONLY(x, TRAIT_KEEP_TOGETHER, KEEP_TOGETHER_ORIGINAL))\
REMOVE_TRAIT(x, TRAIT_KEEP_TOGETHER, KEEP_TOGETHER_ORIGINAL);\
else if(!HAS_TRAIT(x, TRAIT_KEEP_TOGETHER))\
x.appearance_flags &= ~KEEP_TOGETHER
+9
View File
@@ -6,6 +6,7 @@
#define FOOTSTEP_GRASS "grass"
#define FOOTSTEP_WATER "water"
#define FOOTSTEP_LAVA "lava"
#define FOOTSTEP_MEAT "meat"
//barefoot sounds
#define FOOTSTEP_WOOD_BAREFOOT "woodbarefoot"
#define FOOTSTEP_WOOD_CLAW "woodclaw"
@@ -79,6 +80,8 @@ GLOBAL_LIST_INIT(footstep, list(
'sound/effects/footstep/lava1.ogg',
'sound/effects/footstep/lava2.ogg',
'sound/effects/footstep/lava3.ogg'), 100, 0),
FOOTSTEP_MEAT = list(list(
'sound/effects/meatslap.ogg'), 100, 0)
))
//bare footsteps lists
GLOBAL_LIST_INIT(barefootstep, list(
@@ -120,6 +123,8 @@ GLOBAL_LIST_INIT(barefootstep, list(
'sound/effects/footstep/lava1.ogg',
'sound/effects/footstep/lava2.ogg',
'sound/effects/footstep/lava3.ogg'), 100, 0),
FOOTSTEP_MEAT = list(list(
'sound/effects/meatslap.ogg'), 100, 0),
))
//claw footsteps lists
@@ -162,6 +167,8 @@ GLOBAL_LIST_INIT(clawfootstep, list(
'sound/effects/footstep/lava1.ogg',
'sound/effects/footstep/lava2.ogg',
'sound/effects/footstep/lava3.ogg'), 100, 0),
FOOTSTEP_MEAT = list(list(
'sound/effects/meatslap.ogg'), 100, 0),
))
//heavy footsteps list
@@ -178,5 +185,7 @@ GLOBAL_LIST_INIT(heavyfootstep, list(
'sound/effects/footstep/lava1.ogg',
'sound/effects/footstep/lava2.ogg',
'sound/effects/footstep/lava3.ogg'), 100, 0),
FOOTSTEP_MEAT = list(list(
'sound/effects/meatslap.ogg'), 100, 0),
))
+2
View File
@@ -9,3 +9,5 @@
#define MATERIAL_ADD_PREFIX (1<<1)
#define MATERIAL_NO_EFFECTS (1<<2)
#define MATERIAL_AFFECT_STATISTICS (1<<3)
#define MATERIAL_SOURCE(mat) "[mat.name]_material"
+9
View File
@@ -55,6 +55,12 @@
} while (0)
#define HAS_TRAIT(target, trait) (target.status_traits ? (target.status_traits[trait] ? TRUE : FALSE) : FALSE)
#define HAS_TRAIT_FROM(target, trait, source) (target.status_traits ? (target.status_traits[trait] ? (source in target.status_traits[trait]) : FALSE) : FALSE)
#define HAS_TRAIT_FROM_ONLY(target, trait, source) (\
target.status_traits ?\
(target.status_traits[trait] ?\
((source in target.status_traits[trait]) && (length(target.status_traits) == 1))\
: FALSE)\
: FALSE)
#define HAS_TRAIT_NOT_FROM(target, trait, source) (target.status_traits ? (target.status_traits[trait] ? (length(target.status_traits[trait] - source) > 0) : FALSE) : FALSE)
/*
@@ -163,6 +169,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
//non-mob traits
#define TRAIT_PARALYSIS "paralysis" //Used for limb-based paralysis, where replacing the limb will fix it
///Used for managing KEEP_TOGETHER in [appearance_flags]
#define TRAIT_KEEP_TOGETHER "keep-together"
// item traits
#define TRAIT_NODROP "nodrop"
#define TRAIT_NO_STORAGE_INSERT "no_storage_insert" //cannot be inserted in a storage.
+8 -3
View File
@@ -12,22 +12,27 @@ SUBSYSTEM_DEF(materials)
var/list/materials
///Dictionary of category || list of material refs
var/list/materials_by_category
///Dictionary of category || list of material types, mostly used by rnd machines like autolathes.
var/list/materialtypes_by_category
///List of stackcrafting recipes for materials using rigid materials
var/list/rigid_stack_recipes = list(
new /datum/stack_recipe("chair", /obj/structure/chair/greyscale, one_per_turf = TRUE, on_floor = TRUE, applies_mats = TRUE),
new /datum/stack_recipe("toilet", /obj/structure/toilet/greyscale, one_per_turf = TRUE, on_floor = TRUE, applies_mats = TRUE),
new /datum/stack_recipe("sink", /obj/structure/sink/greyscale, one_per_turf = TRUE, on_floor = TRUE, applies_mats = TRUE),
new /datum/stack_recipe("Chair", /obj/structure/chair/greyscale, one_per_turf = TRUE, on_floor = TRUE, applies_mats = TRUE),
new /datum/stack_recipe("Toilet", /obj/structure/toilet/greyscale, one_per_turf = TRUE, on_floor = TRUE, applies_mats = TRUE),
new /datum/stack_recipe("Sink", /obj/structure/sink/greyscale, one_per_turf = TRUE, on_floor = TRUE, applies_mats = TRUE),
new /datum/stack_recipe("Floor tile", /obj/item/stack/tile/material, 1, 4, 20, applies_mats = TRUE),
)
///Ran on initialize, populated the materials and materials_by_category dictionaries with their appropiate vars (See these variables for more info)
/datum/controller/subsystem/materials/proc/InitializeMaterials()
materials = list()
materials_by_category = list()
materialtypes_by_category = list()
for(var/type in subtypesof(/datum/material))
var/datum/material/ref = new type
materials[type] = ref
for(var/c in ref.categories)
materials_by_category[c] += list(ref)
materialtypes_by_category[c] += list(type)
/datum/controller/subsystem/materials/proc/GetMaterialRef(datum/material/fakemat)
if(!materials)
+7 -3
View File
@@ -2,11 +2,15 @@
var/beauty = 0
/datum/component/beauty/Initialize(beautyamount)
if(!isatom(parent))
if(!isatom(parent) || isarea(parent))
return COMPONENT_INCOMPATIBLE
beauty = beautyamount
RegisterSignal(parent, COMSIG_ENTER_AREA, .proc/enter_area)
RegisterSignal(parent, COMSIG_EXIT_AREA, .proc/exit_area)
if(ismovable(parent))
RegisterSignal(parent, COMSIG_ENTER_AREA, .proc/enter_area)
RegisterSignal(parent, COMSIG_EXIT_AREA, .proc/exit_area)
var/area/A = get_area(parent)
if(A)
enter_area(null, A)
+13 -3
View File
@@ -86,13 +86,19 @@ Behavior that's still missing from this component that original food items had t
///All the checks for the act of eating itself and
/datum/component/edible/proc/TryToEat(mob/living/eater, mob/living/feeder)
set waitfor = FALSE
var/atom/owner = parent
if(feeder.a_intent == INTENT_HARM)
return
if(!owner.reagents.total_volume)//Shouldn't be needed but it checks to see if it has anything left in it.
to_chat(feeder, "<span class='warning'>None of [owner] left, oh no!</span>")
qdel(parent)
if(isturf(parent))
var/turf/T = parent
T.ScrapeAway(1, CHANGETURF_INHERIT_AIR)
else
qdel(parent)
return
if(!CanConsume(eater, feeder))
return
@@ -145,7 +151,7 @@ Behavior that's still missing from this component that original food items had t
var/atom/owner = parent
if(!owner.reagents)
if(!owner?.reagents)
return FALSE
if(eater.satiety > -200)
eater.satiety -= junkiness
@@ -215,7 +221,11 @@ Behavior that's still missing from this component that original food items had t
if(!eater)
return
if(!owner.reagents.total_volume)
qdel(parent)
if(isturf(parent))
var/turf/T = parent
T.ScrapeAway(1, CHANGETURF_INHERIT_AIR)
else
qdel(parent)
///Ability to feed food to puppers
/datum/component/edible/proc/UseByAnimal(datum/source, mob/user)
+55 -2
View File
@@ -28,6 +28,22 @@ Simple datum which is instanced once per type and is used for every object of sa
var/armor_modifiers = list("melee" = 1, "bullet" = 1, "laser" = 1, "energy" = 1, "bomb" = 1, "bio" = 1, "rad" = 1, "fire" = 1, "acid" = 1)
///How beautiful is this material per unit
var/beauty_modifier = 0
///Can be used to override the sound items make, lets add some SLOSHing.
var/item_sound_override
///Can be used to override the stepsound a turf makes. MORE SLOOOSH
var/turf_sound_override
///what texture icon state to overlay
var/texture_layer_icon_state
///a cached filter for the texture icon
var/cached_texture_filter
/datum/material/New()
. = ..()
if(texture_layer_icon_state)
var/texture_icon = icon('icons/materials/composite.dmi', texture_layer_icon_state)
cached_texture_filter = filter(type="layer", icon=texture_icon, blend_mode = BLEND_INSET_OVERLAY)
///This proc is called when the material is added to an object.
/datum/material/proc/on_applied(atom/source, amount, material_flags)
@@ -36,6 +52,9 @@ Simple datum which is instanced once per type and is used for every object of sa
source.add_atom_colour(color, FIXED_COLOUR_PRIORITY)
if(alpha)
source.alpha = alpha
if(texture_layer_icon_state)
ADD_KEEP_TOGETHER(source, MATERIAL_SOURCE(src))
source.filters += cached_texture_filter
if(material_flags & MATERIAL_ADD_PREFIX)
source.name = "[name] [source.name]"
@@ -46,8 +65,11 @@ Simple datum which is instanced once per type and is used for every object of sa
if(istype(source, /obj)) //objs
on_applied_obj(source, amount, material_flags)
if(istype(source, /turf)) //turfs
on_applied_turf(source, amount, material_flags)
///This proc is called when the material is added to an object specifically.
/datum/material/proc/on_applied_obj(var/obj/o, amount, material_flags)
/datum/material/proc/on_applied_obj(obj/o, amount, material_flags)
if(material_flags & MATERIAL_AFFECT_STATISTICS)
var/new_max_integrity = CEILING(o.max_integrity * integrity_modifier, 1)
o.modify_max_integrity(new_max_integrity)
@@ -63,12 +85,37 @@ Simple datum which is instanced once per type and is used for every object of sa
for(var/i in current_armor)
temp_armor_list[i] = current_armor[i] * armor_modifiers[i]
o.armor = getArmor(arglist(temp_armor_list))
if(!isitem(o))
return
var/obj/item/I = o
if(!item_sound_override)
return
I.hitsound = item_sound_override
I.usesound = item_sound_override
I.mob_throw_hit_sound = item_sound_override
I.equip_sound = item_sound_override
I.pickup_sound = item_sound_override
I.drop_sound = item_sound_override
/datum/material/proc/on_applied_turf(var/turf/T, amount, material_flags)
if(isopenturf(T))
if(!turf_sound_override)
return
var/turf/open/O = T
O.footstep = turf_sound_override
O.barefootstep = turf_sound_override
O.clawfootstep = turf_sound_override
O.heavyfootstep = turf_sound_override
return
///This proc is called when the material is removed from an object.
/datum/material/proc/on_removed(atom/source, material_flags)
if(material_flags & MATERIAL_COLOR) //Prevent changing things with pre-set colors, to keep colored toolboxes their looks for example
if(color)
source.remove_atom_colour(FIXED_COLOUR_PRIORITY, color)
if(texture_layer_icon_state)
source.filters -= cached_texture_filter
REMOVE_KEEP_TOGETHER(source, MATERIAL_SOURCE(src))
source.alpha = initial(source.alpha)
if(material_flags & MATERIAL_ADD_PREFIX)
@@ -77,10 +124,16 @@ Simple datum which is instanced once per type and is used for every object of sa
if(istype(source, /obj)) //objs
on_removed_obj(source, material_flags)
if(istype(source, /turf)) //turfs
on_removed_turf(source, material_flags)
///This proc is called when the material is removed from an object specifically.
/datum/material/proc/on_removed_obj(var/obj/o, amount, material_flags)
/datum/material/proc/on_removed_obj(obj/o, material_flags)
if(material_flags & MATERIAL_AFFECT_STATISTICS)
var/new_max_integrity = initial(o.max_integrity)
o.modify_max_integrity(new_max_integrity)
o.force = initial(o.force)
o.throwforce = initial(o.throwforce)
/datum/material/proc/on_removed_turf(turf/T, material_flags)
return
+34
View File
@@ -0,0 +1,34 @@
///It's gross, gets the name of it's owner, and is all kinds of fucked up
/datum/material/meat
name = "meat"
id = "meat"
desc = "Meat"
color = rgb(214, 67, 67)
categories = list(MAT_CATEGORY_RIGID = TRUE)
sheet_type = /obj/item/stack/sheet/meat
value_per_unit = 0.05
beauty_modifier = -0.3
strength_modifier = 0.7
armor_modifiers = list("melee" = 0.3, "bullet" = 0.3, "laser" = 1.2, "energy" = 1.2, "bomb" = 0.3, "bio" = 0, "rad" = 0.7, "fire" = 1, "acid" = 1)
item_sound_override = 'sound/effects/meatslap.ogg'
turf_sound_override = FOOTSTEP_MEAT
texture_layer_icon_state = "meat"
/datum/material/meat/on_removed(atom/source, material_flags)
. = ..()
qdel(source.GetComponent(/datum/component/edible))
/datum/material/meat/on_applied_obj(obj/O, amount, material_flags)
. = ..()
O.obj_flags |= UNIQUE_RENAME //So you can name it after the person its made from, a depressing comprimise.
make_edible(O, amount, material_flags)
/datum/material/meat/on_applied_turf(turf/T, amount, material_flags)
. = ..()
make_edible(T, amount, material_flags)
/datum/material/meat/proc/make_edible(atom/source, amount, material_flags)
var/nutriment_count = 3 * (amount / MINERAL_MATERIAL_AMOUNT)
var/oil_count = 2 * (amount / MINERAL_MATERIAL_AMOUNT)
source.AddComponent(/datum/component/edible, list(/datum/reagent/consumable/nutriment = nutriment_count, /datum/reagent/consumable/cooking_oil = oil_count), null, RAW | MEAT | GROSS, null, 30, list("Fleshy"))
+1 -18
View File
@@ -48,24 +48,7 @@
)
/obj/machinery/autolathe/Initialize()
var/static/list/allowed_types = list(
/datum/material/iron,
/datum/material/glass,
/datum/material/gold,
/datum/material/silver,
/datum/material/diamond,
/datum/material/uranium,
/datum/material/plasma,
/datum/material/bluespace,
/datum/material/bananium,
/datum/material/titanium,
/datum/material/runite,
/datum/material/plastic,
/datum/material/adamantine,
/datum/material/mythril,
/datum/material/wood,
)
AddComponent(/datum/component/material_container, allowed_types, _show_on_examine=TRUE, _after_insert=CALLBACK(src, .proc/AfterMaterialInsert))
AddComponent(/datum/component/material_container, SSmaterials.materialtypes_by_category[MAT_CATEGORY_RIGID], 0, TRUE, null, null, CALLBACK(src, .proc/AfterMaterialInsert))
. = ..()
wires = new /datum/wires/autolathe(src)
+44
View File
@@ -0,0 +1,44 @@
/obj/machinery/sheetifier
name = "Sheet-meister 2000"
desc = "A very sheety machine"
icon = 'icons/obj/machines/sheetifier.dmi'
icon_state = "base_machine"
density = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = 10
active_power_usage = 100
circuit = /obj/item/circuitboard/machine/sheetifier
layer = BELOW_OBJ_LAYER
var/busy_processing = FALSE
/obj/machinery/sheetifier/Initialize()
. = ..()
AddComponent(/datum/component/material_container, list(/datum/material/meat), MINERAL_MATERIAL_AMOUNT * MAX_STACK_SIZE * 2, TRUE, /obj/item/reagent_containers/food/snacks/meat/slab, CALLBACK(src, .proc/CanInsertMaterials), CALLBACK(src, .proc/AfterInsertMaterials))
/obj/machinery/sheetifier/update_overlays()
. = ..()
if(machine_stat & (BROKEN|NOPOWER))
return
var/mutable_appearance/on_overlay = mutable_appearance(icon, "buttons_on")
. += on_overlay
/obj/machinery/sheetifier/update_icon_state()
icon_state = "base_machine[busy_processing ? "_processing" : ""]"
/obj/machinery/sheetifier/proc/CanInsertMaterials()
return !busy_processing
/obj/machinery/sheetifier/proc/AfterInsertMaterials(item_inserted, id_inserted, amount_inserted)
busy_processing = TRUE
update_icon()
var/datum/material/last_inserted_material = id_inserted
var/mutable_appearance/processing_overlay = mutable_appearance(icon, "processing")
processing_overlay.color = last_inserted_material.color
flick_overlay_static(processing_overlay, src, 64)
addtimer(CALLBACK(src, .proc/finish_processing), 64)
/obj/machinery/sheetifier/proc/finish_processing()
busy_processing = FALSE
update_icon()
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
materials.retrieve_all() //Returns all as sheets
@@ -1173,7 +1173,13 @@
build_path = /obj/machinery/rnd/production/techfab/department/cargo
//Misc
/obj/item/circuitboard/machine/sheetifier
name = "Sheet-meister 2000 (Machine Board)"
icon_state = "supply"
build_path = /obj/machinery/sheetifier
req_components = list(
/obj/item/stock_parts/manipulator = 2,
/obj/item/stock_parts/matter_bin = 2)
/obj/item/circuitboard/machine/abductor
name = "alien board (Report This)"
+1 -1
View File
@@ -647,7 +647,7 @@
item_state = "mace_greyscale"
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR //Material type changes the prefix as well as the color.
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS //Material type changes the prefix as well as the color.
custom_materials = list(/datum/material/iron = 12000) //Defaults to an Iron Mace.
slot_flags = ITEM_SLOT_BELT
force = 14
@@ -41,6 +41,7 @@ GLOBAL_LIST_INIT(sandstone_recipes, list ( \
custom_materials = list(/datum/material/glass=MINERAL_MATERIAL_AMOUNT)
sheettype = "sandstone"
merge_type = /obj/item/stack/sheet/mineral/sandstone
walltype = /turf/closed/wall/mineral/sandstone
/obj/item/stack/sheet/mineral/sandstone/get_main_recipes()
. = ..()
@@ -103,6 +104,7 @@ GLOBAL_LIST_INIT(sandbag_recipes, list ( \
point_value = 25
merge_type = /obj/item/stack/sheet/mineral/diamond
material_type = /datum/material/diamond
walltype = /turf/closed/wall/mineral/diamond
GLOBAL_LIST_INIT(diamond_recipes, list ( \
new/datum/stack_recipe("diamond door", /obj/structure/mineral_door/transparent/diamond, 10, one_per_turf = 1, on_floor = 1), \
@@ -131,6 +133,7 @@ GLOBAL_LIST_INIT(diamond_recipes, list ( \
point_value = 20
merge_type = /obj/item/stack/sheet/mineral/uranium
material_type = /datum/material/uranium
walltype = /turf/closed/wall/mineral/uranium
GLOBAL_LIST_INIT(uranium_recipes, list ( \
new/datum/stack_recipe("uranium door", /obj/structure/mineral_door/uranium, 10, one_per_turf = 1, on_floor = 1), \
@@ -159,6 +162,7 @@ GLOBAL_LIST_INIT(uranium_recipes, list ( \
point_value = 20
merge_type = /obj/item/stack/sheet/mineral/plasma
material_type = /datum/material/plasma
walltype = /turf/closed/wall/mineral/plasma
/obj/item/stack/sheet/mineral/plasma/suicide_act(mob/living/carbon/user)
user.visible_message("<span class='suicide'>[user] begins licking \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
@@ -201,6 +205,7 @@ GLOBAL_LIST_INIT(plasma_recipes, list ( \
point_value = 20
merge_type = /obj/item/stack/sheet/mineral/gold
material_type = /datum/material/gold
walltype = /turf/closed/wall/mineral/gold
GLOBAL_LIST_INIT(gold_recipes, list ( \
new/datum/stack_recipe("golden door", /obj/structure/mineral_door/gold, 10, one_per_turf = 1, on_floor = 1), \
@@ -232,6 +237,7 @@ GLOBAL_LIST_INIT(gold_recipes, list ( \
merge_type = /obj/item/stack/sheet/mineral/silver
material_type = /datum/material/silver
tableVariant = /obj/structure/table/optable
walltype = /turf/closed/wall/mineral/silver
GLOBAL_LIST_INIT(silver_recipes, list ( \
new/datum/stack_recipe("silver door", /obj/structure/mineral_door/silver, 10, one_per_turf = 1, on_floor = 1), \
@@ -262,6 +268,7 @@ GLOBAL_LIST_INIT(silver_recipes, list ( \
point_value = 50
merge_type = /obj/item/stack/sheet/mineral/bananium
material_type = /datum/material/bananium
walltype = /turf/closed/wall/mineral/bananium
GLOBAL_LIST_INIT(bananium_recipes, list ( \
new/datum/stack_recipe("bananium tile", /obj/item/stack/tile/mineral/bananium, 1, 4, 20), \
@@ -290,6 +297,7 @@ GLOBAL_LIST_INIT(bananium_recipes, list ( \
point_value = 20
merge_type = /obj/item/stack/sheet/mineral/titanium
material_type = /datum/material/titanium
walltype = /turf/closed/wall/mineral/titanium
GLOBAL_LIST_INIT(titanium_recipes, list ( \
new/datum/stack_recipe("titanium tile", /obj/item/stack/tile/mineral/titanium, 1, 4, 20), \
@@ -320,6 +328,7 @@ GLOBAL_LIST_INIT(titanium_recipes, list ( \
point_value = 45
merge_type = /obj/item/stack/sheet/mineral/plastitanium
material_flags = MATERIAL_NO_EFFECTS
walltype = /turf/closed/wall/mineral/plastitanium
GLOBAL_LIST_INIT(plastitanium_recipes, list ( \
new/datum/stack_recipe("plastitanium tile", /obj/item/stack/tile/mineral/plastitanium, 1, 4, 20), \
@@ -343,6 +352,7 @@ GLOBAL_LIST_INIT(plastitanium_recipes, list ( \
throwforce = 2
grind_results = list(/datum/reagent/consumable/ice = 20)
merge_type = /obj/item/stack/sheet/mineral/snow
walltype = /turf/closed/wall/mineral/snow
GLOBAL_LIST_INIT(snow_recipes, list ( \
new/datum/stack_recipe("Snow wall", /turf/closed/wall/mineral/snow, 5, one_per_turf = 1, on_floor = 1), \
@@ -235,6 +235,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
novariants = TRUE
material_type = /datum/material/wood
grind_results = list(/datum/reagent/cellulose = 20) //no lignocellulose or lignin reagents yet,
walltype = /turf/closed/wall/mineral/wood
/obj/item/stack/sheet/mineral/wood/get_main_recipes()
. = ..()
@@ -668,3 +669,14 @@ new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperfra
desc = "A source of raw socialism, capable of bringing forth the prophesized Soviet Golem."
icon_state = "sheet-stalinium"
merge_type = /obj/item/stack/sheet/stalinium
/obj/item/stack/sheet/meat
name = "meat sheet"
desc = "Something's bloody meat compressed into a nice solid sheet"
singular_name = "meat sheet"
icon_state = "sheet-meat"
material_flags = MATERIAL_COLOR
custom_materials = list(/datum/material/meat = MINERAL_MATERIAL_AMOUNT)
merge_type = /obj/item/stack/sheet/meat
material_type = /datum/material/meat
material_modifier = 1 //None of that wussy stuff
@@ -12,6 +12,8 @@
novariants = FALSE
var/sheettype = null //this is used for girders in the creation of walls/false walls
var/point_value = 0 //turn-in value for the gulag stacker - loosely relative to its rarity.
///What type of wall does this sheet spawn
var/walltype
/obj/item/stack/sheet/Initialize(mapload, new_amount, merge)
. = ..()
@@ -333,3 +333,11 @@
icon_state = "tile_plastic"
custom_materials = list(/datum/material/plastic=500)
turf_type = /turf/open/floor/plastic
/obj/item/stack/tile/material
name = "tile"
singular_name = "floor tile"
desc = "A tile of flooring."
icon_state = "material_tile"
turf_type = /turf/open/floor/material
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
+11 -2
View File
@@ -163,7 +163,7 @@
qdel(src)
return
if(S.sheettype && S.sheettype != "runed")
if(S.sheettype != "runed")
var/M = S.sheettype
if(state == GIRDER_DISPLACED)
if(S.get_amount() < 2)
@@ -189,7 +189,16 @@
S.use(2)
to_chat(user, "<span class='notice'>You add the plating.</span>")
var/turf/T = get_turf(src)
T.PlaceOnTop(text2path("/turf/closed/wall/mineral/[M]"))
if(S.walltype)
T.PlaceOnTop(S.walltype)
else
var/turf/newturf = T.PlaceOnTop(/turf/closed/wall/material)
var/list/material_list = list()
if(S.material_type)
material_list[SSmaterials.GetMaterialRef(S.material_type)] = MINERAL_MATERIAL_AMOUNT * 2
if(material_list)
newturf.set_custom_materials(material_list)
transfer_fingerprints_to(T)
qdel(src)
return
@@ -0,0 +1,19 @@
/turf/closed/wall/material
name = "wall"
desc = "A solid wall made out of a certain material"
icon = 'icons/turf/walls/materialwall.dmi'
icon_state = "wall"
canSmoothWith = list(/turf/closed/wall/material)
smooth = SMOOTH_TRUE
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
/turf/closed/wall/material/break_wall()
for(var/i in custom_materials)
var/datum/material/M = i
new M.sheet_type(src, FLOOR(custom_materials[M] / MINERAL_MATERIAL_AMOUNT, 1))
return new girder_type(src)
/turf/closed/wall/material/devastate_wall()
for(var/i in custom_materials)
var/datum/material/M = i
new M.sheet_type(src, FLOOR(custom_materials[M] / MINERAL_MATERIAL_AMOUNT, 1))
+15 -1
View File
@@ -186,9 +186,12 @@
if(user && !silent)
to_chat(user, "<span class='notice'>You remove the floor tile.</span>")
if(floor_tile && make_tile)
new floor_tile(src)
spawn_tile()
return make_plating()
/turf/open/floor/proc/spawn_tile()
new floor_tile(src)
/turf/open/floor/singularity_pull(S, current_size)
..()
if(current_size == STAGE_THREE)
@@ -290,3 +293,14 @@
return TRUE
return FALSE
/turf/open/floor/material
name = "plating"
desc = "A flooring made out of a certain material"
icon_state = "materialfloor"
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
/turf/open/floor/material/spawn_tile()
for(var/i in custom_materials)
var/datum/material/M = i
new M.sheet_type(src, FLOOR(custom_materials[M] / MINERAL_MATERIAL_AMOUNT, 1))
+10 -5
View File
@@ -76,11 +76,16 @@
var/obj/item/stack/tile/W = C
if(!W.use(1))
return
var/turf/open/floor/T = PlaceOnTop(W.turf_type, flags = CHANGETURF_INHERIT_AIR)
if(istype(W, /obj/item/stack/tile/light)) //TODO: get rid of this ugly check somehow
var/obj/item/stack/tile/light/L = W
var/turf/open/floor/light/F = T
F.state = L.state
if(istype(W, /obj/item/stack/tile/material))
var/turf/newturf = PlaceOnTop(/turf/open/floor/material, flags = CHANGETURF_INHERIT_AIR)
newturf.set_custom_materials(W.custom_materials)
else if(W.turf_type)
var/turf/open/floor/T = PlaceOnTop(W.turf_type, flags = CHANGETURF_INHERIT_AIR)
if(istype(W, /obj/item/stack/tile/light)) //TODO: get rid of this ugly check somehow
var/obj/item/stack/tile/light/L = W
var/turf/open/floor/light/F = T
F.state = L.state
playsound(src, 'sound/weapons/genhit.ogg', 50, TRUE)
else
to_chat(user, "<span class='warning'>This section is too damaged to support a tile! Use a welder to fix the damage.</span>")
+9
View File
@@ -82,6 +82,15 @@
if (opacity)
has_opaque_atom = TRUE
if(custom_materials)
var/temp_list = list()
for(var/i in custom_materials)
temp_list[SSmaterials.GetMaterialRef(i)] = custom_materials[i] //Get the proper instanced version
custom_materials = null //Null the list to prepare for applying the materials properly
set_custom_materials(temp_list)
ComponentInitialize()
return INITIALIZE_HINT_NORMAL
@@ -1,6 +1,8 @@
/obj/item/reagent_containers/food/snacks/meat
var/subjectname = ""
var/subjectjob = null
custom_materials = list(/datum/material/meat = MINERAL_MATERIAL_AMOUNT * 4)
material_flags = MATERIAL_NO_EFFECTS //Remove this once we refactor food, prevents meat literaly being eaten twice
/obj/item/reagent_containers/food/snacks/meat/slab
name = "meat"
@@ -303,7 +303,7 @@
build_path = /obj/item/circuitboard/computer/nanite_cloud_controller
category = list("Computer Boards")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
/datum/design/board/advanced_camera
name = "Computer Design (Advanced Camera Console)"
desc = "Allows for the construction of circuit boards used to build advanced camera consoles."
@@ -610,3 +610,11 @@
build_path = /obj/item/circuitboard/machine/medipen_refiller
category = list ("Medical Machinery")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
/datum/design/board/sheetifier
name = "Sheetifier"
desc = "This machine turns weird things into sheets."
id = "sheetifier"
build_path = /obj/item/circuitboard/machine/sheetifier
category = list ("Misc. Machinery")
departmental_flags = DEPARTMENTAL_FLAG_ALL
+1 -1
View File
@@ -153,7 +153,7 @@
display_name = "Advanced Engineering"
description = "Pushing the boundaries of physics, one chainsaw-fist at a time."
prereq_ids = list("engineering", "emp_basic")
design_ids = list("engine_goggles", "magboots", "forcefield_projector", "weldingmask", "rcd_loaded", "rpd_loaded")
design_ids = list("engine_goggles", "magboots", "forcefield_projector", "weldingmask", "rcd_loaded", "rpd_loaded", "sheetifier")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
export_price = 5000
+1
View File
@@ -138,3 +138,4 @@ NicBR = Game Master
LoserWasTaken = Game Master
Fikou = Game Master
Skoglol = Game Master
4dplanner = Game Master
Binary file not shown.

After

Width:  |  Height:  |  Size: 855 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 304 KiB

After

Width:  |  Height:  |  Size: 299 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.
+3
View File
@@ -566,6 +566,7 @@
#include "code\datums\martial\wrestling.dm"
#include "code\datums\materials\_material.dm"
#include "code\datums\materials\basemats.dm"
#include "code\datums\materials\meat.dm"
#include "code\datums\mood_events\_mood_event.dm"
#include "code\datums\mood_events\beauty_events.dm"
#include "code\datums\mood_events\drink_events.dm"
@@ -724,6 +725,7 @@
#include "code\game\machinery\requests_console.dm"
#include "code\game\machinery\roulette_machine.dm"
#include "code\game\machinery\scan_gate.dm"
#include "code\game\machinery\sheetifier.dm"
#include "code\game\machinery\shieldgen.dm"
#include "code\game\machinery\Sleeper.dm"
#include "code\game\machinery\slotmachine.dm"
@@ -1212,6 +1214,7 @@
#include "code\game\turfs\closed\_closed.dm"
#include "code\game\turfs\closed\minerals.dm"
#include "code\game\turfs\closed\walls.dm"
#include "code\game\turfs\closed\wall\material_walls.dm"
#include "code\game\turfs\closed\wall\mineral_walls.dm"
#include "code\game\turfs\closed\wall\misc_walls.dm"
#include "code\game\turfs\closed\wall\reinf_walls.dm"