Skip to content
2 changes: 2 additions & 0 deletions code/__DEFINES/materials.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#define MATERIAL_WOOD "wood"
#define MATERIAL_VOXALLOY "voxalloy"
#define MATERIAL_CARPET "carpet"
#define MATERIAL_WAX "wax"
#define MATERIAL_BIOMATTER "biomatter"
#define MATERIAL_COMPRESSED "compressed matter"

Expand Down Expand Up @@ -56,6 +57,7 @@
MATERIAL_WOOD,\
MATERIAL_VOXALLOY,\
MATERIAL_CARPET,\
MATERIAL_WAX,\
MATERIAL_BIOMATTER,\
MATERIAL_COMPRESSED)

Expand Down
2 changes: 1 addition & 1 deletion code/datums/autolathe/biomatter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/datum/design/bioprinter/candles
name = "Box of Candles"
build_path = /obj/item/storage/fancy/candle_box
materials = list(MATERIAL_BIOMATTER = 15, MATERIAL_CARDBOARD = 1)
materials = list()


//[NUTRIMENTS]
Expand Down
2 changes: 1 addition & 1 deletion code/datums/craft/recipes/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@

/datum/craft_recipe/beehive_frame
name = "beehive frame"
result = /obj/item/honey_frame
result = /obj/item/reagent_containers/honey_frame
steps = list(
list(CRAFT_MATERIAL, 1, MATERIAL_WOOD)
)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/autolathe/autolathe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
var/have_recycling = TRUE
var/have_design_selector = TRUE

var/list/unsuitable_materials = list(MATERIAL_BIOMATTER)
var/list/unsuitable_materials = list(MATERIAL_BIOMATTER, MATERIAL_WAX)
var/list/suitable_materials //List that limits autolathes to eating mats only in that list.

var/list/selectively_recycled_types = list()
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/crayons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
var/drawtype = input("Choose what you'd like to draw.", "Crayon scribbles") in list("graffiti","rune","letter","arrow")
switch(drawtype)
if("letter")
drawtype = input("Choose the letter.", "Crayon scribbles") in list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z")
drawtype = input("Choose the letter.", "Crayon scribbles") in EN_ALPHABET
to_chat(user, "You start drawing a letter on the [target.name].")
if("graffiti")
to_chat(user, "You start drawing graffiti on the [target.name].")
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/items/trash.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
name = "candle"
icon = 'icons/obj/candle.dmi'
icon_state = "candle4"
matter = list(MATERIAL_WAX = 0.1)

/obj/item/trash/liquidfood
name = "\improper \"LiquidFood\" ration"
Expand Down
33 changes: 21 additions & 12 deletions code/game/objects/items/weapons/candle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,22 @@
item_state = "candle1"
w_class = ITEM_SIZE_TINY
light_color = COLOR_LIGHTING_ORANGE_DARK
var/wax = 2000
matter = list(MATERIAL_WAX = 1)
var/lit_sanity_damage = -0.5
var/drips = 0

/obj/item/flame/candle/New()
wax = rand(800, 1000) // Enough for 27-33 minutes. 30 minutes on average.
matter[MATERIAL_WAX] = rand(80, 100)/100 // Enough for 27-33 minutes. 30 minutes on average.
..()

/obj/item/flame/candle/get_matter()
. = ..()

/obj/item/flame/candle/update_icon()
var/i
if(wax > 800)
if(matter[MATERIAL_WAX] > 0.8)
i = 1
else if(wax > 600)
else if(matter[MATERIAL_WAX] > 0.6)
i = 2
else i = 3
icon_state = "candle[i][lit ? "_lit" : ""]"
Expand All @@ -39,6 +43,8 @@
var/obj/item/flame/candle/C = I
if(C.lit)
light()
else if(istype(I, /obj/item/device/assembly/igniter))
light(SPAN_NOTICE("\The [user] ignites the [name]."))


/obj/item/flame/candle/proc/light(var/flavor_text = SPAN_NOTICE("\The [usr] lights the [name]."))
Expand All @@ -51,16 +57,19 @@
/obj/item/flame/candle/Process()
if(!lit)
return
wax--
if(!wax)
new/obj/item/trash/candle(src.loc)
if(ismob(loc))
src.dropped(loc)
qdel(src)
update_icon()
if(drips == 9)
matter[MATERIAL_WAX] = max(0, matter[MATERIAL_WAX] - 0.01)
if(!matter[MATERIAL_WAX])
new/obj/item/trash/candle(src.loc)
if(ismob(loc))
src.dropped(loc)
qdel(src)
update_icon()
drips = -1
drips ++
if(istype(loc, /turf)) //start a fire if possible
var/turf/T = loc
T.hotspot_expose(700, 5)
T.hotspot_expose(700, 5) // refactor this during thermal update

/obj/item/flame/candle/attack_self(mob/user as mob)
if(lit)
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/items/weapons/storage/fancy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
slot_flags = SLOT_BELT
storage_slots = 5
item_obj = /obj/item/flame/candle
matter = list(MATERIAL_CARDBOARD = 1)


