AutotileLib

by Ter13
Fast, simple, abstract 47-state autojoining library
ID:2310595
 
BYOND Version:5.12.1393
Operating System:Windows 10 Home
Web Browser:Chrome 61.0.3163.100
Applies to:Dream Seeker
Status: Please retest

The issue described may have been fixed in a newer version of BYOND, or may have a pending unconfirmed fix in an upcoming. Please download the latest version and attempt to reproduce the problem again. If the issue persists, please edit this post's BYOND Version field to Other and specify the version you've updated to.
Descriptive Problem Summary:
When attempting to create an instance with swapmaps, an error occurs.
I'm presently using Lummox JR's SwapMaps and Pop Lava's Map Cloning
Numbered Steps to Reproduce Problem:
Map Cloning is essentially an extension to Swap Maps with a few useful functions for cloning maps, as the name suggests.

When the world is created via New(), the
Code Snippet (if applicable) to Reproduce Problem:
world
New()
..() //not having this seems to break any autotiles that are placed after the world is made.
swapmaps_mode=SWAPMAPS_TEXT
Proc_InitMaps()


Expected Results:

Actual Results:
this happens for each location that is populated from (1,1,2) to (19,1,2)
runtime error: undefined variable /var/autotile_rule
proc name: UpdateAutotile (/turf/proc/UpdateAutotile)
source file: AutotileLib.dm,99
usr: null
src: Grass (1,1,2) (/turf/Grass)
call stack:
Grass (1,1,2) (/turf/Grass): UpdateAutotile(null, null)
Grass (1,1,2) (/turf/Grass): New(Grass (1,1,2) (/turf/Grass))
/swapmap (/swapmap): AllocateSwapMap()
/swapmap (/swapmap): New("smallhouse1", null, null, null)
Proc InitMaps()
world: New()


additionally, each location also produces an error:
runtime error: undefined variable /var/autotile_rule
proc name: UpdateAutotile (/turf/proc/UpdateAutotile)
source file: AutotileLib.dm,99

Does the problem occur:
Every time?Yes.
In other games? N/A
In other user accounts? Yes.
On other computers?N/A

When does the problem NOT occur?
When Proc_InitMaps() isn't called, however, in that case, it's not possible duplicating SwapMaps.


Ter13 changed status to 'Please retest'
The 2.0 overhaul should have addressed any issues with swapmaps.