register_gun: Fix inverse condition when checking for lite mode

This commit is contained in:
Anand S 2019-01-06 11:38:40 +05:30
parent 9992816356
commit e60d5aa896
No known key found for this signature in database
GPG Key ID: 3AD8A3C4A51AAB97

View File

@ -246,9 +246,9 @@ function gunslinger.register_gun(name, def)
error("register_gun: Unimplemented feature!")
end
if def.style_of_fire:find("automatic") and not lite then
error("gunslinger.register_gun: Attempt to register gun of"
.. " disabled type '" .. def.style_of_fire .. "'")
if def.style_of_fire:find("automatic") and lite then
error("gunslinger.register_gun: Attempt to register gun of " ..
"type '" .. def.style_of_fire .. "' when lite mode is enabled")
end
def.itemdef.on_use = on_lclick