-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Scott's Allies04 co-op multiplayer mission as "Infiltration" #11702
Conversation
We used to have logic in place that lets a spy infiltrate an actor without being destroyed. |
@@ -207,6 +207,13 @@ public void Debug(string text) | |||
Game.Debug(text); | |||
} | |||
|
|||
[Desc("Write a message into debug.log")] | |||
public void DebugLog(string text) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this kind of redundant to the normal Debug
(see method above)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, that uses Game.Debug
which displays it in-game. If you want to dump a large amount of data the chat log would get spammed and you can't search it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isnt this redundant to the print builtin that we overrode for this purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed in IRC, please remove this and use print()
instead.
I think we should mention that you need to capture a supply truck. Maybe in the description with just something like |
Or even add an extra objective for it. |
|
||
LST.Unselectable.UnloadOnly: | ||
Inherits: LST | ||
Buildable: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like you forgot to add Prerequisites: ~disabled
below.
227aef3
to
98bdbf6
Compare
Fixed all the remarks. |
@@ -59,6 +59,9 @@ public Player Owner | |||
|
|||
set | |||
{ | |||
if (value == null || !(value is Player)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have a repro case of this being called with !(value is Player)
? That shouldn't be possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a wild guess to be honest. Even the null check. You suggested on IRC to add this. I can't really prove this fixes anything and I believe the Lua bridge will crash on a lower level part if you throw wrong parameters on it "can't convert stupid scripter typo without naming even the variable just telling `nil was received to LuaValue in line number 30 in sandbox.lua". I also tried to improve the stacktrace a bit in those situations as it is really annyoing, but failed. Will remove this and hope for @Unit158 to finish #9086.
98bdbf6
to
ecb016e
Compare
Here you'll want to set the |
I had trouble with the |
What problems exactly? It should just work. |
public SellableProperties(ScriptContext context, Actor self) | ||
: base(context, self) | ||
{ | ||
sellable = self.Trait<Sellable>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't really need to cache this, it will only be used once for every actor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we sell many actors at once? Wouldn't that create a tiny lag without caching?
What I actually want to says, now that we already cache it, do we really want to revert that back?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arguing over micro-optimizations is a bit silly, but I think its fair to say that an actor will be sold on average zero times (or at least much closer to zero than one). Caching it here means doing this lookup for all buildings, but doing it in Sell means doing it only on the buildings that you sell.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah well. Then nvm my comment.
Looks otherwise fine so far. The mission is fucking annoying in the beginning, though, with all the dogs around and you having no idea where to go. I eventually looked at the map in the editor and then knew where I had to go, but still never got there due to the dogs. How about removing some on easier skill levels? |
We could also add cameras, like in |
ecb016e
to
eb79591
Compare
I left my remarks at Mailaender#59. |
01e54ba
to
f726a06
Compare
Thanks. Squashed them in. |
Looks good to me now (after travis is fixed). 👍 / ✅ |
Mailaender#60 fixes travis. |
97d5368
to
080b00e
Compare
And another crash fixed Mailaender#61. Thanks. |
09c443a
to
397d26c
Compare
|
||
Utils.Do(sovietbuildings, function(sovietbuilding) | ||
Trigger.OnDamaged(sovietbuilding, function(building) | ||
if building.Health < building.MaxHealth * 3/4 then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs an owner check. if building.Owner ~= soviets then return
👍 after those things have been addressed |
397d26c
to
76294c8
Compare
Updated. |
@ScottNZ's original mission converted from the C# mission code found in release-20131223. My favorite one as it tells a good story without relying on too much text and has a nice attention to detail. The intro sequence is very hard, but it works well in co-operative settings with one player already guiding the newbie. It is also exciting (and hilarious) for spectators to watch.
Regarding features it was way ahead of it's time, but relied a lot on non-reusable hacks and suffered from missing engine features. It even had civilians walking around randomly which we just introduced in #11520 for all maps and mods. I managed to replace all expensive checks with triggers and made use of the global palette effect from #7863 to create the dawn lighting.
This should be very faithful to the original. The only behavioral change I introduced is to let the spy "hotwire" (externally capture) the truck. Afterwards all spies can enter regularly. This avoids fragile script workarounds. Capturing would destroy the spy actor and
LoadPassenger
will duplicate it, leading to an inconsistent world state.