mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-26 22:56:33 +01:00
Reworking bonfire fuel logic.
This commit is contained in:
@@ -86,7 +86,7 @@ GLOBAL_LIST_INIT(plant_mob_products, list(
|
||||
GLOBAL_LIST_INIT(plant_item_products, list(
|
||||
/obj/item/stack/material/cloth = 30,
|
||||
/obj/item/stack/material/wax = 20,
|
||||
/obj/item/stack/material/log = 30,
|
||||
/obj/item/stack/material/fuel/log = 30,
|
||||
/obj/item/stack/material/resin = 10,
|
||||
/obj/item/material/shard/shrapnel = 2,
|
||||
/obj/item/ore = 5,
|
||||
|
||||
@@ -213,9 +213,9 @@
|
||||
var/flesh_colour = seed.get_trait(TRAIT_FLESH_COLOUR)
|
||||
if(!flesh_colour) flesh_colour = seed.get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
for(var/i=0,i<2,i++)
|
||||
var/obj/item/stack/material/wood/NG = new (user.loc)
|
||||
var/obj/item/stack/material/fuel/wood/NG = new (user.loc)
|
||||
if(flesh_colour) NG.color = flesh_colour
|
||||
for (var/obj/item/stack/material/wood/G in user.loc)
|
||||
for (var/obj/item/stack/material/fuel/wood/G in user.loc)
|
||||
if(G==NG)
|
||||
continue
|
||||
if(G.amount>=G.max_amount)
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
display_name = "tower caps"
|
||||
chems = list("woodpulp" = list(10,1))
|
||||
mutants = list("redcap")
|
||||
has_item_product = /obj/item/stack/material/log
|
||||
has_item_product = /obj/item/stack/material/fuel/log
|
||||
|
||||
/datum/seed/mushroom/towercap/New()
|
||||
..()
|
||||
@@ -209,4 +209,4 @@
|
||||
set_trait(TRAIT_PRODUCT_COLOUR,"#e29cd2")
|
||||
set_trait(TRAIT_PLANT_COLOUR,"#f8e6f4")
|
||||
set_trait(TRAIT_PLANT_ICON,"mushroom9")
|
||||
set_trait(TRAIT_SPORING, TRUE)
|
||||
set_trait(TRAIT_SPORING, TRUE)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
to_chat(user, "<span class='notice'>You begin dismantling \the [src].</span>")
|
||||
if(do_after(user,25 * O.toolspeed))
|
||||
to_chat(user, "<span class='notice'>You dismantle \the [src].</span>")
|
||||
new /obj/item/stack/material/wood(get_turf(src), 3)
|
||||
new /obj/item/stack/material/fuel/wood(get_turf(src), 3)
|
||||
for(var/obj/item/book/b in contents)
|
||||
b.loc = (get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
@@ -98,19 +98,19 @@
|
||||
|
||||
/obj/fiftyspawner/wood
|
||||
name = "stack of wood"
|
||||
type_to_spawn = /obj/item/stack/material/wood
|
||||
type_to_spawn = /obj/item/stack/material/fuel/wood
|
||||
|
||||
/obj/fiftyspawner/sifwood
|
||||
name = "stack of alien wood"
|
||||
type_to_spawn = /obj/item/stack/material/wood/sif
|
||||
type_to_spawn = /obj/item/stack/material/fuel/wood/sif
|
||||
|
||||
/obj/fiftyspawner/log
|
||||
name = "stack of logs"
|
||||
type_to_spawn = /obj/item/stack/material/log
|
||||
type_to_spawn = /obj/item/stack/material/fuel/log
|
||||
|
||||
/obj/fiftyspawner/log/sif
|
||||
name = "stack of alien logs"
|
||||
type_to_spawn = /obj/item/stack/material/log/sif
|
||||
type_to_spawn = /obj/item/stack/material/fuel/log/sif
|
||||
|
||||
/obj/fiftyspawner/cloth
|
||||
name = "stack of cloth"
|
||||
@@ -143,4 +143,4 @@
|
||||
//R-UST port
|
||||
/obj/fiftyspawner/deuterium
|
||||
name = "stack of deuterium"
|
||||
type_to_spawn = /obj/item/stack/material/deuterium
|
||||
type_to_spawn = /obj/item/stack/material/deuterium
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/material/wood
|
||||
name = MAT_WOOD
|
||||
stack_type = /obj/item/stack/material/wood
|
||||
stack_type = /obj/item/stack/material/fuel/wood
|
||||
icon_colour = "#9c5930"
|
||||
integrity = 50
|
||||
icon_base = "wood"
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
/datum/material/wood/sif
|
||||
name = MAT_SIFWOOD
|
||||
stack_type = /obj/item/stack/material/wood/sif
|
||||
stack_type = /obj/item/stack/material/fuel/wood/sif
|
||||
icon_colour = "#0099cc" // Cyan-ish
|
||||
stack_origin_tech = list(TECH_MATERIAL = 2, TECH_BIO = 2) // Alien wood would presumably be more interesting to the analyzer.
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
/datum/material/wood/log
|
||||
name = MAT_LOG
|
||||
icon_base = "log"
|
||||
stack_type = /obj/item/stack/material/log
|
||||
stack_type = /obj/item/stack/material/fuel/log
|
||||
sheet_singular_name = null
|
||||
sheet_plural_name = "pile"
|
||||
pass_stack_colors = TRUE
|
||||
@@ -82,4 +82,4 @@
|
||||
name = MAT_SIFLOG
|
||||
icon_colour = "#0099cc" // Cyan-ish
|
||||
stack_origin_tech = list(TECH_MATERIAL = 2, TECH_BIO = 2)
|
||||
stack_type = /obj/item/stack/material/log/sif
|
||||
stack_type = /obj/item/stack/material/fuel/log/sif
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
/obj/item/stack/material/wood
|
||||
/obj/item/stack/material/fuel // abstract type, do not use
|
||||
var/bonfire_fuel_time = 1 MINUTE
|
||||
|
||||
/obj/item/stack/material/fuel/wood
|
||||
name = "wooden plank"
|
||||
icon_state = "sheet-wood"
|
||||
default_type = MAT_WOOD
|
||||
@@ -7,13 +10,29 @@
|
||||
drop_sound = 'sound/items/drop/wooden.ogg'
|
||||
pickup_sound = 'sound/items/pickup/wooden.ogg'
|
||||
no_variants = FALSE
|
||||
drying_wetness = 50
|
||||
dried_type = /obj/item/stack/material/fuel/wood/dried
|
||||
bonfire_fuel_time = 3 MINUTES
|
||||
|
||||
/obj/item/stack/material/wood/sif
|
||||
name = "alien wooden plank"
|
||||
/obj/item/stack/material/fuel/wood/sif
|
||||
name = "sifwood plank"
|
||||
color = "#0099cc"
|
||||
default_type = MAT_SIFWOOD
|
||||
dried_type = /obj/item/stack/material/fuel/wood/dried/sif
|
||||
|
||||
// Dried subtypes are just used for fuel calc in bonfires, they should be otherwise identical.
|
||||
/obj/item/stack/material/fuel/wood/dried
|
||||
name = "dried wooden plank"
|
||||
dried_type = null
|
||||
drying_wetness = null
|
||||
bonfire_fuel_time = 6 MINUTES
|
||||
|
||||
/obj/item/stack/material/fuel/wood/dried/sif
|
||||
name = "dried sifwood plank"
|
||||
color = "#0099cc"
|
||||
default_type = MAT_SIFWOOD
|
||||
|
||||
/obj/item/stack/material/log
|
||||
/obj/item/stack/material/fuel/log
|
||||
name = "log"
|
||||
icon_state = "sheet-log"
|
||||
default_type = MAT_LOG
|
||||
@@ -22,17 +41,34 @@
|
||||
max_amount = 25
|
||||
w_class = ITEMSIZE_HUGE
|
||||
description_info = "Use inhand to craft things, or use a sharp and edged object on this to convert it into two wooden planks."
|
||||
var/plank_type = /obj/item/stack/material/wood
|
||||
drop_sound = 'sound/items/drop/wooden.ogg'
|
||||
pickup_sound = 'sound/items/pickup/wooden.ogg'
|
||||
drying_wetness = 80
|
||||
dried_type = /obj/item/stack/material/fuel/log/dried
|
||||
bonfire_fuel_time = 4 MINUTES
|
||||
var/plank_type = /obj/item/stack/material/fuel/wood
|
||||
|
||||
/obj/item/stack/material/log/sif
|
||||
name = "alien log"
|
||||
/obj/item/stack/material/fuel/log/sif
|
||||
name = "sifwood log"
|
||||
default_type = MAT_SIFLOG
|
||||
color = "#0099cc"
|
||||
plank_type = /obj/item/stack/material/wood/sif
|
||||
plank_type = /obj/item/stack/material/fuel/wood/sif
|
||||
dried_type = /obj/item/stack/material/fuel/log/dried/sif
|
||||
|
||||
/obj/item/stack/material/log/attackby(var/obj/item/W, var/mob/user)
|
||||
/obj/item/stack/material/fuel/log/dried
|
||||
name = "dried log"
|
||||
drying_wetness = null
|
||||
dried_type = null
|
||||
plank_type = /obj/item/stack/material/fuel/wood/dried
|
||||
bonfire_fuel_time = 8 MINUTES
|
||||
|
||||
/obj/item/stack/material/fuel/log/dried/sif
|
||||
name = "dried sifwood log"
|
||||
default_type = MAT_SIFLOG
|
||||
color = "#0099cc"
|
||||
plank_type = /obj/item/stack/material/fuel/wood/dried/sif
|
||||
|
||||
/obj/item/stack/material/fuel/log/attackby(var/obj/item/W, var/mob/user)
|
||||
if(!istype(W) || W.force <= 0)
|
||||
return ..()
|
||||
if(W.sharp && W.edge)
|
||||
@@ -41,13 +77,13 @@
|
||||
if(do_after(user, time, src) && use(1))
|
||||
to_chat(user, "<span class='notice'>You cut up a log into planks.</span>")
|
||||
playsound(src, 'sound/effects/woodcutting.ogg', 50, 1)
|
||||
var/obj/item/stack/material/wood/existing_wood = null
|
||||
for(var/obj/item/stack/material/wood/M in user.loc)
|
||||
var/obj/item/stack/material/fuel/wood/existing_wood = null
|
||||
for(var/obj/item/stack/material/fuel/wood/M in user.loc)
|
||||
if(M.material.name == src.material.name)
|
||||
existing_wood = M
|
||||
break
|
||||
|
||||
var/obj/item/stack/material/wood/new_wood = new plank_type(user.loc)
|
||||
var/obj/item/stack/material/fuel/wood/new_wood = new plank_type(user.loc)
|
||||
new_wood.amount = 2
|
||||
if(existing_wood && new_wood.transfer_to(existing_wood))
|
||||
to_chat(user, "<span class='notice'>You add the newly-formed wood to the stack. It now contains [existing_wood.amount] planks.</span>")
|
||||
@@ -57,4 +93,4 @@
|
||||
/obj/item/stack/material/grass
|
||||
name = "grass"
|
||||
icon_state = "tile_grass"
|
||||
default_type = "grass"
|
||||
default_type = "grass"
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
/mob/living/simple_mob/animal/space/tree/death()
|
||||
..(null,"is hacked into pieces!")
|
||||
playsound(src, 'sound/effects/woodcutting.ogg', 100, 1)
|
||||
new /obj/item/stack/material/wood(loc)
|
||||
new /obj/item/stack/material/fuel/wood(loc)
|
||||
qdel(src)
|
||||
|
||||
/decl/mob_organ_names/tree
|
||||
hit_zones = list("trunk", "branches", "twigs")
|
||||
hit_zones = list("trunk", "branches", "twigs")
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
/obj/structure/noticeboard/proc/dismantle()
|
||||
for(var/thing in notices)
|
||||
remove_paper(thing, skip_icon_update = TRUE)
|
||||
new /obj/item/stack/material/wood(get_turf(src))
|
||||
new /obj/item/stack/material/fuel/wood(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/noticeboard/Destroy()
|
||||
@@ -187,7 +187,7 @@
|
||||
|
||||
/obj/structure/noticeboard/anomaly/Initialize()
|
||||
. = ..()
|
||||
|
||||
|
||||
var/obj/item/paper/P = new()
|
||||
P.name = "Memo RE: proper analysis procedure"
|
||||
P.info = "<br>We keep test dummies in pens here for a reason, so standard procedure should be to activate newfound alien artifacts and place the two in close proximity. Promising items I might even approve monkey testing on."
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
/obj/item/stack/material/steel = 150,
|
||||
/obj/item/stack/material/glass = 150,
|
||||
/obj/item/stack/material/copper = 150,
|
||||
/obj/item/stack/material/wood = 150,
|
||||
/obj/item/stack/material/fuel/wood = 150,
|
||||
/obj/item/stack/material/plastic = 150,
|
||||
/obj/item/stack/material/phoron = 100,
|
||||
/obj/item/stack/material/plasteel = 50,
|
||||
|
||||
Reference in New Issue
Block a user