This (at least the Pillage case, which I investigated) is more serious than just missing lua signal. The usual way in the client UI to request Pillage results just in a change of unit's *activity*, skipping all *actions* related stuff. If you specifically select "Go to and ... Pillage" (action), also the lua script runs.
The fix exposes https://redmine.freeciv.org/issues/460, leading to a crash there. Need to fix it before this one.
- Fix crash when the pillage target is not preset
I didn't plan to report the following because I thought it was caused by a bad use of the scripts, but just in case it could be related to this bug...
When I use a LUA script, triggered by a finished action signal, and the script kills the actor or forces him to disband (I tested different action triggers and different ways to kill the actor), then if the actor unit is being transported, there is a crash with the error:
in utype_can_do_action() [unittype.c::449]: assertion '(signed int)(utype_index(putype)) >= 0 && (signed int)(utype_index(putype)) < (signed int) sizeof((unit_can_act_cacheact_id).vec) * 8' failed.
The script:
function action_finished_callback(action, success, actor, target) if action:rule_name() == "Heal Unit" then if success then -- FIXME: this crashes when healer is being transported actor:kill("used",Nil) end end end
Reply To bard
I didn't plan to report the following because I thought it was caused by a bad use of the scripts, but just in case it could be related to this bug... When I use a LUA script, triggered by a finished action signal, and the script kills the actor or forces him to disband (I tested different action triggers and different ways to kill the actor), then if the actor unit is being transported, there is a crash with the error: in utype_can_do_action() [unittype.c::449]: assertion '(signed int)(utype_index(putype)) >= 0 && (signed int)(utype_index(putype)) < (signed int) sizeof((unit_can_act_cacheact_id).vec) * 8' failed. The script: {{{ function action_finished_callback(action, success, actor, target) if action:rule_name() == "Heal Unit" then if success then -- FIXME: this crashes when healer is being transported actor:kill("used",Nil) end end end }}}
I could not reproduce this. Please open a new ticket if you still can reproduce it yourself.
Reply To cazfi
I could not reproduce this. Please open a new ticket if you still can reproduce it yourself.
Ok, I'll try to upload a savegame (+ruleset) to a new ticket.
There are no LUA signals in 3.1 for the actions: Pillage, Fortify, and Convert Unit.
I don't know if this is intended, or a bug. I can't compile and test the trunk right now to see if they work there.
I mean that this LUA script will never be triggered: