comparison Profile.lua @ 228:ad40cd3fc7e9

pull states config out of namespace
author Flick
date Mon, 21 Mar 2011 11:33:15 -0700
parents 741c4f9b251e
children afb5ff4eccc0
comparison
equal deleted inserted replaced
227:741c4f9b251e 228:ad40cd3fc7e9
115 end 115 end
116 end 116 end
117 vehicle:ResetProfile() 117 vehicle:ResetProfile()
118 end 118 end
119 119
120 -- (10) State module uses the bar config directly
121 local state = db:GetNamespace("State",true) or db:RegisterNamespace("State")
122 if state then
123 for name, bar in pairs(db.profile.bars) do
124 local sc = state.profile.bars and state.profile.bars[name] and state.profile.bars[name].states
125 if sc then
126 bar.states = sc
127 end
128 end
129 vehicle:ResetProfile()
130 end
131
120 db.profile.dbversion = 1 132 db.profile.dbversion = 1
121 end 133 end
122 134
123 db.profile.dbversion = self.PROFILEVERSION_LATEST 135 db.profile.dbversion = self.PROFILEVERSION_LATEST
124 end 136 end