Forager
Small Lighthouse
7 条留言
ExTazzY 1 月 10 日 下午 12:16 
without changing the icon + possibility to edit the radius

for myself from the future - log of all object parameters in the game

#define OnStructureSpawn(id, struct)
with (objLighthouse) {
image_xscale = 0.3
image_yscale = 0.3
scale = 1/4
selectionSize = 1
// aoe = 150
// aoeAlpha = 1
// lightRadius = 1
}

// var props = variable_instance_get_names(objLighthouse)
// for (var i = 0; i < array_length(props); i++) {
// var prop_name = props ;
// var prop_value = variable_instance_get(id, prop_name);
// Trace(prop_name + ": " + string(prop_value));
// }[/spoiler]
PimpChiliWolf 2024 年 12 月 7 日 上午 10:12 
Exactly what I needed, thanks!
Treason  [作者] 2024 年 11 月 2 日 下午 2:31 
Just in case anyone cares, the mod is only a few lines. I'm a developer, but don't really know Lua and am not really familiar with modding this game, so just figured it out by examining the source of some other mods.

#define Main
Trace("Lighthouse Replacer Loaded");


#define OnStructureSpawn(id, struct)
with (objLighthouse) {
if sprite_index == sprLighthouse {
mask_index = sprLighthouse
sprite_index = sprBrazier
}
}

If another mod were to load after this that also modifies the lighthouse sprite, that would for sure break this mod, but since I don't know in depth the side effects of modifying these objects, there could be other scenarios that break it as well.
Treason  [作者] 2024 年 11 月 2 日 下午 2:23 
Yep, definitely still working. I just loaded my old save. All existing lighthouses were the brazier, and when I placed a new one it was also the brazier. I would assume there's a conflict somewhere.
Treason  [作者] 2024 年 11 月 2 日 下午 2:20 
No, nothing special. Worked fine for me.

I am not playing the game anymore, but I'll start it up real quick to see if it still works. The silhouette when placing will be the regular lighthouse, but should be the brazier once placed. Perhaps another mod is conflicting, but I'll post back in a few minutes.
Marxist819 2024 年 10 月 30 日 下午 12:40 
Is there a special command to enable this? I compiled my mods with this in it, and when I place lighthouses, they're exactly the same. It doesn't appear to work.
Marxist819 2024 年 10 月 29 日 下午 9:36 
I've been waiting for ages for a smaller lighthouse mod! It doesn't seem to work though :(