You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
540 B
Lua

local base = string.match(..., "(.-)[^%.]+%.[^%.]+$")
local ffi = require("ffi")
local fh = require(base.."helper.ffi_struct")
local format = string.format
local mt, index = {}, {}
fh.gen_raw_accessor(index, "strong_magnitude")
fh.gen_raw_accessor(index, "weak_magnitude")
function index:tostring()
return format("ff_rumble_effect{strong_magnitude=%d, weak_magnitude=%d}",
self.strong_magnitude, self.weak_magnitude)
end
mt.__tostring = index.tostring
return fh.base(mt, index, ffi.typeof("struct ff_rumble_effect"))