/obj/item/storage/fancy/candle_box/populate_contents()
Expand Down
105 changes: 61 additions & 44 deletions code/modules/hydroponics/beekeeping/beehive.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
density = TRUE
anchored = TRUE

var/closed = 0
var/closed = FALSE
var/bee_count = 0 // Percent
var/smoked = 0 // Timer
var/smoked = null // Timer
var/honeycombs = 0 // Percent
var/frames = 0
var/maxFrames = 5
Expand Down Expand Up @@ -50,18 +50,18 @@
to_chat(user, SPAN_NOTICE("You need to open \the [src] with a crowbar before smoking the bees."))
return
user.visible_message(SPAN_NOTICE("\The [user] smokes the bees in \the [src]."), SPAN_NOTICE("You smoke the bees in \the [src]."))
smoked = 30
smoked = addtimer(CALLBACK(src, PROC_REF(desmoke)), 1 MINUTE, TIMER_STOPPABLE)
update_icon()
return
else if(istype(I, /obj/item/honey_frame))
else if(istype(I, /obj/item/reagent_containers/honey_frame))
if(closed)
to_chat(user, SPAN_NOTICE("You need to open \the [src] with a crowbar before inserting \the [I]."))
return
if(frames >= maxFrames)
to_chat(user, SPAN_NOTICE("There is no place for an another frame."))
return
var/obj/item/honey_frame/H = I
if(H.honey)
var/obj/item/reagent_containers/honey_frame/H = I
if(H.reagents.total_volume)
to_chat(user, SPAN_NOTICE("\The [I] is full with beeswax and honey, empty it in the extractor first."))
return
++frames
Expand Down Expand Up @@ -116,20 +116,23 @@
return
user.visible_message(SPAN_NOTICE("\The [user] starts taking the honeycombs out of \the [src]."), SPAN_NOTICE("You start taking the honeycombs out of \the [src]..."))
while(honeycombs >= 100 && do_after(user, 30, src))
new /obj/item/honey_frame/filled(loc)
var/obj/item/reagent_containers/frame = new /obj/item/reagent_containers/honey_frame(loc)
frame.reagents.add_reagent("honey", 20)
honeycombs -= 100
--frames
update_icon()
if(honeycombs < 100)
to_chat(user, SPAN_NOTICE("You take all filled honeycombs out."))
return

/obj/machinery/beehive/proc/desmoke()
deltimer(smoked)
smoked = null

/obj/machinery/beehive/Process()
if(closed && !smoked && bee_count)
pollinate_flowers()
update_icon()
smoked = max(0, smoked - 1)
if(!smoked && bee_count)
if(closed)
pollinate_flowers()
bee_count = min(bee_count * 1.005, 100)
update_icon()

Expand All @@ -152,71 +155,81 @@
icon_state = "centrifuge"
circuit = /obj/item/electronics/circuitboard/honey_extractor

var/processing = 0
var/honey = 0
var/obj/item/reagent_containers/honey_frame/processing
var/datum/reagents/honey

/obj/machinery/honey_extractor/Initialize()
honey = new(500, src) // slightly less than a Bidon

/obj/machinery/honey_extractor/attackby(var/obj/item/I, var/mob/user)
if(default_deconstruction(I, user))
return
if(processing)
to_chat(user, SPAN_NOTICE("\The [src] is currently spinning, wait until it's finished."))
return
else if(istype(I, /obj/item/honey_frame))
var/obj/item/honey_frame/H = I
if(!H.honey)
else if(istype(I, /obj/item/reagent_containers/honey_frame))
if(honey.total_volume >= honey.maximum_volume)
to_chat(user, SPAN_NOTICE("\The [src] is full and \the [src] cannot extract further honey."))
return
var/obj/item/reagent_containers/honey_frame/H = I
if(!H.reagents.total_volume)
to_chat(user, SPAN_NOTICE("\The [H] is empty, put it into a beehive."))
return
user.visible_message(SPAN_NOTICE("\The [user] loads \the [H] into \the [src] and turns it on."), SPAN_NOTICE("You load \the [H] into \the [src] and turn it on."))
processing = H.honey
processing = H
H.forceMove(src)
icon_state = "centrifuge_moving"
qdel(H)
spawn(50)
new /obj/item/honey_frame(loc)
new /obj/item/stack/wax(loc)
honey += processing
processing = 0
icon_state = "centrifuge"
addtimer(CALLBACK(src, PROC_REF(finish)), 50, TIMER_UNIQUE)
else if(istype(I, /obj/item/reagent_containers/glass))
if(!honey)
if(!honey.total_volume)
to_chat(user, SPAN_NOTICE("There is no honey in \the [src]."))
return
var/obj/item/reagent_containers/glass/G = I
var/transferred = min(G.reagents.maximum_volume - G.reagents.total_volume, honey)
G.reagents.add_reagent("honey", transferred)
honey -= transferred
var/transferred = honey.trans_to_holder(G.reagents, honey.total_volume)
user.visible_message(SPAN_NOTICE("\The [user] collects honey from \the [src] into \the [G]."), SPAN_NOTICE("You collect [transferred] units of honey from \the [src] into \the [G]."))
return 1

