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

ThingSetMaker_CountEnabledAmmoOnly #3373

Merged
merged 6 commits into from
Sep 17, 2024

Conversation

CMDR-Bill-Doors
Copy link
Contributor

@CMDR-Bill-Doors CMDR-Bill-Doors commented Aug 25, 2024

Additions

A subclass of thingsetmaker_count and ThingSetMaker_StackCount which will validate if spawn thing is ammo and is enabled.
Variables:
basic, default true, can spawn non-advanced ammo.
advanced, default false, can spawn advanced ammo.

A subclass of thingsetmaker_count that, if spawned thing includes weapon with magazine, will add the weapon's ammo into spawned things.
Variables:
magCount, default intrange 2~5, the amount of ammo that will spawn with it.
random, default false, whether to spawn a random kind of ammo within ammoset, or the first kind of ammo in ammoset.
canGenerateAdvanced, default false, if random, if advanced ammo are included.
Same, but for Thingsetmaker_MarketValue

A patch that makes vanilla quest reward give ammo too if reward included a gun

Example:

<thingSetMaker Class="CombatExtended.ThingSetMaker_StackCountEnabledAmmoOnly">
	<basic>false</basic>
	<advanced>true</advanced>
	<fixedParams>
		<filter>
			<categories>
				<li>AmmoHighCaliber</li>
				<li>AmmoGrenades</li>
			</categories>
		</filter>
		<countRange>10~20</countRange>
	</fixedParams>
</thingSetMaker>

Reasoning

We might find this useful if we want to add ammo into something's loot list.

Alternatives

Spawn player with ammo that they don't need.

Testing

Check tests you have performed:

  • Compiles without warnings
  • Game runs without errors
  • Playtested a colony (tried and works perfectly for ancient urban ruins)

@CMDR-Bill-Doors CMDR-Bill-Doors requested review from a team as code owners August 25, 2024 19:52
Copy link

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-10549678860.zip

@github-actions github-actions bot added the Download in Comments This PR has a zipfile download available. label Aug 25, 2024
Copy link

github-actions bot commented Sep 4, 2024

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-10694796339.zip

perkinslr
perkinslr previously approved these changes Sep 9, 2024
Copy link

github-actions bot commented Sep 9, 2024

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-10767710036.zip

Copy link

github-actions bot commented Sep 9, 2024

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-10767760937.zip

Copy link

github-actions bot commented Sep 9, 2024

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-10768337108.zip

Copy link
Contributor

@N7Huntsman N7Huntsman left a comment

Choose a reason for hiding this comment

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

Works in my testing.

@N7Huntsman N7Huntsman merged commit 8330d1a into Development Sep 17, 2024
3 checks passed
@N7Huntsman N7Huntsman deleted the ThingSetMaker_CountEnabledAmmoOnly branch September 17, 2024 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Download in Comments This PR has a zipfile download available.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants