Skip to content
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

Any NPC at camp can start missions etc, even by radio contact. #29249

Merged
merged 7 commits into from Apr 12, 2019

Conversation

Projects
None yet
4 participants
@davidpwbrown
Copy link
Contributor

commented Apr 3, 2019

Summary

SUMMARY: Features "Any NPC at camp can start missions etc, even by radio contact."

Purpose of change

To allow any NPC "assigned" to a camp, or any NPC you can talk to, who happens to currently be at a camp, to administer it for you, you don't need to examine the bulletin board.

Describe the solution

When an NPC is assigned to guard a position, and that position is inside a camp, that NPC is then "assigned" to that camp.
When you select NPCs for a mission, all visible NPCs will be chooseable, in addition to those which are assigned to the camp, even if they are not currently visible ( maybe patrolling ? maybe sleeping? )

Also, you can talk to any NPC in a camp, and they will give you the mission list for that camp, and you can select missions that way.

When you contact an NPC by radio, if they are currently assigned to a camp, you can then administer the camp through them remotely.

Describe alternatives you've considered

Was going to add a radio tower and radio range , but I'll split that off into a seperate PR

Additional context

N/A

@adamkad1

This comment has been minimized.

Copy link

commented Apr 3, 2019

sweet

@kevingranade

This comment has been minimized.

Copy link
Member

commented Apr 3, 2019

This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/yelling-commands-and-using-military-hand-signals/19487/7

@davidpwbrown davidpwbrown changed the title Any NPC at camp can start missions etc, even by radio contact. [WIP]Any NPC at camp can start missions etc, even by radio contact. Apr 3, 2019

@davidpwbrown

This comment has been minimized.

Copy link
Contributor Author

commented Apr 3, 2019

Needs some refinement, most camp missions will behave strangely when not loaded in reality bubble. needs camp structure to accomodate that first. I Was a bit naieve in this implementation

davidpwbrown added some commits Apr 3, 2019

NPCs at camp are "assigned", assigned NPCs can administer camp via ra…
…dio or talk

stopped local NPCS from being chosen for remote camp activities

disallow missions over radio

test commit

remote crafting

passing omt_tri down the chain for tinymap

@davidpwbrown davidpwbrown force-pushed the davidpwbrown:radio_range_tower branch from b1e9fd3 to dd841e3 Apr 7, 2019

@davidpwbrown davidpwbrown changed the title [WIP]Any NPC at camp can start missions etc, even by radio contact. Any NPC at camp can start missions etc, even by radio contact. Apr 7, 2019

@davidpwbrown

This comment has been minimized.

Copy link
Contributor Author

commented Apr 7, 2019

So I think it works now, tested a lot of things, seems to be ok.
( also fixed a bug with camp foraging missions not returning anything due to a typo ) I had to dip into the crafting/tinymap/inventory code to make camps able to fullfil crafting recipes whilst player is not present, this was scary, I probably hacked it badly.

For the moment some caveats :

  1. The camp mission to reset the sort points or distribute food or menial labor ( sorting loot) has been disabled whilst over the radio. ( I dont know how to mess with the zone manager via the tinymap that loads it remotely )
  2. An NPC out on a mission cant be contacted. so you need to keep one NPC hanging around to radio to, to tell him to bring the other worker home. if you send all your workers out on missions, you can't recall them until you visit the camp again physicall.
  3. The camp now gets it's components for it's recipes from it's sorting zones, not from the player inventory, even if the player is local. This means you can dump loads of loot into your camp sorting zones, walk around the corner, talk to an NPC and the camp still knows what is in it's "inventory".

With a bit of work, the crafting inventory code is halfway to being non-player-centric now, can be passed a tinymap and/or a different position to search from.

davidpwbrown added some commits Apr 8, 2019

@davidpwbrown davidpwbrown changed the title Any NPC at camp can start missions etc, even by radio contact. [WIP]Any NPC at camp can start missions etc, even by radio contact. Apr 8, 2019

@davidpwbrown davidpwbrown changed the title [WIP]Any NPC at camp can start missions etc, even by radio contact. Any NPC at camp can start missions etc, even by radio contact. Apr 8, 2019

@kevingranade

This comment has been minimized.

Copy link
Member

commented Apr 11, 2019

I can contact a NPC without a radio via the # menu, is that expected?

@davidpwbrown

This comment has been minimized.

Copy link
Contributor Author

commented Apr 11, 2019

I can contact a NPC without a radio via the # menu, is that expected?

If they are within interaction range, yes. It should say "within interaction range" in green under their entry.
If you are far away and it's allowing it, have you debug teleported? for some reason, I found that when debug teleporting, the NPCs did not update somehow, and did not report their distance correctly.

@kevingranade

This comment has been minimized.

Copy link
Member

commented Apr 11, 2019

Ok it was probably something to do with debug teleport, I'll repeat with driving off in a car or something.

@kevingranade kevingranade merged commit 57b7324 into CleverRaven:master Apr 12, 2019

2 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
gorgon-ghprb Build finished.
Details
}
consume_components_for_camp_mission( omt_tri, making, fortify_om.size() * 2 - 2, by_radio );
}
comp->companion_mission_role_id = bldg_exp;

This comment has been minimized.

Copy link
@ZhilkinSerg

ZhilkinSerg Apr 21, 2019

Contributor

I guess whole block below should go to under if( comp != nullptr ) check. Right now it could crash if comp == nullptr and it would try to assign companion_mission_role_id or fill-in companion_mission_points.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.