Ported /tg/'s outfit datums, refactored job controller to support them

Players:
 - The only thing that you should notice is that your backpack options
 have changed. Instead of being "None", "Backpack", "Satchel", and
 "Satchel Alt", there are 6 options:
   - "Grey Backpack": Ensures you always recieve a plain grey backpack.
   - "Grey Satchel": Same as the above, grey, plain, satchel.
   - "Grey Dufflebag": So you don't have to rush the locker room, I
   guess. Just kinda ransacked it from /tg/. Happy to revert it, please
   do not post a five paragraph text wall calling me a shitlord
   powergaming hitler-loving furry.
   - "Leather Satchel": It's a leather satchel. What the hell did you
   think it was?
   - "Department Backpack": Gives you the department's default backpack.
   Grey for most jobs.
   - "Department Satchel": It gives you the department's default
   satchel; A grey satchel if the department doesn't have one.

Coders:
 - The above means this needs a minor SQL change:
   ```
   SQL goes here
   I'll write a query later
   Can't be bothered now
   Kill me please
   ```

 - This is a cleaner method of handling job equipment than
 "M.equip_or_collect" x 1000. Jobs specify a '/datum/outfit' datum,
 which defines all of the things to equip to the user.

 - Minor note: equip_or_collect will no longer ever generate a plastic
 bag. It will instead just drop stuff on the floor if it can't stuff it
 into a mob. If this is even slightly a point of contention, more than
 happy to revert it; It was just requested by Fox.
   - Addendum: This also has the effect of making it so that labcoats
   are just thrown onto the floor if you have a loadout suit. It's not
   really avoidable. Uniforms and suits are equipped before the
   backpack.

 - Changes from /tg/:
   - Changed all of the "H.equip_to_slot_or_del" calls into invoking a
   new "equip_item" proc; This is used to support a new variable called
   "collect_not_del". Job outfits use this, it makes it so that the
   system calls equip_or_collect instead of equip_to_slot_or_del. The
   idea being that job items should never be lost to the void,
   especially because they can conflict with loadout items.

TODO:
 - Retrofit "Equip Mob" verb to use this for all of the non-job options
 - Fully implement head announcements(?)
   - May be best for a second PR that addresses all of the real issues
   with our current job system

( Now go reread that SQL code block :) )
This commit is contained in:
Tigercat2000
2017-02-17 11:35:45 -08:00
parent e0b23a1e10
commit 14ba6fded6
29 changed files with 1828 additions and 1643 deletions
@@ -108,7 +108,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
var/underwear = "Nude" //underwear type
var/undershirt = "Nude" //undershirt type
var/socks = "Nude" //socks type
var/backbag = 2 //backpack type
var/backbag = GBACKPACK //backpack type
var/ha_style = "None" //Head accessory style
var/r_headacc = 0 //Head accessory colour
var/g_headacc = 0 //Head accessory colour
@@ -1240,7 +1240,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
g_skin = rand(0,255)
b_skin = rand(0,255)
if("bag")
backbag = rand(1,4)
backbag = pick(backbaglist)
/*if("skin_style")
h_style = random_skin_style(gender)*/
if("all")
@@ -2150,8 +2150,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
if(body_accessory)
character.body_accessory = body_accessory_by_name["[body_accessory]"]
if(backbag > 4 || backbag < 1)
backbag = 1 //Same as above
character.backbag = backbag
//Debugging report to track down a bug, which randomly assigned the plural gender to people.
@@ -224,7 +224,7 @@
b_eyes = text2num(query.item[35])
underwear = query.item[36]
undershirt = query.item[37]
backbag = text2num(query.item[38])
backbag = query.item[38]
b_type = query.item[39]
@@ -312,7 +312,7 @@
b_eyes = sanitize_integer(b_eyes, 0, 255, initial(b_eyes))
underwear = sanitize_text(underwear, initial(underwear))
undershirt = sanitize_text(undershirt, initial(undershirt))
backbag = sanitize_integer(backbag, 1, backbaglist.len, initial(backbag))
backbag = sanitize_text(backbag, initial(backbag))
b_type = sanitize_text(b_type, initial(b_type))
alternate_option = sanitize_integer(alternate_option, 0, 2, initial(alternate_option))