//Relevant bits
// Equipment Stuff
obj
var
equipment = 0
equipped = 0
position = 0
Click()
..()
if(equipment) equip(usr)
proc
equip(mob/m)
if(loc != m) return
if(!equipped)
position = length(m.k_overlays)
layer = FLOAT_LAYER - 1
m.AddOverlay(src)
else
m.RemoveOverlay(src)
m.preserveLevels(position)
position = 0
layer = initial(layer)
equipped = !equipped
Clothes
equipment = 1
inventory = 1
Shirt
icon = 'Shirt.dmi'
Pants
icon = 'Pants.dmi'
// Race Picking Stuff
mob/Player
var
tmp/list/spawn_at = list(100,95,1)
tmp/list/def_clothes = list(/obj/Clothes/Pants, /obj/Clothes/Shirt)
New(ready=0, size = "Medium")
..()
if(!ready) return
spawn() create(size)
proc
create(size)
while(!hascreated) sleep(5)
loc = locate(spawn_at[1], spawn_at[2], spawn_at[3])
while(!hasloaded) sleep(5)
check_clothes()
update_inv()
check_skills()
check_clothes()
for(var/x in def_clothes)
var/obj/Clothes/c = new x(src)
//c.equip(src)
usr = src
c.Click()
// Character Creation Stuff
proc
new_def(mob/m, mob/p)
p.key = m.key
p.defaults(1)
p.save_proc()
mob
proc
s_newchar()
var csize, cname, crace
if(winget(src, "smed_radio", "is-checked") == "true") csize = "Medium"
else if(winget(src, "slarge_radio", "is-checked") == "true") csize = "Large"
else csize = "Small"
crace = winget(src, "selectedRace", "text")
var/t2p = text2path("/mob/Player/[crace]")
var/mob/Player/c = new t2p(1, csize)
c.hascreated = 1
new_def(src, c)
Problem description:
Put simply, this is my issue. When a character is created, it automatically get's equipped with some clothes and hair. The clothes that are equipped to it however are bugged in that they do not change direction with the player.
It's only temporary though, after calling equip() once again it fixes the issue. Yet, it still exists, and is annoying. Does anyone have a clue why?