Line 36: |
Line 36: |
| | | |
| function NanaminFleet:create_table_prep() | | function NanaminFleet:create_table_prep() |
− | error(self._args["!hq"])
| |
| self._size = self._args.image_size or self._default_size | | self._size = self._args.image_size or self._default_size |
| + | |
| + | self._hq_lvl = tonumber(self._args["!hq"]) |
| + | |
| + | --Get bracket of 5 |
| + | self._hq_lvl = self._hq_lvl - (self._hq_lvl % 5) + 5 |
| + | if self._hq_lvl % 5 == 0 then |
| + | self._hq_lvl = self._hq_lvl + 5 |
| + | end |
| + | |
| + | self._route = self._args["!route"] |
| end | | end |
| | | |
Line 103: |
Line 112: |
| elseif item_key == "!-" then | | elseif item_key == "!-" then |
| item = "locked" | | item = "locked" |
− | elseif mw.ustring.find(item_key, '!hq') then
| |
− | item = false
| |
− |
| |
− | local split = mw.ustring.find(item_key, '=')
| |
− | self._hq_lvl = tonumber(mw.ustring.sub(item_key, split + 1))
| |
− |
| |
− | --Get bracket of 5
| |
− | self._hq_lvl = self._hq_lvl - (self._hq_lvl % 5) + 5
| |
− | if self._hq_lvl % 5 == 0 then
| |
− | self._hq_lvl = self._hq_lvl + 5
| |
− | end
| |
− | elseif mw.ustring.find(item_key, '!route') then
| |
− | local split = mw.ustring.find(item_key, '=')
| |
− | self._route = mw.ustring.sub(item_key, split + 1)
| |
| else | | else |
| if mw.ustring.find(item_key, '/') then | | if mw.ustring.find(item_key, '/') then |