Page 2 of 2
Re: Release: Harder Hermits
Posted: Tue Jul 06, 2021 7:10 pm
by UK_Eliter
Re: Release: Harder Hermits
Posted: Tue Jul 06, 2021 8:44 pm
by phkb
UK_Eliter wrote: ↑Tue Jul 06, 2021 1:14 pm
If you could give me a hint or two on how to detect which hermits your OXP will take control over, then I can adjust my OXP to leave those hermits alone.
station.hasRole(“hermitage”)
Re: Release: Harder Hermits
Posted: Tue Jul 06, 2021 8:47 pm
by Cholmondely
hiran wrote: ↑Tue Jul 06, 2021 6:05 pm
phkb wrote: ↑Tue Jul 06, 2021 12:50 pm
[...] if the RH is a player-owned hermitage, then [...]
Player-owned rock hermitages? That sounds interesting.
Why would a player own a hermitage? So far I thought Oolite is all about flying a ship...
Why fly a
ship when you can fly a
rock instead?
Re: Release: Harder Hermits
Posted: Tue Jul 06, 2021 9:25 pm
by UK_Eliter
phkb:
Thanks. But: hmm. Does anything that has the
role
'hermitage' ever have a
primaryRole
that is one of the following?
- rockhermit
- rockhermit-chaotic
- rockhermit-pirate
If not, then I think my OXP will touch no hermitages. For, I use the following functions to determine which hermits I consider modifying. (The comments within these functions are somewhat new. The actual code is in the published version of my OXP.)
Code: Select all
/*
================
ENTITY PICKER(S)
================
The following roles are from Oolite itself:
rockhermit
rockhermit-chaotic
rock-hermit-pirate
The following role is from SpicyHermits:
spicy_hermits_abandoned
*/
this.$isHermit = function ( e )
{
return e.isShip && ( e.primaryRole === "rockhermit" || e.primaryRole === "rockhermit-chaotic" || e.primaryRole === "rockhermit-pirate" );
};
this.$isHermit_abandoned = function ( e )
{
return e.isShip && e.primaryRole === "asteroid" && e.name === "Abandoned Rock Hermit";
// SpicyHermits makes a hermit abandoned by changing its role to 'asteroid' and its name to 'Abandoned Rock Hermit'.
};
this.$isHermit_abandonedQuasi = function ( e )
{
return e.isShip && e.primaryRole === "spicy_hermits_abandoned" && e.hasRole ( "harderHermits_abandonedQuasi" );
};
Apologies if I overlook anything or make a mistake.
Re: Release: Harder Hermits
Posted: Tue Jul 06, 2021 10:03 pm
by phkb
UK_Eliter wrote: ↑Tue Jul 06, 2021 9:25 pm
Does anything that has the role 'hermitage' ever have a primaryRole that is one of the following?
- rockhermit
- rockhermit-chaotic
- rockhermit-pirate
Yes. A hermitage will still have the same primary role. It will just have this additional role.
Re: Release: Harder Hermits
Posted: Wed Jul 07, 2021 6:11 am
by hiran
Cholmondely wrote: ↑Tue Jul 06, 2021 8:47 pm
hiran wrote: ↑Tue Jul 06, 2021 6:05 pm
phkb wrote: ↑Tue Jul 06, 2021 12:50 pm
[...] if the RH is a player-owned hermitage, then [...]
Player-owned rock hermitages? That sounds interesting.
Why would a player own a hermitage? So far I thought Oolite is all about flying a ship...
Why fly a
ship when you can fly a
rock instead?
Does that mean the rock is operated just like a ship?
Hmmm. How do you dock? How do you refuel? Or is the solution just the same as with the Imperial Star Destroyer I started with?
Where, per design a shuttle should take care of station contact but took ages to get in. And finally I just took advantage of the star destroyer's shape and carefully pushed it into the docking bay - it would reach far enough to initiate the docking sequence...
And of course I'd be interested in the planetfall as well.
Re: Release: Harder Hermits
Posted: Wed Jul 07, 2021 6:24 am
by phkb
hiran wrote: ↑Wed Jul 07, 2021 6:11 am
Does that mean the rock is operated just like a ship?
The Hermitage is stationary. The Hermitage OXP is about managing and running said hermitage.
Re: Release: Harder Hermits
Posted: Wed Jul 07, 2021 6:30 am
by hiran
Just seeing this post. It answers a lot of questions. Thank you.