/obj/machinery/honey_extractor/proc/finish()
playsound(src.loc, 'sound/machines/ping.ogg', 50, 1, -3)
new /obj/item/stack/material/wax(loc)
processing.reagents.trans_to_holder(honey, processing.reagents.total_volume)
processing.forceMove(loc)
processing = null
icon_state = "centrifuge"

/obj/item/bee_smoker
name = "bee smoker"
desc = "A device used to calm down bees before harvesting honey."
icon = 'icons/obj/device.dmi'
icon_state = "battererburnt"
w_class = ITEM_SIZE_SMALL

/obj/item/honey_frame
/obj/item/reagent_containers/honey_frame
name = "beehive frame"
desc = "A frame for the beehive that the bees will fill with honeycombs."
desc = "A frame for the beehive that the bees can fill with honeycombs."
icon = 'icons/obj/beekeeping.dmi'
icon_state = "honeyframe"
w_class = ITEM_SIZE_SMALL
volume = 20 // honey capacity 20
reagent_flags = AMOUNT_VISIBLE // you can see how full it is
filling_states = "15;50;75;100"
matter = list(MATERIAL_WOOD = 1)

var/honey = 0
/obj/item/reagent_containers/honey_frame/update_icon()
cut_overlays()
if(reagents.total_volume)
overlays.Add("honeycomb_[get_filling_state()]")

/obj/item/honey_frame/filled
name = "filled beehive frame"
desc = "A frame for the beehive that the bees have filled with honeycombs."
honey = 20

/obj/item/honey_frame/filled/New()
..()
overlays += "honeycomb"
/obj/item/reagent_containers/honey_frame/get_matter()
. = ..()
. |= list(MATERIAL_WAX = reagents.total_volume/20)

/obj/item/beehive_assembly
name = "beehive assembly"
desc = "Contains everything you need to build a beehive."
icon = 'icons/obj/beekeeping.dmi'
icon_state = "apiary"
matter = list(MATERIAL_WOOD = 10)

/obj/item/beehive_assembly/attack_self(var/mob/user)
to_chat(user, SPAN_NOTICE("You start assembling \the [src]..."))
Expand All @@ -227,15 +240,16 @@
qdel(src)
return

/obj/item/stack/wax
/obj/item/stack/material/wax
name = "wax"
singular_name = "wax piece"
desc = "Soft substance produced by bees. Used to make candles."
icon = 'icons/obj/stack/material.dmi'
icon_state = "sheet-wax"
novariants = FALSE
default_type = MATERIAL_WAX

/obj/item/stack/wax/New()
/obj/item/stack/material/wax/New()
..()
recipes = wax_recipes

Expand All @@ -248,22 +262,25 @@ var/global/list/datum/stack_recipe/wax_recipes = list( \
desc = "Contains a queen bee and some worker bees. Everything you'll need to start a hive!"
icon = 'icons/obj/beekeeping.dmi'
icon_state = "beepack"
var/full = 1
var/full = TRUE
matter = list(MATERIAL_STEEL = 5, MATERIAL_DIAMOND = 0.1, MATERIAL_SILVER = 0.2, MATERIAL_BIOMATTER = 1)

/obj/item/bee_pack/New()
..()
overlays += "beepack-full"

/obj/item/bee_pack/proc/empty()
full = 0
full = FALSE
name = "empty bee pack"
desc = "A stasis pack for moving bees. It's empty."
overlays.Cut()
overlays += "beepack-empty"
matter.Remove(MATERIAL_BIOMATTER)

/obj/item/bee_pack/proc/fill()
full = initial(full)
name = initial(name)
desc = initial(desc)
overlays.Cut()
overlays += "beepack-full"
overlays += "beepack-full"
matter[MATERIAL_BIOMATTER] = 1
24 changes: 24 additions & 0 deletions code/modules/materials/materials.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1097,3 +1097,27 @@ var/list/name_to_material
bio = 0,
rad = 0
)

/material/wax
name = MATERIAL_WAX
flags = MATERIAL_BRITTLE
sheet_singular_name = "piece"
sheet_plural_name = "clump"

// Shards/tables/structures
shard_type = SHARD_STONE_PIECE // Path of debris object.
destruction_desc = "crumbles" // Fancy string for barricades/tables/objects exploding.

icon_colour = "#D9C179" // close enough
stack_origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) // Research level for stacks.

ignition_point = T0C+204 // generic wax flashpoint
melting_point = T0C+64 //generic wax melting point
heat_resistance = 0.5
integrity = 25
conductive = FALSE // Objects with this var add CONDUCTS to flags on spawn.

hardness = 1
weight = 4

stack_type = /obj/item/stack/material/wax
Loading
Loading