smcameron
smcameron
So I see one problem (maybe two) with making this too_close_to_other_planet_or_sun function lua-callable. The first is just an implementation detail, it needs to call pthread_mutex_lock(&universe_mutex) before calling too_close_to_other_planet_or_sun and pthread_mutex_unlock(&universe_mutex)...
Ah, I see you are using too_close_to_other_planet_or_sun for a similar purpose -- for spreading planets around somewhat randomly.
Ok, I played through the mission. Pretty cool! Took me awhile to find the "restrain prince" button, ha. I think there were supposed to be some ships trying to attack...
> Hum I thought mutex were only needed for adding/editing stuff, sorry. It's to avoid have another thread changing go[] while your thread is scanning it.
I committed both of these (with the small change to use the mutex locking).
> I have a TODO for adding some noise to make it clearer that someone is crashing stuff. Not sure if there is an API yet for that. The warp...
Applied as df3e467de85c25c7b73b6b09ac08c2c9153d7d0e
@MCMic Some minor feedback on the Royal Wedding mission: We played it a couple times at HackRVA last night. Neither attempt was successful, both times we got destroyed by the...
> I did not test this but it should play sounds when the engine explodes and when the prince panic. This worked, at least the engine exploding part, I don't...
@MCMic Was looking at the royal wedding script, and I found this, which may be a bit too aggressive: https://github.com/smcameron/space-nerds-in-space/blob/master/share/snis/luascripts/MISSIONS/ROYAL-WEDDING.LUA#L254 ``` number_of_rebels = 4; set_variable("MISSILE_FIRE_CHANCE", "5"); ``` This variable, MISSILE_FIRE_CHANCE,...