struct

WritingAdditions::Map::Linedef

Inherits Struct < Value < Object

Structure of a linedef.

Constructors

new

Class methods

write(file : String | Path, linedefs : Array(::WAD::Map::Linedef)) : ::WAD::Directory

Writes a list of linedefs given an output io and the linedefs to write and returns the written directory

Writes linedefs in my_wad to a file:

my_wad = WAD.read("Path/To/Wad")
WAD::Map::Linedef.write("Path/To/linedefs.lmp", my_wad.maps["MyMap"].linedefs)
write(io : IO, linedefs : Array(::WAD::Map::Linedef)) : ::WAD::Directory

Writes a list of linedefs given an output io and the linedefs to write and returns the written directory

Writes linedefs in my_wad to a file:

my_wad = WAD.read("Path/To/Wad")
File.open("Path/To/linedefs.lmp", "w+") do |file|
  WAD::Map::Linedef.write(my_wad.maps["MyMap"].linedefs)
end

Instance methods

initialize