-
Notifications
You must be signed in to change notification settings - Fork 246
Reworks bees and beehives. #4266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
53feb86 to
4e88808
Compare
4e88808 to
cebc8fe
Compare
cebc8fe to
a7f74b7
Compare
a7f74b7 to
fb81893
Compare
8e1e7f4 to
3a4f6ed
Compare
50ca772 to
81d82ae
Compare
4f36cba to
9bd9647
Compare
0b5fbd2 to
6957289
Compare
33e68b3 to
fed3d77
Compare
|
This is probably as good as it'll get for now. Swarm splitting would be nice to get working but this is a functional replacement for old bee mechanics. |
dca8cf0 to
8fa573b
Compare
8fa573b to
9d18e5a
Compare
| var/sampled = FALSE | ||
| var/datum/seed/plant | ||
| var/harvestable | ||
| var/harvestable = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment explaining that this is the number of harvests rather than a legacy bool (e.g. hasn't been changed to use FALSE instead of 0) would be nice but isnt mandatory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add a comment.
| /obj/structure/flora/plant/Process() | ||
| if(plant?.produces_pollen <= 0) | ||
| return PROCESS_KILL | ||
| if(pollen < 10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a huge fan of bare constants like this, would prefer making it a member var or a local const like var/const/max_pollen = 10 at the top of the proc. sometimes code like this gets copied around (e.g. someone wants to copy pollen behavior to their new custom type) and the original constant gets misused/misinterpreted. not mandatory though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add a define alongside the other pollen constants.
|
|
||
| /obj/structure/flora/plant/random_flower/proc/get_flower_variants() | ||
| var/static/list/flower_variants | ||
| if(isnull(flower_variants)) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
| skill_link = "<td>[skill_link]</td>" | ||
|
|
||
| if(!user.skillset.skills_transferable) | ||
| if(!user.skillset?.skills_transferable) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no longer necessary because of #5150
| @@ -0,0 +1,358 @@ | |||
| /obj/effect/insect_swarm | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a little curious why this is an effect and not a simple_animal. too much boilerplate you'd have to work around, i assume?parrots already do a similar species/type thing, so i figured it wouldn't be impossible, and mobs-as-effects has historically been a pain (see spiderlings for an example)
edit: oh it might be the merging? mob gc churn would be more annoying than doing the same with effects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The merging and also general health and processing behavior - I don't want you to be able to beat up a swarm with a baseball bat or inject it with a syringe like you can with mobs in general. That said, it would be nice to be able to put someone in control of a swarm of bees, and maybe swarm intensity could be handled via health or something, but... yeah.
| for(var/mob/living/victim in view(7, src)) | ||
| if(!victim.simulated || victim.stat || victim.current_posture?.prone) | ||
| continue | ||
| if(victim.isSynthetic()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another one for the list of 'isSynthetic uses to remove someday'. though i might as well ask: what is this meant to represent? is it "swarms won't target someone that isn't alive (because they don't exhale, aren't warm, aren't made of meat materials-wise, etc)" or "swarms can't sting someone if their stinger isn't strong enough to break the skin (e.g. if the skin is made of metal, stone, whatever)"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both, I was thinking a bee swarm wouldn't identify a machine as alive and can't sting it. The sting proc does check can_inject so this could probably be relaxed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is removed, not sure why it's not showing up as out of date.
| /obj/effect/insect_swarm/stop_automove() | ||
| SHOULD_CALL_PARENT(FALSE) | ||
| move_target = null | ||
| //. = ..() // TODO work out why they're not automoving |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noting this todo here, is it still the case?
| /obj/effect/insect_swarm/start_automove(target, movement_type, datum/automove_metadata/metadata) | ||
| SHOULD_CALL_PARENT(FALSE) | ||
| move_target = target | ||
| //. = ..() // TODO work out why they're not automoving |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto, is this TODO still current? was under the impression the PR has been ready to review for a bit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this is fixed, I just missed those. That actually explains why the automove isn't very snappy.
| // TODO: update icon (twitching on ground?) | ||
| // TODO: lower agitation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these work for a future PR or for this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed this one, I'll hack out some sleepy states.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| icon_state = "beepack" | ||
| material = /decl/material/solid/organic/plastic | ||
| var/full = 1 | ||
| // TODO: consume reagents or charges? Unnecessary complexity? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are many options for beehive smoker fuel including cotton, bailing twine, pine needles, and wood chips. For best results, use fuel that produces cool, white smoke and avoid harsh smoke that can irritate bees.
seems pretty simple irl, just any flammable waste matter. i think the only thing that wouldnt work is lamp oil. actually it seems a useful thing irl for this is cardboard pellets/scraps which would work perfectly on a space map, probably?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I could use that general proc for burning materials and returning waste products, and make the smoker a container that can hold a stack. My concern is mostly that it will mean anyone who wants to do beekeeping now needs to source smoker fuel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, but 'cardboard cubes/pellets/etc comes in the beekeeping kit in cargo' would be an okay solution to that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a poke but I think I want to call this out of scope. We don't have a pellets stack and I don't really want to add one, add recipes, etc. As well as redoing the smoker to handle refuelling and such.
9d18e5a to
2cfb5af
Compare
2cfb5af to
0df584f
Compare
|
b17230d to
d6027b2
Compare
| default_pixel_z = 8 | ||
| layer = ABOVE_HUMAN_LAYER | ||
| pass_flags = PASS_FLAG_TABLE | ||
| movement_handlers = list(/datum/movement_handler/delay/insect_swarm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/datum/movement_handler/delay/New(var/host, var/delay)
..()
src.delay = max(1, delay)it's gonna get its delay set wrong bc of this inheritance, maybe /delay needs an isnull to avoid setting it if we pass null. that or just do list(/datum/movement_handler/delay = 1 SECOND)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did do the latter already.
| SHOULD_CALL_PARENT(FALSE) | ||
| move_target = null | ||
| . = ..() | ||
|
|
||
| /obj/effect/insect_swarm/can_do_automated_move(variant_move_delay) | ||
| return !is_smoked() | ||
|
|
||
| /obj/effect/insect_swarm/start_automove(target, movement_type, datum/automove_metadata/metadata) | ||
| SHOULD_CALL_PARENT(FALSE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| SHOULD_CALL_PARENT(FALSE) | |
| move_target = null | |
| . = ..() | |
| /obj/effect/insect_swarm/can_do_automated_move(variant_move_delay) | |
| return !is_smoked() | |
| /obj/effect/insect_swarm/start_automove(target, movement_type, datum/automove_metadata/metadata) | |
| SHOULD_CALL_PARENT(FALSE) | |
| move_target = null | |
| . = ..() | |
| /obj/effect/insect_swarm/can_do_automated_move(variant_move_delay) | |
| return !is_smoked() | |
| /obj/effect/insect_swarm/start_automove(target, movement_type, datum/automove_metadata/metadata) |
| 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)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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
There was a problem hiding this comment.
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.
| default_pixel_z = 8 | ||
| layer = ABOVE_HUMAN_LAYER | ||
| pass_flags = PASS_FLAG_TABLE | ||
| movement_handlers = list(/datum/movement_handler/delay/insect_swarm = list(1 SECOND)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| movement_handlers = list(/datum/movement_handler/delay/insect_swarm = list(1 SECOND)) | |
| movement_handlers = list(/datum/movement_handler/delay = list(1 SECOND)) |
subtype no longer necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Subtype is needed for DoMove.
d6027b2 to
45934d9
Compare
45934d9 to
5fe0242
Compare
Description of changes
/obj/structure/apiary, which is crafted directly from planks rather than using a bespoke parts item./datum/extension/insect_hiveand/decl/insect_speciesto allow for nests to go on any structure, and contain a variety of insects with a variety of products.TODO
Implement wasps venom and wasp stinging.Ants and silkworms can come in another PR, this one needs to get finished.
Why and what will this PR improve
Generalizes beekeeping in a way that allows for an expansion into other species (ants and wasps) and allows hives to be placed on arbitrary structures like dead trees or old closets.
Authorship
Myself.
Changelog
🆑
add: Beekeeping has been rewritten almost entirely, please refer to the Beewrite PR on the GitHub repo for details.
/:cl: