diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm
index f683c47e06..dc9c73b44d 100644
--- a/code/__HELPERS/global_lists.dm
+++ b/code/__HELPERS/global_lists.dm
@@ -11,12 +11,24 @@ var/global/list/living_mob_list = list() //List of all alive mobs, including c
var/global/list/dead_mob_list = list() //List of all dead mobs, including clientless. Excludes /mob/new_player
var/global/list/cable_list = list() //Index for all cables, so that powernets don't have to look through the entire world all the time
-var/global/list/hair_styles_list = list() //stores /datum/sprite_accessory/hair indexed by name
-var/global/list/facial_hair_styles_list = list() //stores /datum/sprite_accessory/facial_hair indexed by name
var/global/list/chemical_reactions_list //list of all /datum/chemical_reaction datums. Used during chemical reactions
var/global/list/chemical_reagents_list //list of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff
var/global/list/landmarks_list = list() //list of all landmarks created
+//Preferences stuff
+ //Hairstyles
+var/global/list/hair_styles_list = list() //stores /datum/sprite_accessory/hair indexed by name
+var/global/list/hair_styles_male_list = list()
+var/global/list/hair_styles_female_list = list()
+var/global/list/facial_hair_styles_list = list() //stores /datum/sprite_accessory/facial_hair indexed by name
+var/global/list/facial_hair_styles_male_list = list()
+var/global/list/facial_hair_styles_female_list = list()
+ //Underwear
+var/global/list/underwear_m = list("White", "Grey", "Green", "Blue", "Black", "Mankini", "Love-Hearts", "Black2", "Grey2", "Stripey", "Kinky", "None") //Curse whoever made male/female underwear diffrent colours
+var/global/list/underwear_f = list("Red", "White", "Yellow", "Blue", "Black", "Thong", "Babydoll", "Baby-Blue", "Green", "Pink", "Kinky", "None")
+ //Backpacks
+var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel")
+
//////////////////////////
/////Initial Building/////
//////////////////////////
@@ -28,9 +40,21 @@ var/global/list/landmarks_list = list() //list of all landmarks created
for(var/path in paths)
var/datum/sprite_accessory/hair/H = new path()
hair_styles_list[H.name] = H
+ switch(H.gender)
+ if(MALE) hair_styles_male_list += H.name
+ if(FEMALE) hair_styles_female_list += H.name
+ else
+ hair_styles_male_list += H.name
+ hair_styles_female_list += H.name
//Facial Hair - Initialise all /datum/sprite_accessory/facial_hair into an list indexed by facialhair-style name
paths = typesof(/datum/sprite_accessory/facial_hair) - /datum/sprite_accessory/facial_hair
for(var/path in paths)
var/datum/sprite_accessory/facial_hair/H = new path()
facial_hair_styles_list[H.name] = H
+ switch(H.gender)
+ if(MALE) facial_hair_styles_male_list += H.name
+ if(FEMALE) facial_hair_styles_female_list += H.name
+ else
+ facial_hair_styles_male_list += H.name
+ facial_hair_styles_female_list += H.name
diff --git a/code/__HELPERS/maths.dm b/code/__HELPERS/maths.dm
index 7e31a67379..b174147d58 100644
--- a/code/__HELPERS/maths.dm
+++ b/code/__HELPERS/maths.dm
@@ -1,7 +1,5 @@
// Credits to Nickr5 for the useful procs I've taken from his library resource.
-
-var/const/Pi = 3.14159265
var/const/E = 2.71828183
var/const/Sqrt2 = 1.41421356
diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm
new file mode 100644
index 0000000000..b3db473496
--- /dev/null
+++ b/code/__HELPERS/mobs.dm
@@ -0,0 +1,50 @@
+proc/random_hair_style(gender)
+ switch(gender)
+ if(MALE) return pick(hair_styles_male_list)
+ if(FEMALE) return pick(hair_styles_female_list)
+ else return pick(hair_styles_list)
+
+proc/random_facial_hair_style(gender)
+ switch(gender)
+ if(MALE) return pick(facial_hair_styles_male_list)
+ if(FEMALE) return pick(facial_hair_styles_female_list)
+ else return pick(facial_hair_styles_list)
+
+proc/random_name(gender)
+ if(gender==FEMALE) return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
+ else return capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
+
+proc/random_skin_tone()
+ switch(pick(55;"caucasian", 15;"afroamerican", 10;"african", 10;"latino", 5;"albino", 5;"weird"))
+ if("caucasian") . = -10
+ if("afroamerican") . = -115
+ if("african") . = -165
+ if("latino") . = -55
+ if("albino") . = 34
+ else . = rand(-185,34)
+ return min(max( .+rand(-25, 25), -185),34)
+
+proc/skintone2racedescription(tone)
+ switch (tone)
+ if(30 to INFINITY) return "albino"
+ if(20 to 30) return "pale"
+ if(5 to 15) return "light skinned"
+ if(-10 to 5) return "white"
+ if(-25 to -10) return "tan"
+ if(-45 to -25) return "darker skinned"
+ if(-65 to -45) return "brown"
+ if(-INFINITY to -65) return "black"
+ else return "unknown"
+
+proc/age2agedescription(age)
+ switch(age)
+ if(0 to 1) return "infant"
+ if(1 to 3) return "toddler"
+ if(3 to 13) return "child"
+ if(13 to 19) return "teenager"
+ if(19 to 30) return "young adult"
+ if(30 to 45) return "adult"
+ if(45 to 60) return "middle-aged"
+ if(60 to 70) return "aging"
+ if(70 to INFINITY) return "elderly"
+ else return "unknown"
\ No newline at end of file
diff --git a/code/__HELPERS/sanitize_values.dm b/code/__HELPERS/sanitize_values.dm
index acf81b3f62..4b521f9bfb 100644
--- a/code/__HELPERS/sanitize_values.dm
+++ b/code/__HELPERS/sanitize_values.dm
@@ -44,7 +44,3 @@
if(65 to 70) . += ascii2text(ascii+32) //letters A to F - translates to lowercase
else return default
return .
-
-
-
-
diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm
index 2215e0d52f..fc0ce94721 100644
--- a/code/__HELPERS/type2type.dm
+++ b/code/__HELPERS/type2type.dm
@@ -254,4 +254,10 @@ proc/tg_list2text(list/list, glue=",")
if(rights & R_VAREDIT) . += "[seperator]+VAREDIT"
if(rights & R_SOUNDS) . += "[seperator]+SOUND"
if(rights & R_SPAWN) . += "[seperator]+SPAWN"
- return .
\ No newline at end of file
+ return .
+
+/proc/ui_style2icon(ui_style)
+ switch(ui_style)
+ if("old") return 'icons/mob/screen1_old.dmi'
+ if("Orange") return 'icons/mob/screen1_Orange.dmi'
+ else return 'icons/mob/screen1_Midnight.dmi'
diff --git a/code/datums/organs/organ_external.dm b/code/datums/organs/organ_external.dm
index b5c67d5496..e44b872cee 100644
--- a/code/datums/organs/organ_external.dm
+++ b/code/datums/organs/organ_external.dm
@@ -78,7 +78,7 @@
//Damage will not exceed max_damage using this proc
//Cannot apply negative damage
/datum/organ/external/proc/take_damage(brute, burn)
- if(owner && owner.nodamage) return 0 //godmode
+ if(owner && (owner.status_flags & GODMODE)) return 0 //godmode
brute = max(brute,0)
burn = max(burn,0)
diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm
index 0e3a1f7529..6612a3acfd 100644
--- a/code/game/gamemodes/cult/runes.dm
+++ b/code/game/gamemodes/cult/runes.dm
@@ -382,7 +382,7 @@ var/list/sacrificed = list()
D.real_name = copytext(P.info, 1, MAX_NAME_LEN)
break
D.universal_speak = 1
- D.nodamage = 0
+ D.status_flags &= ~GODMODE
D.key = ghost.key
diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm
index 66fc0330fc..75aaceb45a 100644
--- a/code/game/gamemodes/wizard/soulstone.dm
+++ b/code/game/gamemodes/wizard/soulstone.dm
@@ -71,7 +71,7 @@
if ("Summon")
for(var/mob/living/simple_animal/shade/A in src)
- A.nodamage = 0
+ A.status_flags &= ~GODMODE
A.canmove = 1
A << "You have been released from your prison, but you are still bound to [U.name]'s will. Help them suceed in their goals at all costs."
A.loc = U.loc
@@ -124,7 +124,7 @@
del(animation)
var/mob/living/simple_animal/shade/S = new /mob/living/simple_animal/shade( T.loc )
S.loc = C //put shade in stone
- S.nodamage = 1 //So they won't die inside the stone somehow
+ S.status_flags |= GODMODE //So they won't die inside the stone somehow
S.canmove = 0//Can't move out of the soul stone
S.name = "Shade of [T.real_name]"
S.real_name = "Shade of [T.real_name]"
@@ -151,7 +151,7 @@
U << "\red Capture failed!: \black The soul stone has already been imprinted with [C.imprinted]'s mind!"
else
T.loc = C //put shade in stone
- T.nodamage = 1
+ T.status_flags |= GODMODE
T.canmove = 0
T.health = T.maxHealth
C.icon_state = "soulstone2"
diff --git a/code/game/hud.dm b/code/game/hud.dm
index 229e397f5a..386b299a55 100644
--- a/code/game/hud.dm
+++ b/code/game/hud.dm
@@ -241,9 +241,11 @@ datum/hud/New(mob/owner)
/datum/hud/proc/instantiate()
if(!ismob(mymob)) return 0
+ if(!mymob.client) return 0
+ var/ui_style = ui_style2icon(mymob.client.prefs.UI_style)
if(ishuman(mymob))
- human_hud(mymob.UI) // Pass the player the UI style chosen in preferences
+ human_hud(ui_style) // Pass the player the UI style chosen in preferences
if(RADAR in mymob.augmentations)
spawn()
@@ -253,10 +255,10 @@ datum/hud/New(mob/owner)
mymob:place_radar_closed()
else if(ismonkey(mymob))
- monkey_hud(mymob.UI)
+ monkey_hud(ui_style)
else if(isbrain(mymob))
- brain_hud(mymob.UI)
+ brain_hud(ui_style)
else if(islarva(mymob))
larva_hud()
@@ -279,4 +281,4 @@ datum/hud/New(mob/owner)
else if(isobserver(mymob))
ghost_hud()
- return
\ No newline at end of file
+ return
diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm
index 678783887d..ecc4ab7f93 100644
--- a/code/game/machinery/cloning.dm
+++ b/code/game/machinery/cloning.dm
@@ -113,7 +113,7 @@
//Clonepod
//Start growing a human clone in the pod!
-/obj/machinery/clonepod/proc/growclone(var/ckey, var/clonename, var/ui, var/se, var/mindref, var/mrace, var/UI)
+/obj/machinery/clonepod/proc/growclone(var/ckey, var/clonename, var/ui, var/se, var/mindref, var/mrace)
if(mess || attempting)
return 0
var/datum/mind/clonemind = locate(mindref)
@@ -144,7 +144,6 @@
var/mob/living/carbon/human/H = new /mob/living/carbon/human(src)
occupant = H
- H.UI = UI // set interface preference
if(!clonename) //to prevent null names
clonename = "clone ([rand(0,999)])"
diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm
index e386b165ae..6aae578be8 100644
--- a/code/game/machinery/computer/cloning.dm
+++ b/code/game/machinery/computer/cloning.dm
@@ -378,7 +378,7 @@
temp = "Error: Clonepod malfunction."
else if(!config.revival_cloning)
temp = "Error: Unable to initiate cloning cycle."
- else if(pod1.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"], C.fields["interface"]))
+ else if(pod1.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"]))
temp = "Initiating cloning cycle..."
records.Remove(C)
del(C)
@@ -429,11 +429,6 @@
R.fields["UI"] = subject.dna.uni_identity
R.fields["SE"] = subject.dna.struc_enzymes
- // Preferences stuff
- R.fields["interface"] = subject.UI
-
-
-
//Add an implant if needed
var/obj/item/weapon/implant/health/imp = locate(/obj/item/weapon/implant/health, subject)
if (isnull(imp))
diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm
index 28d38f7a0a..2f9a968d81 100644
--- a/code/game/objects/items/robot/robot_upgrades.dm
+++ b/code/game/objects/items/robot/robot_upgrades.dm
@@ -34,7 +34,7 @@
R.module = null
R.modtype = "robot"
R.updatename("Default")
- R.nopush = 0
+ R.status_flags |= CANPUSH
R.updateicon()
return 1
diff --git a/code/global.dm b/code/global.dm
index 43faa3dcc9..ec3e9a21f5 100644
--- a/code/global.dm
+++ b/code/global.dm
@@ -206,67 +206,6 @@ var/forum_authenticated_group = "10"
// However it'd be ok to use for accessing attack logs and such too, which are even laggier.
var/fileaccess_timer = 1800 //Cannot access files by ftp until the game is finished setting up and stuff.
-
-//Please don't edit these values without speaking to Errorage first ~Carn
-//Admin Permissions
-#define R_BUILDMODE 1
-#define R_ADMIN 2
-#define R_BAN 4
-#define R_FUN 8
-#define R_SERVER 16
-#define R_DEBUG 32
-#define R_POSSESS 64
-#define R_PERMISSIONS 128
-#define R_STEALTH 256
-#define R_REJUVINATE 512
-#define R_VAREDIT 1024
-#define R_SOUNDS 2048
-#define R_SPAWN 4096
-
-#define R_MAXPERMISSION 4096 //This holds the maximum value for a permission. It is used in iteration, so keep it updated.
-
-#define R_HOST 65535
-
-//Preference toggles
-#define SOUND_ADMINHELP 1
-#define SOUND_MIDI 2
-#define SOUND_AMBIENCE 4
-#define SOUND_LOBBY 8
-#define CHAT_OOC 16
-#define CHAT_DEAD 32
-#define CHAT_GHOSTEARS 64
-#define CHAT_GHOSTSIGHT 128
-#define CHAT_PRAYER 256
-#define CHAT_RADIO 512
-
-#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_PRAYER|CHAT_RADIO)
-
-#define BE_TRAITOR 1
-#define BE_OPERATIVE 2
-#define BE_CHANGELING 4
-#define BE_WIZARD 8
-#define BE_MALF 16
-#define BE_REV 32
-#define BE_ALIEN 64
-#define BE_PAI 128
-#define BE_CULTIST 256
-#define BE_MONKEY 512
-#define BE_NINJA 1024
-
-var/list/be_special_flags = list(
- "Traitor" = BE_TRAITOR,
- "Operative" = BE_OPERATIVE,
- "Changeling" = BE_CHANGELING,
- "Wizard" = BE_WIZARD,
- "Malf AI" = BE_MALF,
- "Revolutionary" = BE_REV,
- "Xenomorph" = BE_ALIEN,
- "pAI" = BE_PAI,
- "Cultist" = BE_CULTIST,
- "Monkey" = BE_MONKEY,
- "Ninja" = BE_NINJA
- )
-
//Database connections
//A connection is established on world creation. Ideally, the connection dies when the server restarts (After feedback logging.).
var/DBConnection/dbcon = new() //Feedback database (New database)
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index 25526b8947..0c130bbf95 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -112,15 +112,11 @@
if(!holder)
src << "Only administrators may use this command."
return
- if (M.nodamage == 1)
- M.nodamage = 0
- usr << "\blue Toggled OFF"
- else
- M.nodamage = 1
- usr << "\blue Toggled ON"
+ M.status_flags ^= GODMODE
+ usr << "\blue Toggled [(M.status_flags & GODMODE) ? "ON" : "OFF"]"
- log_admin("[key_name(usr)] has toggled [key_name(M)]'s nodamage to [(M.nodamage ? "On" : "Off")]")
- message_admins("[key_name_admin(usr)] has toggled [key_name_admin(M)]'s nodamage to [(M.nodamage ? "On" : "Off")]", 1)
+ log_admin("[key_name(usr)] has toggled [key_name(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]")
+ message_admins("[key_name_admin(usr)] has toggled [key_name_admin(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]", 1)
feedback_add_details("admin_verb","GOD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index ed72276c90..0d9a4e3b80 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -16,9 +16,6 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
"infested monkey" = IS_MODE_COMPILED("monkey"), // 9
)
-var/global/list/underwear_m = list("White", "Grey", "Green", "Blue", "Black", "Mankini", "Love-Hearts", "Black2", "Grey2", "Stripey", "Kinky", "None") //Curse whoever made male/female underwear diffrent colours
-var/global/list/underwear_f = list("Red", "White", "Yellow", "Blue", "Black", "Thong", "Babydoll", "Baby-Blue", "Green", "Pink", "Kinky", "None")
-var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel")
var/const/MAX_SAVE_SLOTS = 3
@@ -94,7 +91,8 @@ datum/preferences
if(load_preferences())
load_character()
return
- randomize_name()
+ gender = pick(MALE, FEMALE)
+ real_name = random_name(gender)
/datum/preferences
proc/ShowChoices(mob/user)
@@ -420,63 +418,49 @@ datum/preferences
if("random")
switch(href_list["preference"])
if("name")
- randomize_name()
-
+ real_name = random_name(gender)
if("age")
- age = rand(17, 85)
-
-// if("b_type")
-// b_type = pick( 31;"A+", 7;"A-", 8;"B+", 2;"B-", 2;"AB+", 1;"AB-", 40;"O+", 9;"O-" )
-
+ age = rand(AGE_MIN, AGE_MAX)
if("hair")
- randomize_hair_color("hair")
-
+ r_hair = rand(0,255)
+ g_hair = rand(0,255)
+ b_hair = rand(0,255)
if("h_style")
- randomize_hair(gender)
-
+ h_style = random_hair_style(gender)
if("facial")
- randomize_hair_color("facial")
-
+ r_facial = rand(0,255)
+ g_facial = rand(0,255)
+ b_facial = rand(0,255)
if("f_style")
- randomize_facial(gender)
-
+ f_style = random_facial_hair_style(gender)
if("underwear")
- underwear = rand(1,12)
-
+ underwear = rand(1,underwear_m.len)
if("eyes")
- randomize_eyes_color()
-
+ r_eyes = rand(0,255)
+ g_eyes = rand(0,255)
+ b_eyes = rand(0,255)
if("s_tone")
- randomize_skin_tone()
-
+ s_tone = random_skin_tone()
if("bag")
backbag = rand(1,3)
-
if("all")
gender = pick(MALE,FEMALE)
- randomize_name()
- age = rand(17,85)
+ real_name = random_name(gender)
+ age = rand(AGE_MIN,AGE_MAX)
underwear = rand(1,12)
backbag = rand(1,3)
- randomize_hair_color("hair")
- randomize_hair(gender)
- randomize_hair_color("facial")
- randomize_facial(gender)
- randomize_eyes_color()
- randomize_skin_tone()
- job_civilian_high = 0
- job_civilian_med = 0
- job_civilian_low = 0
- job_medsci_high = 0
- job_medsci_med = 0
- job_medsci_low = 0
- job_engsec_high = 0
- job_engsec_med = 0
- job_engsec_low = 0
- be_special = 0
- be_random_name = 0
- UI_style = "Midnight"
- userandomjob = 1
+ r_hair = rand(0,255)
+ g_hair = rand(0,255)
+ b_hair = rand(0,255)
+ r_facial = r_hair
+ g_facial = g_hair
+ b_facial = b_hair
+ r_eyes = rand(0,255)
+ g_eyes = rand(0,255)
+ b_eyes = rand(0,255)
+ h_style = random_hair_style(gender)
+ f_style = random_facial_hair_style(gender)
+ s_tone = random_skin_tone()
if("input")
switch(href_list["preference"])
@@ -488,20 +472,15 @@ datum/preferences
user << "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and ."
if("age")
- var/new_age = input(user, "Choose your character's age:\n(17-85)", "Character Preference") as num|null
+ var/new_age = input(user, "Choose your character's age:\n([AGE_MIN]-[AGE_MAX])", "Character Preference") as num|null
if(new_age)
- age = max(min(round(text2num(new_age)), 85), 17)
+ age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN)
if("metadata")
var/new_metadata = input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , metadata) as message|null
if(new_metadata)
metadata = sanitize(copytext(new_metadata,1,MAX_MESSAGE_LEN))
-// if("b_type")
-// var/new_b_type = input(user, "Choose your character's blood-type:", "Character Preference") as null|anything in list( "A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-" )
-// if(new_b_type)
-// b_type = new_b_type
-
if("hair")
var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference") as color|null
if(new_hair)
@@ -547,8 +526,7 @@ datum/preferences
if("s_tone")
var/new_s_tone = input(user, "Choose your character's skin-tone:\n(Light 1 - 220 Dark)", "Character Preference") as num|null
if(new_s_tone)
- s_tone = max(min(round(new_s_tone), 220), 1)
- s_tone = -s_tone + 35
+ s_tone = 35 - max(min( round(new_s_tone), 220),1)
if("ooccolor")
var/new_ooccolor = input(user, "Choose your OOC colour:", "Game Preference") as color|null
@@ -618,7 +596,7 @@ datum/preferences
proc/copy_to(mob/living/carbon/human/character, safety = 0)
if(be_random_name)
- randomize_name()
+ real_name = random_name()
if(config.humans_need_surnames)
var/firstspace = findtext(real_name, " ")
@@ -629,14 +607,12 @@ datum/preferences
real_name += "[pick(last_names)]"
character.real_name = real_name
-
+ character.name = character.real_name
if(character.dna)
character.dna.real_name = character.real_name
character.gender = gender
-
character.age = age
-
character.b_type = b_type
character.r_eyes = r_eyes
@@ -656,17 +632,7 @@ datum/preferences
character.h_style = h_style
character.f_style = f_style
- switch(UI_style)
- if("Midnight")
- character.UI = 'icons/mob/screen1_Midnight.dmi'
- if("Orange")
- character.UI = 'icons/mob/screen1_Orange.dmi'
- if("old")
- character.UI = 'icons/mob/screen1_old.dmi'
- else
- character.UI = 'icons/mob/screen1_Midnight.dmi'
-
- if(underwear > 12 || underwear < 1)
+ if(underwear > underwear_m.len || underwear < 1)
underwear = 1 //I'm sure this is 100% unnecessary, but I'm paranoid... sue me.
character.underwear = underwear
diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm
index fc222c6389..44e21d2d24 100644
--- a/code/modules/client/preferences_savefile.dm
+++ b/code/modules/client/preferences_savefile.dm
@@ -19,6 +19,8 @@
fdel(delpath)
break
savefile_version = 8
+
+ if(savefile_version == SAVEFILE_VERSION_MAX) //update successful.
save_preferences()
save_character()
return 1
@@ -129,10 +131,10 @@
//Sanitize
metadata = sanitize_text(metadata, initial(metadata))
real_name = reject_bad_name(real_name)
- if(!real_name) randomize_name()
+ if(!real_name) real_name = random_name()
be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name))
gender = sanitize_gender(gender)
- age = sanitize_integer(age, 17, 85, initial(age))
+ age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age))
r_hair = sanitize_integer(r_hair, 0, 255, initial(r_hair))
g_hair = sanitize_integer(g_hair, 0, 255, initial(g_hair))
b_hair = sanitize_integer(b_hair, 0, 255, initial(b_hair))
diff --git a/code/modules/client/preferences_toggles.dm b/code/modules/client/preferences_toggles.dm
index a043cce871..19df39e337 100644
--- a/code/modules/client/preferences_toggles.dm
+++ b/code/modules/client/preferences_toggles.dm
@@ -118,4 +118,5 @@
if(!role_flag) return
prefs.be_special ^= role_flag
prefs.save_preferences()
- src << "You will [(prefs.be_special & role_flag) ? "now" : "no longer"] be considered for [role] events (where possible)."
\ No newline at end of file
+ src << "You will [(prefs.be_special & role_flag) ? "now" : "no longer"] be considered for [role] events (where possible)."
+ feedback_add_details("admin_verb","TBeSpecial") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm
index 55b9c87e7e..9aca088240 100644
--- a/code/modules/mob/living/carbon/alien/alien.dm
+++ b/code/modules/mob/living/carbon/alien/alien.dm
@@ -21,7 +21,7 @@
var/move_delay_add = 0 // movement delay to add
- status_flags = CANPARALYSE
+ status_flags = CANPARALYSE|CANPUSH
var/heal_rate = 5
var/plasma_rate = 5
@@ -49,7 +49,7 @@
return 2
/mob/living/carbon/alien/updatehealth()
- if(nodamage)
+ if(status_flags & GODMODE)
health = maxHealth
stat = CONSCIOUS
else
diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm
index c88d62f56e..7487ffa631 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm
@@ -37,7 +37,6 @@
for(var/mob/O in viewers(src, null))
O.show_message(text("\green [src] begins to twist and contort!"), 1)
var/mob/living/carbon/alien/humanoid/queen/new_xeno = new (loc)
- new_xeno.UI = UI
mind.transfer_to(new_xeno)
del(src)
else
diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
index 84a9b0c9b8..25f14e434a 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
@@ -6,7 +6,6 @@
var/obj/item/clothing/head/head = null //
var/obj/item/weapon/r_store = null
var/obj/item/weapon/l_store = null
-// var/alien_invis = 0
var/caste = ""
update_icon = 1
diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm
index 4bc1c63fd1..4824afb08b 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/life.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm
@@ -167,7 +167,7 @@
return null
proc/handle_breath(datum/gas_mixture/breath)
- if(nodamage)
+ if(status_flags & GODMODE)
return
if(!breath || (breath.total_moles() == 0))
@@ -459,6 +459,6 @@
del(M)
continue
if(air_master.current_cycle%3==1)
- if(!M.nodamage)
+ if(!(status_flags & GODMODE))
M.adjustBruteLoss(5)
nutrition += 10
diff --git a/code/modules/mob/living/carbon/alien/humanoid/queen.dm b/code/modules/mob/living/carbon/alien/humanoid/queen.dm
index 286fd1dbef..56daa4adde 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/queen.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/queen.dm
@@ -4,7 +4,7 @@
maxHealth = 250
health = 250
icon_state = "alienq_s"
- nopush = 1
+ status_flags = CANPARALYSE
heal_rate = 5
plasma_rate = 20
diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm
index 1dec63e37e..38542f946e 100644
--- a/code/modules/mob/living/carbon/alien/larva/larva.dm
+++ b/code/modules/mob/living/carbon/alien/larva/larva.dm
@@ -37,7 +37,7 @@
src << "\red You fail to push [tmob]'s fat ass out of the way."
now_pushing = 0
return
- if(tmob.nopush)
+ if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
tmob.LAssailant = src
diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm
index e8b51722fb..f72f0be4a7 100644
--- a/code/modules/mob/living/carbon/alien/larva/life.dm
+++ b/code/modules/mob/living/carbon/alien/larva/life.dm
@@ -139,7 +139,7 @@
return null
proc/handle_breath(datum/gas_mixture/breath)
- if(nodamage)
+ if(status_flags & GODMODE)
return
if(!breath || (breath.total_moles() == 0))
@@ -378,6 +378,6 @@
del(M)
continue
if(air_master.current_cycle%3==1)
- if(!M.nodamage)
+ if(!(M.status_flags & GODMODE))
M.adjustBruteLoss(5)
nutrition += 10
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/alien/larva/powers.dm b/code/modules/mob/living/carbon/alien/larva/powers.dm
index 05f8bce917..2fb0625d92 100644
--- a/code/modules/mob/living/carbon/alien/larva/powers.dm
+++ b/code/modules/mob/living/carbon/alien/larva/powers.dm
@@ -44,7 +44,6 @@
new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(loc)
if("Drone")
new_xeno = new /mob/living/carbon/alien/humanoid/drone(loc)
- new_xeno.UI = UI
if(mind) mind.transfer_to(new_xeno)
del(src)
return
diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm
index 9919317fce..4a4ef39516 100644
--- a/code/modules/mob/living/carbon/brain/life.dm
+++ b/code/modules/mob/living/carbon/brain/life.dm
@@ -91,7 +91,7 @@
return //TODO: DEFERRED
proc/handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
- if(nodamage) return
+ if(status_flags & GODMODE) return
if(exposed_temperature > bodytemperature)
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 253389dec4..2205a70b30 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -8,7 +8,7 @@
/mob/living/carbon/human/dummy
real_name = "Test Dummy"
- nodamage = 1
+ status_flags = GODMODE|CANPUSH
@@ -82,7 +82,7 @@
if(prob(99))
now_pushing = 0
return
- if(tmob.nopush)
+ if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm
index 1ebd48aba4..141b249322 100644
--- a/code/modules/mob/living/carbon/human/human_damage.dm
+++ b/code/modules/mob/living/carbon/human/human_damage.dm
@@ -1,6 +1,6 @@
//Updates the mob's health from organs and mob damage variables
/mob/living/carbon/human/updatehealth()
- if(nodamage)
+ if(status_flags & GODMODE)
health = 100
stat = CONSCIOUS
return
@@ -117,7 +117,7 @@
// damage MANY external organs, in random order
/mob/living/carbon/human/take_overall_damage(var/brute, var/burn)
- if(nodamage) return //godmode
+ if(status_flags & GODMODE) return //godmode
var/list/datum/organ/external/parts = get_damageable_organs()
var/update = 0
while(parts.len && (brute>0 || burn>0) )
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index c68db7c4e9..cc6b69fb18 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -329,7 +329,7 @@
proc/handle_breath(datum/gas_mixture/breath)
- if(nodamage || REBREATHER in augmentations)
+ if((status_flags & GODMODE) || REBREATHER in augmentations)
return
if(!breath || (breath.total_moles() == 0) || suiciding)
@@ -1245,7 +1245,7 @@
del(M)
continue
if(air_master.current_cycle%3==1)
- if(!M.nodamage)
+ if(!(M.status_flags & GODMODE))
M.adjustBruteLoss(5)
nutrition += 10
diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm
index 0115c703ae..c78cfeacf3 100644
--- a/code/modules/mob/living/carbon/metroid/metroid.dm
+++ b/code/modules/mob/living/carbon/metroid/metroid.dm
@@ -19,7 +19,7 @@
// canstun and canweaken don't affect metroids because they ignore stun and weakened variables
// for the sake of cleanliness, though, here they are.
- status_flags = CANPARALYSE
+ status_flags = CANPARALYSE|CANPUSH
var/cores = 3 // the number of /obj/item/metroid_core's the metroid has left inside
@@ -681,18 +681,18 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
return
/mob/living/carbon/metroid/updatehealth()
- if (nodamage == 0)
+ if(status_flags & GODMODE)
+ if(istype(src, /mob/living/carbon/metroid/adult))
+ health = 200
+ else
+ health = 150
+ stat = CONSCIOUS
+ else
// metroids can't suffocate unless they suicide. They are also not harmed by fire
if(istype(src, /mob/living/carbon/metroid/adult))
health = 200 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
else
health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
- else
- if(istype(src, /mob/living/carbon/metroid/adult))
- health = 200
- else
- health = 150
- stat = 0
/mob/living/carbon/metroid/proc/get_obstacle_ok(atom/A)
diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm
index 1ae9a904a9..79d3a042ac 100644
--- a/code/modules/mob/living/carbon/monkey/life.dm
+++ b/code/modules/mob/living/carbon/monkey/life.dm
@@ -223,7 +223,7 @@
return null
proc/handle_breath(datum/gas_mixture/breath)
- if(nodamage)
+ if(status_flags & GODMODE)
return
if(!breath || (breath.total_moles() == 0))
@@ -357,7 +357,7 @@
return
proc/handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
- if(nodamage) return
+ if(status_flags & GODMODE) return
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
//adjustFireLoss(2.5*discomfort)
diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm
index 198f5c9665..4dc27b065d 100644
--- a/code/modules/mob/living/carbon/monkey/monkey.dm
+++ b/code/modules/mob/living/carbon/monkey/monkey.dm
@@ -66,7 +66,7 @@
usr << "\red You fail to push [tmob]'s fat ass out of the way."
now_pushing = 0
return
- if(tmob.nopush)
+ if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index c67d3fd0b5..30fe9ffd14 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -8,11 +8,11 @@
/mob/living/proc/updatehealth()
- if(nodamage)
- src.health = 100
- src.stat = 0
+ if(status_flags & GODMODE)
+ health = 100
+ stat = CONSCIOUS
else
- src.health = src.maxHealth - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.getCloneLoss() - src.halloss
+ health = maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - getCloneLoss() - halloss
//This proc is used for mobs which are affected by pressure to calculate the amount of pressure that actually
@@ -75,69 +75,69 @@
return bruteloss
/mob/living/proc/adjustBruteLoss(var/amount)
- if(src.nodamage) return 0 //godmode
+ if(status_flags & GODMODE) return 0 //godmode
bruteloss = min(max(bruteloss + amount, 0),(maxHealth*2))
/mob/living/proc/getOxyLoss()
return oxyloss
/mob/living/proc/adjustOxyLoss(var/amount)
- if(src.nodamage) return 0 //godmode
+ if(status_flags & GODMODE) return 0 //godmode
oxyloss = min(max(oxyloss + amount, 0),(maxHealth*2))
/mob/living/proc/setOxyLoss(var/amount)
- if(src.nodamage) return 0 //godmode
+ if(status_flags & GODMODE) return 0 //godmode
oxyloss = amount
/mob/living/proc/getToxLoss()
return toxloss
/mob/living/proc/adjustToxLoss(var/amount)
- if(src.nodamage) return 0 //godmode
+ if(status_flags & GODMODE) return 0 //godmode
toxloss = min(max(toxloss + amount, 0),(maxHealth*2))
/mob/living/proc/setToxLoss(var/amount)
- if(src.nodamage) return 0 //godmode
+ if(status_flags & GODMODE) return 0 //godmode
toxloss = amount
/mob/living/proc/getFireLoss()
return fireloss
/mob/living/proc/adjustFireLoss(var/amount)
- if(src.nodamage) return 0 //godmode
+ if(status_flags & GODMODE) return 0 //godmode
fireloss = min(max(fireloss + amount, 0),(maxHealth*2))
/mob/living/proc/getCloneLoss()
return cloneloss
/mob/living/proc/adjustCloneLoss(var/amount)
- if(src.nodamage) return 0 //godmode
+ if(status_flags & GODMODE) return 0 //godmode
cloneloss = min(max(cloneloss + amount, 0),(maxHealth*2))
/mob/living/proc/setCloneLoss(var/amount)
- if(src.nodamage) return 0 //godmode
+ if(status_flags & GODMODE) return 0 //godmode
cloneloss = amount
/mob/living/proc/getBrainLoss()
return brainloss
/mob/living/proc/adjustBrainLoss(var/amount)
- if(src.nodamage) return 0 //godmode
+ if(status_flags & GODMODE) return 0 //godmode
brainloss = min(max(brainloss + amount, 0),(maxHealth*2))
/mob/living/proc/setBrainLoss(var/amount)
- if(src.nodamage) return 0 //godmode
+ if(status_flags & GODMODE) return 0 //godmode
brainloss = amount
/mob/living/proc/getHalLoss()
return halloss
/mob/living/proc/adjustHalLoss(var/amount)
- if(src.nodamage) return 0 //godmode
+ if(status_flags & GODMODE) return 0 //godmode
halloss = min(max(halloss + amount, 0),(maxHealth*2))
/mob/living/proc/setHalLoss(var/amount)
- if(src.nodamage) return 0 //godmode
+ if(status_flags & GODMODE) return 0 //godmode
halloss = amount
/mob/living/proc/getMaxHealth()
diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm
index 8f4096b621..b522841e8e 100644
--- a/code/modules/mob/living/silicon/ai/freelook/eye.dm
+++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm
@@ -9,7 +9,7 @@
var/list/visibleCameraChunks = list()
var/mob/living/silicon/ai/ai = null
density = 0
- nodamage = 1 // You can't damage it.
+ status_flags = GODMODE // You can't damage it.
mouse_opacity = 0
// Movement code. Returns 0 to stop air movement from moving it.
diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm
index e9415afa7d..4dc00820b7 100644
--- a/code/modules/mob/living/silicon/ai/life.dm
+++ b/code/modules/mob/living/silicon/ai/life.dm
@@ -171,11 +171,11 @@
theAPC = null
/mob/living/silicon/ai/updatehealth()
- if (src.nodamage == 0)
- if(src.fire_res_on_core)
- src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getBruteLoss()
- else
- src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss()
+ if(status_flags & GODMODE)
+ health = 100
+ stat = CONSCIOUS
else
- src.health = 100
- src.stat = 0
+ if(fire_res_on_core)
+ health = 100 - getOxyLoss() - getToxLoss() - getBruteLoss()
+ else
+ health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
\ No newline at end of file
diff --git a/code/modules/mob/living/silicon/decoy/life.dm b/code/modules/mob/living/silicon/decoy/life.dm
index 07f4a583bd..d62d5d15da 100644
--- a/code/modules/mob/living/silicon/decoy/life.dm
+++ b/code/modules/mob/living/silicon/decoy/life.dm
@@ -8,8 +8,8 @@
/mob/living/silicon/decoy/updatehealth()
- if (src.nodamage == 0)
- src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss()
+ if(status_flags & GODMODE)
+ health = 100
+ stat = CONSCIOUS
else
- src.health = 100
- src.stat = 0
\ No newline at end of file
+ health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
diff --git a/code/modules/mob/living/silicon/pai/life.dm b/code/modules/mob/living/silicon/pai/life.dm
index 77bf4763e4..aaa3f87f3f 100644
--- a/code/modules/mob/living/silicon/pai/life.dm
+++ b/code/modules/mob/living/silicon/pai/life.dm
@@ -19,8 +19,9 @@
src << "Communication circuit reinitialized. Speech and messaging functionality restored."
/mob/living/silicon/pai/updatehealth()
- if(src.nodamage)
- src.health = 100
- src.stat = 0
+ if(status_flags & GODMODE)
+ health = 100
+ stat = CONSCIOUS
else
- src.health = 100 - src.getBruteLoss() - src.getFireLoss()
\ No newline at end of file
+ health = 100 - getBruteLoss() - getFireLoss()
+
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index bd948459fc..0c2c9ffc06 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -155,7 +155,7 @@
hands.icon_state = "medical"
icon_state = "surgeon"
modtype = "Med"
- nopush = 1
+ status_flags &= ~CANPUSH
feedback_inc("cyborg_medical",1)
if("Security")
@@ -165,7 +165,7 @@
icon_state = "bloodhound"
modtype = "Sec"
//speed = -1 Secborgs have nerfed tasers now, so the speed boost is not necessary
- nopush = 1
+ status_flags &= ~CANPUSH
feedback_inc("cyborg_security",1)
if("Engineering")
@@ -327,7 +327,7 @@
usr << "\red You fail to push [tmob]'s fat ass out of the way."
now_pushing = 0
return
- if(tmob.nopush)
+ if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
now_pushing = 0
diff --git a/code/modules/mob/living/simple_animal/clown.dm b/code/modules/mob/living/simple_animal/clown.dm
index 62ae25e1a4..2a32c0988e 100644
--- a/code/modules/mob/living/simple_animal/clown.dm
+++ b/code/modules/mob/living/simple_animal/clown.dm
@@ -185,7 +185,7 @@
src << "\red You fail to push [tmob]'s fat ass out of the way."
now_pushing = 0
return
- if(tmob.nopush)
+ if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm
index 93b7e28610..bb4e6b5da9 100644
--- a/code/modules/mob/living/simple_animal/constructs.dm
+++ b/code/modules/mob/living/simple_animal/constructs.dm
@@ -64,7 +64,7 @@
src << "\red You fail to push [tmob]'s fat ass out of the way."
now_pushing = 0
return
- if(tmob.nopush)
+ if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
@@ -142,7 +142,6 @@
attacktext = "smashes their armoured gauntlet into"
speed = 3
wall_smash = 1
- nopush = 1
attack_sound = 'sound/weapons/punch3.ogg'
/mob/living/simple_animal/construct/armoured/attackby(var/obj/item/O as obj, var/mob/user as mob)
@@ -212,7 +211,6 @@
attacktext = "rams"
speed = 0
wall_smash = 1
- nopush = 1
attack_sound = 'sound/weapons/punch2.ogg'
@@ -236,7 +234,6 @@
attacktext = "brutally crushes"
speed = 5
wall_smash = 1
- nopush = 1
attack_sound = 'sound/weapons/punch4.ogg'
var/energy = 0
var/max_energy = 1000
diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm
index 5cea5a7e34..23d021f10b 100644
--- a/code/modules/mob/living/simple_animal/friendly/corgi.dm
+++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm
@@ -326,7 +326,7 @@
src << "\red You fail to push [tmob]'s fat ass out of the way."
now_pushing = 0
return
- if(tmob.nopush)
+ if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index b2f2f33287..38efa87cd6 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -262,7 +262,7 @@
if("grab")
if (M == src)
return
- if (nopush)
+ if (!(status_flags & CANPUSH))
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, M, src )
@@ -301,7 +301,7 @@
if ("grab")
if(M == src)
return
- if (nopush)
+ if(!(status_flags & CANPUSH))
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, M, src )
diff --git a/code/modules/mob/living/simple_animal/syndicate.dm b/code/modules/mob/living/simple_animal/syndicate.dm
index 6c9e04ee86..9a808037dd 100644
--- a/code/modules/mob/living/simple_animal/syndicate.dm
+++ b/code/modules/mob/living/simple_animal/syndicate.dm
@@ -186,7 +186,7 @@
weapon1 = /obj/item/weapon/melee/energy/sword/red
weapon2 = /obj/item/weapon/shield/energy
attacktext = "slashes"
- nopush = 1
+ status_flags = CANSTUN|CANWEAKEN|CANPARALYSE
/mob/living/simple_animal/syndicate/melee/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(O.force)
@@ -276,7 +276,7 @@
src << "\red You fail to push [tmob]'s fat ass out of the way."
now_pushing = 0
return
- if(tmob.nopush)
+ if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
diff --git a/code/modules/mob/living/simple_animal/worm.dm b/code/modules/mob/living/simple_animal/worm.dm
index 369caf1789..14faaffdd5 100644
--- a/code/modules/mob/living/simple_animal/worm.dm
+++ b/code/modules/mob/living/simple_animal/worm.dm
@@ -5,6 +5,7 @@
icon_state = "spaceworm"
icon_living = "spaceworm"
icon_dead = "spacewormdead"
+ status_flags = 0
speak_emote = list("transmits") //not supposed to be used under AI control
emote_hear = list("transmits") //I'm just adding it so it doesn't runtime if controlled by player who speaks
@@ -29,7 +30,6 @@
a_intent = "harm" //so they don't get pushed around
- nopush = 1
wall_smash = 1
speed = -1
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index 9e9187d7d2..9ae7e9f507 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -10,7 +10,6 @@
//Not in use yet
var/obj/effect/organstructure/organStructure = null
-// var/uses_hud = 0
var/obj/screen/flash = null
var/obj/screen/blind = null
var/obj/screen/hands = null
@@ -61,11 +60,9 @@
var/ear_damage = null //Carbon
var/stuttering = null //Carbon
var/real_name = null
-// var/original_name = null //Original name is only used in ghost chat! Depracated, now used bb
var/blinded = null
var/bhunger = 0 //Carbon
var/ajourn = 0
-// var/rejuv = null
var/druggy = 0 //Carbon
var/confused = 0 //Carbon
var/antitoxs = null
@@ -120,7 +117,6 @@
var/datum/hud/hud_used = null
- //var/list/organs = list( ) //moved to human.
var/list/grabbed_by = list( )
var/list/requests = list( )
@@ -137,10 +133,6 @@
var/job = null//Living
- var/nodamage = 0
-
- var/be_syndicate = 0//This really should be a client variable.
- var/be_random_name = 0
var/const/blindness = 1//Carbon
var/const/deafness = 2//Carbon
var/const/muteness = 4//Carbon
@@ -193,10 +185,7 @@
var/update_icon = 1 //Set to 1 to trigger update_icons() at the next life() call
- var/UI = 'icons/mob/screen1_Midnight.dmi' // For changing the UI from preferences
-
- var/status_flags = 255 //bitflags defining which status effects can be inflicted (replaces canweaken, canstun, etc)
- var/nopush = 0 //Can they be shoved?
+ var/status_flags = CANSTUN|CANWEAKEN|CANPARALYSE|CANPUSH //bitflags defining which status effects can be inflicted (replaces canweaken, canstun, etc)
var/area/lastarea = null
@@ -211,4 +200,4 @@
//Whether or not mobs can understand other mobtypes. These stay in /mob so that ghosts can hear everything.
var/universal_speak = 0 // Set to 1 to enable the mob to speak to everyone -- TLE
var/robot_talk_understand = 0
- var/alien_talk_understand = 0
+ var/alien_talk_understand = 0
\ No newline at end of file
diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm
index f854e92791..9123047e77 100644
--- a/code/modules/mob/mob_transformation_simple.dm
+++ b/code/modules/mob/mob_transformation_simple.dm
@@ -41,7 +41,6 @@
M.real_name = src.real_name
M.dna = src.dna
- M.UI = src.UI
if(mind)
mind.transfer_to(M)
diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm
index f78006417b..53e0486d3a 100644
--- a/code/modules/mob/new_player/new_player.dm
+++ b/code/modules/mob/new_player/new_player.dm
@@ -114,9 +114,9 @@
src << "\blue Now teleporting."
observer.loc = O.loc
if(client.prefs.be_random_name)
- client.prefs.randomize_name()
- observer.name = client.prefs.real_name
- observer.real_name = observer.name
+ client.prefs.real_name = random_name()
+ observer.real_name = client.prefs.real_name
+ observer.name = observer.real_name
observer.key = key
del(src)
@@ -296,7 +296,7 @@
if(ticker.random_players)
new_character.gender = pick(MALE, FEMALE)
- client.prefs.randomize_name()
+ client.prefs.real_name = random_name()
client.prefs.randomize_appearance_for(new_character)
else
client.prefs.copy_to(new_character)
diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm
index c6e3c68761..cd983e8b75 100644
--- a/code/modules/mob/new_player/preferences_setup.dm
+++ b/code/modules/mob/new_player/preferences_setup.dm
@@ -5,171 +5,30 @@ datum/preferences
gender = MALE
else
gender = FEMALE
- randomize_skin_tone()
- randomize_hair(gender)
- randomize_hair_color("hair")
- if(gender == MALE)//only for dudes.
- randomize_facial()
- randomize_hair_color("facial")
- randomize_eyes_color()
- underwear = 1
+ s_tone = random_skin_tone()
+ h_style = random_hair_style(gender)
+ f_style = random_facial_hair_style(gender)
+ r_hair = rand(0,255)
+ g_hair = rand(0,255)
+ b_hair = rand(0,255)
+ r_facial = r_hair
+ g_facial = g_hair
+ b_facial = b_hair
+ r_eyes = rand(0,255)
+ g_eyes = rand(0,255)
+ b_eyes = rand(0,255)
+ underwear = rand(1,underwear_m.len)
backbag = 2
- age = rand(19,35)
+ age = rand(AGE_MIN,AGE_MAX)
copy_to(H,1)
- proc/randomize_name()
- if(gender == MALE)
- real_name = capitalize(pick(first_names_male) + " " + capitalize(pick(last_names)))
- else
- real_name = capitalize(pick(first_names_female) + " " + capitalize(pick(last_names)))
- return
-
- proc/randomize_hair(var/gender)
- h_style = pick(hair_styles_list)
-
-
- proc/randomize_facial() // uncommented, see randomize_hair() for commentation
- f_style = pick(facial_hair_styles_list)
-
- proc/randomize_skin_tone()
- var/tone
-
- var/tmp = pickweight ( list ("caucasian" = 55, "afroamerican" = 15, "african" = 10, "latino" = 10, "albino" = 5, "weird" = 5))
- switch (tmp)
- if ("caucasian")
- tone = -45 + 35
- if ("afroamerican")
- tone = -150 + 35
- if ("african")
- tone = -200 + 35
- if ("latino")
- tone = -90 + 35
- if ("albino")
- tone = -1 + 35
- if ("weird")
- tone = -(rand (1, 220)) + 35
-
- s_tone = min(max(tone + rand (-25, 25), -185), 34)
-
- proc/randomize_hair_color(var/target = "hair")
- if (prob (75) && target == "facial") // Chance to inherit hair color
- r_facial = r_hair
- g_facial = g_hair
- b_facial = b_hair
- return
-
- var/red
- var/green
- var/blue
-
- var/col = pick ("blonde", "black", "chestnut", "copper", "brown", "wheat", "old", "punk")
- switch (col)
- if ("blonde")
- red = 255
- green = 255
- blue = 0
- if ("black")
- red = 0
- green = 0
- blue = 0
- if ("chestnut")
- red = 153
- green = 102
- blue = 51
- if ("copper")
- red = 255
- green = 153
- blue = 0
- if ("brown")
- red = 102
- green = 51
- blue = 0
- if ("wheat")
- red = 255
- green = 255
- blue = 153
- if ("old")
- red = rand (100, 255)
- green = red
- blue = red
- if ("punk")
- red = rand (0, 255)
- green = rand (0, 255)
- blue = rand (0, 255)
-
- red = max(min(red + rand (-25, 25), 255), 0)
- green = max(min(green + rand (-25, 25), 255), 0)
- blue = max(min(blue + rand (-25, 25), 255), 0)
-
- switch(target)
- if ("hair")
- r_hair = red
- g_hair = green
- b_hair = blue
- if ("facial")
- r_facial = red
- g_facial = green
- b_facial = blue
-
- proc/randomize_eyes_color()
- var/red
- var/green
- var/blue
-
- var/col = pick ("black", "grey", "brown", "chestnut", "blue", "lightblue", "green", "albino", "weird")
- switch (col)
- if ("black")
- red = 0
- green = 0
- blue = 0
- if ("grey")
- red = rand (100, 200)
- green = red
- blue = red
- if ("brown")
- red = 102
- green = 51
- blue = 0
- if ("chestnut")
- red = 153
- green = 102
- blue = 0
- if ("blue")
- red = 51
- green = 102
- blue = 204
- if ("lightblue")
- red = 102
- green = 204
- blue = 255
- if ("green")
- red = 0
- green = 102
- blue = 0
- if ("albino")
- red = rand (200, 255)
- green = rand (0, 150)
- blue = rand (0, 150)
- if ("weird")
- red = rand (0, 255)
- green = rand (0, 255)
- blue = rand (0, 255)
-
- red = max(min(red + rand (-25, 25), 255), 0)
- green = max(min(green + rand (-25, 25), 255), 0)
- blue = max(min(blue + rand (-25, 25), 255), 0)
-
- r_eyes = red
- g_eyes = green
- b_eyes = blue
-
- proc/update_preview_icon()
+ proc/update_preview_icon() //seriously. This is horrendous.
del(preview_icon_front)
del(preview_icon_side)
var/icon/preview_icon = null
var/g = "m"
- if (gender == FEMALE) g = "f"
+ if(gender == FEMALE) g = "f"
preview_icon = new /icon('icons/mob/human.dmi', "body_[g]_s")
@@ -492,47 +351,4 @@ datum/preferences
del(preview_icon)
del(eyes_s)
- del(clothes_s)
-
-
-proc/skintone2racedescription(var/tone)
- switch (tone)
- if(30 to INFINITY)
- return "albino"
- if(20 to 30)
- return "pale"
- if(5 to 15)
- return "light skinned"
- if(-10 to 5)
- return "white"
- if(-25 to -10)
- return "tan"
- if(-45 to -25)
- return "darker skinned"
- if(-65 to -45)
- return "brown"
- if(-INFINITY to -65)
- return "black"
-
-
-proc/age2agedescription(var/age)
- switch (age)
- if(0 to 1)
- return "infant"
- if(1 to 3)
- return "toddler"
- if(3 to 13)
- return "child"
- if(13 to 19)
- return "teenager"
- if(19 to 30)
- return "young adult"
- if(30 to 45)
- return "adult"
- if(45 to 60)
- return "middle-aged"
- if(60 to 70)
- return "aging"
- if(70 to INFINITY)
- return "elderly"
-
+ del(clothes_s)
\ No newline at end of file
diff --git a/code/modules/mob/new_player/sprite_accessories.dm b/code/modules/mob/new_player/sprite_accessories.dm
index 31d1b1b192..3f223f30f3 100644
--- a/code/modules/mob/new_player/sprite_accessories.dm
+++ b/code/modules/mob/new_player/sprite_accessories.dm
@@ -26,8 +26,7 @@
var/name // the preview name of the accessory
// Determines if the accessory will be skipped or included in random hair generations
- var/choose_female = 1
- var/choose_male = 1
+ var/gender = NEUTER
/*
@@ -97,12 +96,12 @@
pompadour
name = "Pompadour"
icon_state = "hair_pompadour"
- choose_female = 0
+ gender = MALE
quiff
name = "Quiff"
icon_state = "hair_quiff"
- choose_female = 0
+ gender = MALE
bedhead
name = "Bedhead"
@@ -119,37 +118,37 @@
beehive
name = "Beehive"
icon_state = "hair_beehive"
- choose_male = 0
+ gender = FEMALE
bobcurl
name = "Bobcurl"
icon_state = "hair_bobcurl"
- choose_male = 0
+ gender = FEMALE
bob
name = "Bob"
icon_state = "hair_bobcut"
- choose_male = 0
+ gender = FEMALE
bowl
name = "Bowl"
icon_state = "hair_bowlcut"
- choose_female = 0
+ gender = MALE
buzz
name = "Buzzcut"
icon_state = "hair_buzzcut"
- choose_female = 0
+ gender = MALE
crew
name = "Crewcut"
icon_state = "hair_crewcut"
- choose_female = 0
+ gender = MALE
combover
name = "Combover"
icon_state = "hair_combover"
- choose_female = 0
+ gender = MALE
devillock
name = "Devil Lock"
@@ -158,7 +157,7 @@
dreadlocks
name = "Dreadlocks"
icon_state = "hair_dreads"
- choose_female = 0 // okay.jpg
+ gender = MALE // okay.jpg
curls
name = "Curls"
@@ -175,12 +174,12 @@
afro_large
name = "Big Afro"
icon_state = "hair_bigafro"
- choose_female = 0
+ gender = MALE
sargeant
name = "Flat Top"
icon_state = "hair_sargeant"
- choose_female = 0
+ gender = MALE
emo
name = "Emo"
@@ -197,27 +196,27 @@
hitop
name = "Hitop"
icon_state = "hair_hitop"
- choose_female = 0
+ gender = MALE
mohawk
name = "Mohawk"
icon_state = "hair_d"
- choose_female = 0 // gross
+ gender = MALE // gross
jensen
name = "Adam Jensen Hair"
icon_state = "hair_jensen"
- choose_female = 0
+ gender = MALE
gelled
name = "Gelled Back"
icon_state = "hair_gelled"
- choose_male = 0
+ gender = FEMALE
spiky
name = "Spiky"
icon_state = "hair_spikey"
- choose_female = 0
+ gender = MALE
kusangi
name = "Kusanagi Hair"
@@ -226,32 +225,32 @@
kagami
name = "Pigtails"
icon_state = "hair_kagami"
- choose_male = 0
+ gender = FEMALE
himecut
name = "Hime Cut"
icon_state = "hair_himecut"
- choose_male = 0
+ gender = FEMALE
braid
name = "Floorlength Braid"
icon_state = "hair_braid"
- choose_male = 0
+ gender = FEMALE
odango
name = "Odango"
icon_state = "hair_odango"
- choose_male = 0
+ gender = FEMALE
ombre
name = "Ombre"
icon_state = "hair_ombre"
- choose_male = 0
+ gender = FEMALE
updo
name = "Updo"
icon_state = "hair_updo"
- choose_male = 0
+ gender = FEMALE
skinhead
name = "Skinhead"
@@ -260,12 +259,12 @@
balding
name = "Balding Hair"
icon_state = "hair_e"
- choose_female = 0 // turnoff!
+ gender = MALE // turnoff!
bald
name = "Bald"
icon_state = "bald"
- choose_female = 0
+ gender = MALE
/*
///////////////////////////////////
@@ -278,12 +277,12 @@
/datum/sprite_accessory/facial_hair
icon = 'icons/mob/human_face.dmi'
- choose_female = 0 // barf (unless you're a dorf, dorfs dig chix /w beards :P)
+ gender = MALE // barf (unless you're a dorf, dorfs dig chix /w beards :P)
shaved
name = "Shaved"
icon_state = "bald"
- choose_female = 1 // shaved is the only facial hair on women because why would chicks have beards???
+ gender = NEUTER
watson
name = "Watson Mustache"
@@ -348,9 +347,3 @@
dwarf
name = "Dwarf Beard"
icon_state = "facial_dwarf"
-
-
-
-
-
-
diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm
index d70d6653bf..b99b4c1774 100644
--- a/code/modules/mob/transform_procs.dm
+++ b/code/modules/mob/transform_procs.dm
@@ -24,7 +24,6 @@
del(animation)
O.name = "monkey"
- O.UI = UI
O.dna = dna
dna = null
O.dna.uni_identity = "00600200A00E0110148FC01300B009"
@@ -124,7 +123,6 @@
O.verbs += /mob/living/silicon/ai/proc/ai_roster
O.job = "AI"
- O.UI = UI
O.rename_self("ai",1)
. = O
@@ -156,7 +154,6 @@
O.gender = gender
O.invisibility = 0
- O.UI = UI
if(mind) //TODO
mind.transfer_to(O)
@@ -203,7 +200,6 @@
new_xeno = new /mob/living/carbon/alien/humanoid/drone(loc)
new_xeno.a_intent = "hurt"
- new_xeno.UI = UI
new_xeno.key = key
new_xeno << "You are now an alien."
@@ -240,7 +236,6 @@
else
new_metroid = new /mob/living/carbon/metroid(loc)
new_metroid.a_intent = "hurt"
- new_metroid.UI = UI
new_metroid.key = key
new_metroid << "You are now a Metroid. Skreee!"
@@ -263,7 +258,6 @@
var/mob/living/simple_animal/corgi/new_corgi = new /mob/living/simple_animal/corgi (loc)
new_corgi.a_intent = "hurt"
- new_corgi.UI = UI
new_corgi.key = key
new_corgi << "You are now a Corgi. Yap Yap!"
@@ -298,7 +292,6 @@
new_mob.key = key
new_mob.a_intent = "hurt"
- new_mob.UI = UI
new_mob << "You suddenly feel more... animalistic."
@@ -319,7 +312,6 @@
new_mob.key = key
new_mob.a_intent = "hurt"
- new_mob.UI = UI
new_mob << "You feel more... animalistic"
del(src)
diff --git a/code/setup.dm b/code/setup.dm
index b61fcdd6f4..e8c1239387 100644
--- a/code/setup.dm
+++ b/code/setup.dm
@@ -428,6 +428,8 @@ var/list/global_mutations = list() // list of hidden mutation things
#define CANSTUN 1
#define CANWEAKEN 2
#define CANPARALYSE 4
+#define CANPUSH 8
+#define GODMODE 4096
#define FAKEDEATH 8192 //Replaces stuff like changeling.changeling_fakedeath
#define DISFIGURED 16384 //I'll probably move this elsewhere if I ever get wround to writing a bitflag mob-damage system
#define XENO_HOST 32768 //Tracks whether we're gonna be a baby alien's mummy.
@@ -534,4 +536,79 @@ var/list/TAGGERLOCATIONS = list("Disposals",
#define HOSTILE_STANCE_ATTACKING 4
#define HOSTILE_STANCE_TIRED 5
-#define ROUNDSTART_LOGOUT_REPORT_TIME 6000 //Amount of time (in deciseconds) after the rounds starts, that the player disconnect report is issued.
\ No newline at end of file
+#define ROUNDSTART_LOGOUT_REPORT_TIME 6000 //Amount of time (in deciseconds) after the rounds starts, that the player disconnect report is issued.
+
+
+
+//Please don't edit these values without speaking to Errorage first ~Carn
+//Admin Permissions
+#define R_BUILDMODE 1
+#define R_ADMIN 2
+#define R_BAN 4
+#define R_FUN 8
+#define R_SERVER 16
+#define R_DEBUG 32
+#define R_POSSESS 64
+#define R_PERMISSIONS 128
+#define R_STEALTH 256
+#define R_REJUVINATE 512
+#define R_VAREDIT 1024
+#define R_SOUNDS 2048
+#define R_SPAWN 4096
+
+#define R_MAXPERMISSION 4096 //This holds the maximum value for a permission. It is used in iteration, so keep it updated.
+
+#define R_HOST 65535
+
+//Preference toggles
+#define SOUND_ADMINHELP 1
+#define SOUND_MIDI 2
+#define SOUND_AMBIENCE 4
+#define SOUND_LOBBY 8
+#define CHAT_OOC 16
+#define CHAT_DEAD 32
+#define CHAT_GHOSTEARS 64
+#define CHAT_GHOSTSIGHT 128
+#define CHAT_PRAYER 256
+#define CHAT_RADIO 512
+
+#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_PRAYER|CHAT_RADIO)
+
+#define BE_TRAITOR 1
+#define BE_OPERATIVE 2
+#define BE_CHANGELING 4
+#define BE_WIZARD 8
+#define BE_MALF 16
+#define BE_REV 32
+#define BE_ALIEN 64
+#define BE_PAI 128
+#define BE_CULTIST 256
+#define BE_MONKEY 512
+#define BE_NINJA 1024
+
+var/list/be_special_flags = list(
+ "Traitor" = BE_TRAITOR,
+ "Operative" = BE_OPERATIVE,
+ "Changeling" = BE_CHANGELING,
+ "Wizard" = BE_WIZARD,
+ "Malf AI" = BE_MALF,
+ "Revolutionary" = BE_REV,
+ "Xenomorph" = BE_ALIEN,
+ "pAI" = BE_PAI,
+ "Cultist" = BE_CULTIST,
+ "Monkey" = BE_MONKEY,
+ "Ninja" = BE_NINJA
+ )
+
+#define AGE_MIN 17 //youngest a character can be
+#define AGE_MAX 85 //oldest a character can be
+
+//Languages!
+#define LANGUAGE_HUMAN 1
+#define LANGUAGE_ALIEN 2
+#define LANGUAGE_DOG 4
+#define LANGUAGE_CAT 8
+#define LANGUAGE_BINARY 16
+#define LANGUAGE_OTHER 32768
+
+#define LANGUAGE_UNIVERSAL 65535
\ No newline at end of file
diff --git a/tgstation.dme b/tgstation.dme
index 1c964bb391..5f0bcd4117 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -213,7 +213,6 @@
#define FILE_DIR "interface"
#define FILE_DIR "maps"
#define FILE_DIR "maps/RandomZLevels"
-#define FILE_DIR "maps/RandomZLevels/backup"
#define FILE_DIR "sound"
#define FILE_DIR "sound/AI"
#define FILE_DIR "sound/ambience"
@@ -248,6 +247,7 @@
#include "code\__HELPERS\lists.dm"
#include "code\__HELPERS\logging.dm"
#include "code\__HELPERS\maths.dm"
+#include "code\__HELPERS\mobs.dm"
#include "code\__HELPERS\names.dm"
#include "code\__HELPERS\sanitize_values.dm"
#include "code\__HELPERS\text.dm"