Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions code/__defines/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -402,3 +402,9 @@
#define MM_ATTACK_RESULT_NONE 0
#define MM_ATTACK_RESULT_DEFLECTED BITFLAG(0)
#define MM_ATTACK_RESULT_BLOCKED BITFLAG(1)

// Effectively a speed modifier for how fast pollen is produced by flowering plants. Pollen per second.
// In theory, one pollen every 5 seconds (at time of writing)
#define POLLEN_PER_SECOND 0.2
#define POLLEN_PRODUCTION_MULT (POLLEN_PER_SECOND * (SSplants.wait / 10))
#define MAX_POLLEN_PER_FLOWER 10
5 changes: 1 addition & 4 deletions code/game/objects/items/devices/chameleonproj.dm
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
density = FALSE
anchored = TRUE
is_spawnable_type = FALSE
movement_handlers = list(/datum/movement_handler/delay/chameleon_projector)
movement_handlers = list(/datum/movement_handler/delay/chameleon_projector = list(2.5 SECONDS))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
movement_handlers = list(/datum/movement_handler/delay/chameleon_projector = list(2.5 SECONDS))
movement_handlers = list(/datum/movement_handler/delay = list(2.5 SECONDS))

subtype no longer needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Subtype needed for MayMove/DoMove.

var/obj/item/chameleon/master = null

/obj/effect/dummy/chameleon/Initialize(mapload, var/obj/item/chameleon/projector)
Expand Down Expand Up @@ -152,9 +152,6 @@
if(!my_turf.get_supporting_platform() && !(locate(/obj/structure/lattice) in loc))
disrupted()

/datum/movement_handler/delay/chameleon_projector
delay = 2.5 SECONDS

/datum/movement_handler/delay/chameleon_projector/MayMove(mob/mover, is_external)
return host.loc?.has_gravity() ? ..() : MOVEMENT_STOP

Expand Down
37 changes: 34 additions & 3 deletions code/game/objects/structures/flora/plant.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,20 @@
var/dead = FALSE
var/sampled = FALSE
var/datum/seed/plant
var/harvestable
var/harvestable = 0 // Note that this is a counter, not a bool.
var/pollen = 0

/obj/structure/flora/plant/large
opacity = TRUE
density = TRUE

/* Notes for future work moving logic off hydrotrays onto plants themselves:
/obj/structure/flora/plant/Process()
if(plant?.produces_pollen <= 0)
return PROCESS_KILL
if(pollen < MAX_POLLEN_PER_FLOWER)
pollen += plant.produces_pollen * POLLEN_PRODUCTION_MULT

/* Notes for future work moving logic off hydrotrays onto plants themselves:
// check our immediate environment
// ask our environment for available reagents
// process the reagents
Expand Down Expand Up @@ -61,9 +67,13 @@
var/potency = plant.get_trait(TRAIT_POTENCY)
set_light(l_range = max(1, round(potency/10)), l_power = clamp(round(potency/30), 0, 1), l_color = plant.get_trait(TRAIT_BIOLUM_COLOUR))
update_icon()
return ..()
. = ..()
if(plant?.produces_pollen && !is_processing)
START_PROCESSING(SSplants, src)

/obj/structure/flora/plant/Destroy()
if(is_processing)
STOP_PROCESSING(SSplants, src)
plant = null
. = ..()

Expand Down Expand Up @@ -147,3 +157,24 @@
/obj/structure/flora/plant/random_mushroom/Initialize()
plant = pick(get_mushroom_variants())
return ..()

/obj/structure/flora/plant/random_flower
name = "flower"
color = COLOR_PINK
icon_state = "flower5"
is_spawnable_type = TRUE

// Only contains roundstart plants, this is meant to be a mapping helper.
/obj/structure/flora/plant/random_flower/proc/get_flower_variants()
var/static/list/flower_variants
if(isnull(flower_variants))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noting that this will only ever contain roundstart plants, but that's probably desirable even if not explicitly made clear in the code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'll add a comment to make it clear.

flower_variants = list()
for(var/plant in SSplants.seeds)
var/datum/seed/seed = SSplants.seeds[plant]
if(!isnull(seed?.name) && seed.produces_pollen)
flower_variants |= seed.name
return flower_variants

/obj/structure/flora/plant/random_flower/Initialize()
plant = pick(get_flower_variants())
return ..()
1 change: 1 addition & 0 deletions code/game/objects/structures/flora/stump.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/obj/structure/flora/stump
name = "stump"
hitsound = 'sound/effects/hit_wood.ogg'
storage = /datum/storage/dead_tree
var/log_type = /obj/item/stack/material/log

/obj/structure/flora/stump/get_material_health_modifier()
Expand Down
5 changes: 5 additions & 0 deletions code/game/objects/structures/flora/tree.dm
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ var/global/list/christmas_trees = list()
icon_state = "tree_1"
protects_against_weather = FALSE
stump_type = /obj/structure/flora/stump/tree/dead
storage = /datum/storage/dead_tree

/datum/storage/dead_tree
max_w_class = ITEM_SIZE_NORMAL
max_storage_space = ITEM_SIZE_SMALL * 5

/obj/structure/flora/tree/dead/random/init_appearance()
icon_state = "tree_[rand(1, 6)]"
Expand Down
5 changes: 3 additions & 2 deletions code/modules/hydroponics/trays/tray_process.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@
mutate((rand(100) < 15) ? 2 : 1)
mutation_level = 0

if(pollen < 10)
pollen += seed?.produces_pollen
if(pollen < MAX_POLLEN_PER_FLOWER)
pollen += seed?.produces_pollen * POLLEN_PRODUCTION_MULT
to_world("\ref[src] has pollen [pollen] ([seed?.produces_pollen] * [POLLEN_PRODUCTION_MULT])")

// Maintain tray nutrient and water levels.
if(seed.get_trait(TRAIT_REQUIRES_NUTRIENTS) && seed.get_trait(TRAIT_NUTRIENT_CONSUMPTION) > 0 && nutrilevel > 0 && prob(25))
Expand Down
3 changes: 3 additions & 0 deletions code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2005,3 +2005,6 @@ default behaviour is:

/mob/living/is_cloaked()
return has_mob_modifier(/decl/mob_modifier/cloaked)

/mob/living/proc/is_playing_dead()
return stat || current_posture?.prone || (status_flags & FAKEDEATH)
1 change: 0 additions & 1 deletion code/modules/mob/mob_automove.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
/mob/failed_automove()
..()
stop_automove()
_automove_target = null
return FALSE

/mob/start_automove(target, movement_type, datum/automove_metadata/metadata)
Expand Down
3 changes: 2 additions & 1 deletion code/modules/mob/skills/skillset.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ var/global/list/all_skill_verbs
QDEL_NULL(NM) //Clean all nano_modules for simplicity.
QDEL_NULL(mob.skillset.NM)
QDEL_NULL_LIST(nm_viewing)
QDEL_NULL_LIST(mob.skillset.nm_viewing)
if(mob.skillset)
QDEL_NULL_LIST(mob.skillset.nm_viewing)
on_levels_change()

//Called when a player is added as an antag and the antag datum processes the skillset.
Expand Down
2 changes: 1 addition & 1 deletion maps/ministation/ministation-1.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -8744,7 +8744,7 @@
/turf/floor/tiled,
/area/ministation/hall/e2)
"Oo" = (
/obj/machinery/beehive,
/obj/structure/apiary/mapped,
/turf/floor/fake_grass,
/area/ministation/hydro)
"Op" = (
Expand Down
10 changes: 8 additions & 2 deletions mods/content/beekeeping/_beekeeping.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
#define FRAME_RESERVE_COST 30
#define SWARM_AGITATION_PER_FRAME 25
#define FRAME_MATERIAL_COST 20
#define SWARM_GROWTH_COST 10
#define FRAME_FILL_MATERIAL_COST 5
#define HIVE_REPAIR_MATERIAL_COST 5

/decl/modpack/beekeeping
name = "Beekeeping Content"
name = "Beekeeping and Insects Content"

/datum/storage/hopper/industrial/centrifuge/New()
..()
can_hold |= /obj/item/hive_frame

11 changes: 9 additions & 2 deletions mods/content/beekeeping/_beekeeping.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@
// BEGIN_INCLUDE
#include "_beekeeping.dm"
#include "closets.dm"
#include "hive_frame.dm"
#include "items.dm"
#include "materials.dm"
#include "recipes.dm"
#include "trading.dm"
#include "hives\_hive.dm"
#include "hives\hive_extension.dm"
#include "hives\hive_flora.dm"
#include "hives\hive_frame.dm"
#include "hives\hive_queen.dm"
#include "hives\hive_structure.dm"
#include "hives\hive_swarm.dm"
#include "hives\insect_species\_insects.dm"
#include "hives\insect_species\insects_pollinators.dm"
// END_INCLUDE
#endif
6 changes: 3 additions & 3 deletions mods/content/beekeeping/closets.dm
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/obj/structure/closet/crate/hydroponics/beekeeping
name = "beekeeping crate"
desc = "All you need to set up your own beehive."
desc = "All you need to set up your own beehive, except the beehive."

/obj/structure/closet/crate/hydroponics/beekeeping/Initialize()
. = ..()
new /obj/item/beehive_assembly(src)
new /obj/item/bee_smoker(src)
new /obj/item/stack/material/plank/mapped/wood/ten
new /obj/item/smoker(src)
new /obj/item/hive_frame/crafted(src)
new /obj/item/hive_frame/crafted(src)
new /obj/item/hive_frame/crafted(src)
Expand Down
55 changes: 0 additions & 55 deletions mods/content/beekeeping/hive_frame.dm

This file was deleted.

Loading
Loading