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

Drop Crate on Death #1371

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

FS-21
Copy link
Contributor

@FS-21 FS-21 commented Aug 31, 2024

  • Ìf DropCrate is declared then the specified crate will be spawned when the object is destroyed.

In rulesmd.ini:

[SOMETECHNO]  ; TechnoType
DropCrate=    ; Powerup crate type enum (money|unit|healbase|cloak|explosion|napalm|squad|reveal|armor|speed|firepower|icbm|invulnerability|veteran|ionstorm|gas|tiberium|pod)

Also, a new map action (see the documentation) allows the overwrite of this behaviour (disbale, enable or set a new crate) if the trigger is attached to technos.

Tested in online games so this doesn't desync.

- Ìf `DropCrate` is declared then the specified crate will be spawned when the object is destroyed.

In `rulesmd.ini`:
```ini
[SOMETECHNO]  ; TechnoType
DropCrate=    ; Powerup crate type enum (money|unit|healbase|cloak|explosion|napalm|squad|reveal|armor|speed|firepower|icbm|invulnerability|veteran|ionstorm|gas|tiberium|pod)
```

Also, a new map action (see the documentation) allows the overwrite of this behaviour (or set as new value!) if the trigger is attached to technos.
Copy link

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

Copy link
Member

@MortonPL MortonPL left a comment

Choose a reason for hiding this comment

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

Won't collecting this new crate spawn a new one according to random crate logic?

![image](_static/images/dropcrate-01.gif)
*Drop crates on infantry and vehicles example in [C&C: Reloaded](https://www.moddb.com/mods/cncreloaded)*

- Ìf `DropCrate` is declared then the specified crate will be spawned when the object is destroyed.
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
- Ìf `DropCrate` is declared then the specified crate will be spawned when the object is destroyed.
- If `DropCrate` is declared then the specified crate will be spawned when the object is destroyed.

Comment on lines +473 to +479
int currentRange = 0;
bool placed = false;

do
{
int x = -currentRange;
int y = -currentRange;
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
int currentRange = 0;
bool placed = false;
do
{
int x = -currentRange;
int y = -currentRange;
short currentRange = 0;
bool placed = false;
do
{
short x = -currentRange;
short y = -currentRange;

This should fix the warnings about implicit casting.

@MortonPL MortonPL self-assigned this Sep 24, 2024
@MortonPL MortonPL added Feature / Enhancement Anything new not present in vanilla/Ares Tested labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature / Enhancement Anything new not present in vanilla/Ares Tested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants