Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95a is out! (03/26/21); Blog post: Of Slipstreams and Sensor Ghosts (09/24/21)

Author Topic: Make us able to run scripts in refit screen  (Read 1289 times)

Tecrys

  • Admiral
  • *****
  • Posts: 548
  • repair that space elevator!
    • View Profile
Make us able to run scripts in refit screen
« on: May 04, 2014, 06:56:09 AM »

Hello again!

I would love to be able to make scripts run in the refit screen and make a check if in refit screen. Now that would be very useful for asymmetrical weapons for example.

Xenoargh wrote a script which mirrores a weapon but it only runs while in battle and looks really weird in refit for very asymmetrical weapons:
Spoiler
[close]
Logged
Adopt a mod! (Or parts of it) I'd be happy if Biomancy Genetic Engineering found a new patron or if my little monsters appear in some form or another in someone's mod.
https://fractalsoftworks.com/forum/index.php?topic=7682.0

xenoargh

  • Admiral
  • *****
  • Posts: 4927
  • naively breaking things!
    • View Profile
Re: Make us able to run scripts in refit screen
« Reply #1 on: May 06, 2014, 08:43:00 PM »

We'd also need a boolean for isInRefit() or some-such; a lot of scripts I don't want running, and vice versa.  Would love to be able to kill Decorative weapons I'm using for FX in the Fleet screen context, amongst other things.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Sundog

  • Admiral
  • *****
  • Posts: 1314
    • View Profile
Re: Make us able to run scripts in refit screen
« Reply #2 on: May 06, 2014, 08:53:13 PM »

Agreed. Rather than isInRefit, though, I'd propose something similar to...

Code: java
public interface CombatEngineAPI {
    public enum BattleType { Simulation, Campaign, Mission, Temporary, Etc };
    public BattleType getBattleType();
}

Otherwise we'd need a bunch of 'is' methods with overlapping functionality.

xenoargh

  • Admiral
  • *****
  • Posts: 4927
  • naively breaking things!
    • View Profile
Re: Make us able to run scripts in refit screen
« Reply #3 on: May 06, 2014, 09:19:38 PM »

Yeah, it'd be nice if it worked that way, for sure; getting contexts like that and running / killing scripts would open up a bunch of very cool things, like having an animation run every once in awhile if in the Fleet room, etc., but only there, etc., etc.
Logged
Please check out my SS projects :)
Xeno's Mod Pack