Improved Structure constructor’s errors.

Class = require "nyaa.class"

Class "Structure",
	__init: (arg) =>
		unless arg.reference
			error "no 'reference' attribute provided"

		@reference = arg.reference -- StructureReference

		@hitpoints = arg.hitpoints or @reference.hitpoints

		@timeToBuild = arg.timeToBuild or @reference.buildTime

Class = require "nyaa.class"

Class "Structure",
	__init: (arg) =>
		@reference = arg.reference -- StructureReference

		@hitpoints = arg.hitpoints or @reference.hitpoints

		@timeToBuild = arg.timeToBuild or @reference.buildTime


improved user management enabler

improved user management enabler

Users=require "lazuli.modules.user_management.models.users"

=>
  @modules or={}
  @include "lazuli.modules.user_management" if not @modules.user_management
  @modules.user_management or={}
  @before_filter =>
    @modules or={}
    @modules.user_management or={}
    @session.modules.user_management or={}
    if @session.modules.user_management.currentuser and not @modules.user_management.currentuser
      @modules.user_management.currentuser = Users\find @session.modules.user_management.currentuser

Users=require "lazuli.modules.user_management.models.users"

=>
  @include "lazuli.modules.user_management"
  @before_filter =>
    @modules or={}
    @modules.user_management or={}
    @session.modules.user_management or={}
    if @session.modules.user_management.currentuser and not @modules.user_management.currentuser
      @modules.user_management.currentuser = Users\find @session.modules.user_management.currentuser