mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-01-16 02:46:55 +02:00
Misc fixes
This commit is contained in:
parent
ac15b60c02
commit
2a582d69f2
@ -26,7 +26,7 @@ local function on_player_deconstructed_area(event)
|
||||
local nukes = player.remove_item({name="deconstruction-planner", count=1000})
|
||||
|
||||
--Make them think they arent noticed
|
||||
Utils.print_except(player.name .. " tried to deconstruct something, but instead deconstructed himself.", player)
|
||||
Utils.print_except(player.name .. " tried to deconstruct something, but instead deconstructed themself.", player)
|
||||
player.print("Only regulars can mark things for deconstruction, if you want to deconstruct something you may ask an admin to promote you.")
|
||||
|
||||
player.character.health = 0
|
||||
|
@ -18,7 +18,7 @@ end
|
||||
|
||||
|
||||
Module.is_regular = function(player_name)
|
||||
return false or global.regulars[player_name] or global.regulars[player_name:lower()] --to make it backwards compatible
|
||||
return Utils.cast_bool(global.regulars[player_name] or global.regulars[player_name:lower()]) --to make it backwards compatible
|
||||
end
|
||||
|
||||
Module.add_regular = function(player_name)
|
||||
|
@ -1,5 +1,3 @@
|
||||
local Event = require "utils.event"
|
||||
|
||||
local Module = {}
|
||||
|
||||
Module.distance = function(pos1, pos2)
|
||||
@ -34,3 +32,9 @@ Module.get_actor = function()
|
||||
if game.player then return game.player.name end
|
||||
return "<server>"
|
||||
end
|
||||
|
||||
Module.cast_bool = function(var)
|
||||
if var then return true else return false
|
||||
end
|
||||
|
||||
return Module
|
||||
|
Loading…
Reference in New Issue
Block a user