On 2022-02-15 23:15, Kevin Zheng wrote:
On 2/15/22 8:11 PM, Preston Crow wrote:
I would like to have duplicators that self-destruct after use.  I would use the 'hp' field, but it's already set to one in the archetype, so I'm thinking of using the value.  I have it working on my server:

             }
*            if ( op->value ) {**
**                --op->value;**
**                if ( !op->value ) {**
**                    object_remove( op );**
**object_free_drop_inventory(op);**
**                    return;**
**                }**
**            }*
             if ( count <= 1 ) break;
             --count;

That works.  I'm using it in apartments to remove goldfloors and leave everything pristine, especially where it's buildable after things trigger.  Is there any issue with my pushing this change? Would a different field make more sense for this (perhaps 'sp')?

A couple other fields that come to mind are 'food' and 'generator_limit'. As long as it's not being used for something else in the type you're working with though, it should be fine.

Using 'food' makes a lot more sense.  I'll switch to that.


Just double checking because I don't have diff context, this is only being applied in the type code for duplicators, right?

Exactly.
_______________________________________________
crossfire mailing list
crossfire@metalforge.org
http://mailman.metalforge.org/mailman/listinfo/crossfire
IRC: http://crossfire.real-time.com/irc/index.html
Discord: http://crossfire.real-time.com/discord/index.html
Project Site: https://sourceforge.net/projects/crossfire/
Wiki: http://wiki.cross-fire.org/
Website: http://crossfire.real-time.com

Reply via email to