Search found 232 matches

by murgh
Sun Aug 21, 2016 3:38 pm
Forum: Modding
Topic: Object.GetNearbyObjects() returns objects in a radius
Replies: 23
Views: 1605

Re: Object.GetNearbyObjects() returns objects in a radius

For now I've worked around it with this: function FindMySprinklers() MySprinklers={} NumSprinklers=0 ScannedSprinklers = this.GetNearbyObjects('Sprinkler',this.Range*2) Xmin=this.Pos.x-this.Range Xmax=this.Pos.x+this.Range Ymin=this.Pos.y-this.Range Ymax=this.Pos.y+this.Range if next(ScannedSprinkle...
by murgh
Sun Aug 21, 2016 1:44 pm
Forum: Modding
Topic: Object.GetNearbyObjects() returns objects in a radius
Replies: 23
Views: 1605

Re: Object.GetNearbyObjects() returns objects in a radius

But that said if GetNearbyObjects would use a square it would make things only a little bit easier for square rooms but it wouldn't entirely solve your problem either because a square big enough to fully cover a rectangle (or the cellblock in your scenario) would suffer the same problem as trying t...
by murgh
Sun Aug 21, 2016 10:05 am
Forum: Modding
Topic: Object.GetNearbyObjects() returns objects in a radius
Replies: 23
Views: 1605

Re: Object.GetNearbyObjects() returns objects in a radius

Well I already knew that it works in a radius instead of a square or "Manhatten distance"... and I thought this was common knowledge around modders. How? The lua_functions.txt mentions 'the distance to search within', it doesn't say radius (which would be clearer). But I don't know why th...
by murgh
Thu Aug 18, 2016 5:55 pm
Forum: Modding
Topic: Object.GetNearbyObjects() returns objects in a radius
Replies: 23
Views: 1605

Object.GetNearbyObjects() returns objects in a radius

I always assumed GetNearbyObjects() would return a square of objects, but it turns out some objects on the edge of that square would not be found unless the range was set higher. I've read posts about GetNearbyObjects() not being reliable, so I tried to figure out why. Therefore I made a little test...
by murgh
Tue Aug 16, 2016 4:33 pm
Forum: Community Members
Topic: [Suggestion] Allow material/grounds on map border to change
Replies: 11
Views: 166

Re: [Suggestion] Allow material/grounds on map border to cha

Mod has been updated to duplicate single tiles as well. And it can also duplicate in diagonal way for the corners!
by murgh
Tue Aug 16, 2016 4:32 pm
Forum: Community Members
Topic: BUG: Work/Lock-up Prisoners having fun in Common Room
Replies: 1
Views: 69

Re: BUG: Work/Lock-up Prisoners having fun in Common Room

Sounds like it's related to http://bugs.introversion.co.uk/view.php?id=11105 which has been solved for next update.
by murgh
Tue Aug 16, 2016 9:33 am
Forum: Modding
Topic: Tooltips, multi language support, and lua
Replies: 5
Views: 707

Re: Tooltips, multi language support, and lua

That makes sense. And keeps the tooltip from getting a mess as well :p
by murgh
Mon Aug 15, 2016 11:03 pm
Forum: Modding
Topic: Modifying Needs Error -- Help Needed
Replies: 5
Views: 808

Re: Modifying Needs Error -- Help Needed

We do "funky" stuff with metatables in Lua for access our variables. Can you give me an example of the loop you're using so I can reproduce the problem locally and get a fix? "Funky stuff indeed" :lol: Another example, there is this Needs.Action thingy in de savedgame with sever...
by murgh
Mon Aug 15, 2016 4:50 pm
Forum: Modding
Topic: Tooltips, multi language support, and lua
Replies: 5
Views: 707

Re: Tooltips, multi language support, and lua

So then the final example line Object.SetProperty(this,"Tooltip", "Used by Utility Booth nr. "..this.HomeUID.."\n\nFIRE DETECTED!\nSending "..entity.Category.." "..entity.Type.." at "..string.sub(tostring(_),0,4).."m\nto the Evacuation Area"...
by murgh
Mon Aug 15, 2016 4:18 pm
Forum: Modding
Topic: Tooltips, multi language support, and lua
Replies: 5
Views: 707

Re: Tooltips, multi language support, and lua

Thank god, I thought I was going completely nuts for not being able to get it to work. Thanks a lot, looks like that code will do just what's needed!
by murgh
Sat Aug 13, 2016 4:47 pm
Forum: Community Members
Topic: Lovely bug with Guard Towers
Replies: 4
Views: 129

Re: Lovely bug with Guard Towers

SCreen shots or it didn't happen :D
by murgh
Sat Aug 13, 2016 4:45 pm
Forum: Community Members
Topic: [Suggestion] Allow material/grounds on map border to change
Replies: 11
Views: 166

Re: [Suggestion] Allow material/grounds on map border to cha

yuk wrote:Why not allow the placement but have them auto build?


Allowing it is hard coded into the game, the only way around is to cheat by spawning the stuff with a script.
by murgh
Fri Aug 12, 2016 7:30 pm
Forum: Modding
Topic: Tooltips, multi language support, and lua
Replies: 5
Views: 707

Tooltips, multi language support, and lua

I'm having a hard time figuring out how to get multi language support into tooltips when the tooltips also have some variables... This works fine: in base-language.txt tooltip_mine This is my tooltip in the .lua script: Object.SetProperty(this,"Tooltip","tooltip_mine") However, w...
by murgh
Fri Aug 12, 2016 4:48 pm
Forum: Community Members
Topic: [Suggestion] Allow material/grounds on map border to change
Replies: 11
Views: 166

Re: [Suggestion] Allow material/grounds on map border to cha

Something like this perhaps? https://steamcommunity.com/sharedfiles/filedetails/?id=740737747 Close, but not quite. I want border tiles to be directly editable...though naturally with any obstructing options like walls and whatnot forbidden. Well it won't give the possibility of editing every singl...

Go to advanced search