Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

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

Tecrys

  • Admiral
  • *****
  • Posts: 592
  • 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
Symbiotic Void Creatures 0.5.0-alpha for 0.97a is out
https://fractalsoftworks.com/forum/index.php?topic=28010.0

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • 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: 1723
    • 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: 5078
  • 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