mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 07:03:30 +01:00
-tg- underware overhaul
This commit overhauls the underwear/undershirt system to -tg-'s text-based version. No more magic numbers, just text states. Note, this modifies the SQL Schema, and existing databases must be modified by the following SQL: ALTER TABLE server_db.characters CHANGE underwear underwear MEDIUMTEXT NOT NULL, CHANGE undershirt undershirt MEDIUMTEXT NOT NULL;
This commit is contained in:
@@ -6,47 +6,26 @@
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/dresser/proc/convUnM(mund)
|
||||
return underwear_m.Find(mund)
|
||||
|
||||
/obj/structure/dresser/proc/convUnF(fund)
|
||||
return underwear_f.Find(fund)
|
||||
|
||||
/obj/structure/dresser/proc/convUs(us)
|
||||
return undershirt_list.Find(us)
|
||||
|
||||
/obj/structure/dresser/attack_hand(mob/user as mob)
|
||||
if(!Adjacent(user))//no tele-grooming
|
||||
return
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
var/choice = input(user, "Underwear, or Undershirt?", "Changing") as null|anything in list("Underwear","Undershirt")
|
||||
var/choice = input(user, "Underwear or Undershirt?", "Changing") as null|anything in list("Underwear","Undershirt")
|
||||
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
switch(choice)
|
||||
if("Underwear")
|
||||
if(H.gender == FEMALE)
|
||||
var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in underwear_f
|
||||
if(new_undies)
|
||||
H << "\red You selected [new_undies]."
|
||||
var/freturn = convUnF(new_undies)
|
||||
H.underwear = freturn
|
||||
|
||||
else
|
||||
var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in underwear_m
|
||||
if(new_undies)
|
||||
H << "\red You selected [new_undies]."
|
||||
var/mreturn = convUnM(new_undies)
|
||||
H.underwear = mreturn
|
||||
var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in underwear_list
|
||||
if(new_undies)
|
||||
H.underwear = new_undies
|
||||
|
||||
if("Undershirt")
|
||||
var/new_undershirt = input(user, "Select your undershirt", "Changing") as null|anything in undershirt_list
|
||||
if(new_undershirt)
|
||||
H << "\red You selected [new_undershirt]"
|
||||
var/usreturn = convUs(new_undershirt)
|
||||
H.undershirt = usreturn
|
||||
H.undershirt = new_undershirt
|
||||
|
||||
add_fingerprint(H)
|
||||
H.update_body()
|
||||
Reference in New Issue
Block a user