From b2a3405f80a3a4417eae39b1ccb8ddd47f1403e5 Mon Sep 17 00:00:00 2001 From: Mloc-Argent Date: Mon, 19 Aug 2013 23:49:53 +0100 Subject: [PATCH 01/21] Two fixes for dismemberment. Species dismemberment now creates the correctly textured gibs. Decapitation now kills you. Signed-off-by: Mloc-Argent --- code/modules/organs/organ_external.dm | 61 +++++++++++++++++++-------- 1 file changed, 43 insertions(+), 18 deletions(-) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 9390d96218b..7fe936dbab6 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -742,21 +742,40 @@ obj/item/weapon/organ/New(loc, mob/living/carbon/human/H) //Forming icon for the limb //Setting base icon for this mob's race - if(ishuman(H) && H.dna) - var/icon/base = new H.species.icobase - if(base) - icon = base.MakeLying() + var/icon/base + if(H.species && H.species.icobase) + base = icon(H.species.icobase) else - icon_state = initial(icon_state)+"_l" + base = icon('icons/mob/human_races/r_human.dmi') - var/icon/I = new /icon(icon, icon_state) + if(base) + base = base.MakeLying() - //Changing limb's skin tone to match owner - if (H.s_tone >= 0) - I.Blend(rgb(H.s_tone, H.s_tone, H.s_tone), ICON_ADD) - else - I.Blend(rgb(-H.s_tone, -H.s_tone, -H.s_tone), ICON_SUBTRACT) - icon = I + //Changing limb's skin tone to match owner + if(!H.species || H.species.flags & HAS_SKIN_TONE) + if (H.s_tone >= 0) + base.Blend(rgb(H.s_tone, H.s_tone, H.s_tone), ICON_ADD) + else + base.Blend(rgb(-H.s_tone, -H.s_tone, -H.s_tone), ICON_SUBTRACT) + + //this is put here since I can't easially edit the same icon from head's constructor + if(istype(src, /obj/item/weapon/organ/head)) + //Add (facial) hair. + if(H.f_style) + var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[H.f_style] + if(facial_hair_style) + var/icon/facial = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_l") + facial.Blend(rgb(H.r_facial, H.g_facial, H.b_facial), ICON_ADD) + base.Blend(facial, ICON_OVERLAY) + + if(H.h_style && !(H.head && (H.head.flags & BLOCKHEADHAIR))) + var/datum/sprite_accessory/hair_style = hair_styles_list[H.h_style] + if(hair_style) + var/icon/hair = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_l") + hair.Blend(rgb(H.r_hair, H.g_hair, H.b_hair), ICON_ADD) + base.Blend(hair, ICON_OVERLAY) + + icon = base /**************************************************** @@ -794,21 +813,27 @@ obj/item/weapon/organ/head var/brain_op_stage = 0 obj/item/weapon/organ/head/New(loc, mob/living/carbon/human/H) + if(istype(H)) + src.icon_state = H.gender == MALE? "head_m" : "head_f" ..() spawn(5) if(brainmob && brainmob.client) brainmob.client.screen.len = null //clear the hud - if(ishuman(H)) - if(H.gender == FEMALE) - H.icon_state = "head_f" - H.overlays += H.generate_head_icon() + + //if(ishuman(H)) + // if(H.gender == FEMALE) + // H.icon_state = "head_f" + // H.overlays += H.generate_head_icon() transfer_identity(H) - pixel_x = -10 - pixel_y = 6 + name = "[H.real_name]'s head" H.regenerate_icons() + if(H.organs_by_name["chest"]) + var/datum/organ/external/chest/humanchest = H.organs_by_name["chest"] + humanchest.brute_dam = H.maxHealth * 2 + H.death() obj/item/weapon/organ/head/proc/transfer_identity(var/mob/living/carbon/human/H)//Same deal as the regular brain proc. Used for human-->head From de79aa733bc6ccf123611fb8c74b30725a4f8319 Mon Sep 17 00:00:00 2001 From: Mloc Date: Tue, 20 Aug 2013 02:06:56 +0100 Subject: [PATCH 02/21] More dismemberment fixes More elegant solution to gasping torsos. Applying damage to torso will no longer gib everything connected to it. Signed-off-by: Mloc --- code/modules/organs/organ_external.dm | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 7fe936dbab6..02d0e47512a 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -81,10 +81,11 @@ burn *= 0.66 //~2/3 damage for ROBOLIMBS //If limb took enough damage, try to cut or tear it off - if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier) - if( (sharp && prob(5 * brute)) || (brute > 20 && prob(2 * brute)) ) - droplimb(1) - return + if(body_part != UPPER_TORSO && body_part != LOWER_TORSO) //as hilarious as it is, getting hit on the chest too much shouldn't effectively gib you. + if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier) + if( (sharp && prob(5 * brute)) || (brute > 20 && prob(2 * brute)) ) + droplimb(1) + return // High brute damage or sharp objects may damage internal organs if(internal_organs != null) if( (sharp && brute >= 5) || brute >= 10) if(prob(5)) @@ -830,10 +831,7 @@ obj/item/weapon/organ/head/New(loc, mob/living/carbon/human/H) H.regenerate_icons() - if(H.organs_by_name["chest"]) - var/datum/organ/external/chest/humanchest = H.organs_by_name["chest"] - humanchest.brute_dam = H.maxHealth * 2 - + H.stat = 2 H.death() obj/item/weapon/organ/head/proc/transfer_identity(var/mob/living/carbon/human/H)//Same deal as the regular brain proc. Used for human-->head From de6eb16e1aeca7cb62c86394a34ab2b439ac620c Mon Sep 17 00:00:00 2001 From: Erthilo Date: Tue, 20 Aug 2013 10:37:05 +0100 Subject: [PATCH 03/21] Fixes being able to have alien species hair on humans or other species. --- code/__HELPERS/mobs.dm | 43 +++++++++++++++---- code/modules/client/preferences.dm | 4 +- .../mob/new_player/preferences_setup.dm | 4 +- 3 files changed, 39 insertions(+), 12 deletions(-) diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 9156b5b416a..324cfad6323 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -1,14 +1,41 @@ proc/random_hair_style(gender, species = "Human") - switch(gender) - if(MALE) return pick(hair_styles_male_list) - if(FEMALE) return pick(hair_styles_female_list) - else return pick(hair_styles_list) + var/h_style = "Bald" + + var/list/valid_hairstyles = list() + for(var/hairstyle in hair_styles_list) + var/datum/sprite_accessory/S = hair_styles_list[hairstyle] + if(gender == MALE && S.gender == FEMALE) + continue + if(gender == FEMALE && S.gender == MALE) + continue + if( !(species in S.species_allowed)) + continue + valid_hairstyles[hairstyle] = hair_styles_list[hairstyle] + + if(valid_hairstyles.len) + h_style = pick(valid_hairstyles) + + return h_style proc/random_facial_hair_style(gender, species = "Human") - 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) + var/f_style = "Shaved" + + var/list/valid_facialhairstyles = list() + for(var/facialhairstyle in facial_hair_styles_list) + var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle] + if(gender == MALE && S.gender == FEMALE) + continue + if(gender == FEMALE && S.gender == MALE) + continue + if( !(species in S.species_allowed)) + continue + + valid_facialhairstyles[facialhairstyle] = facial_hair_styles_list[facialhairstyle] + + if(valid_facialhairstyles.len) + f_style = pick(valid_facialhairstyles) + + return f_style proc/random_name(gender, species = "Human") if(gender==FEMALE) return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names)) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 597ad94ebfd..cdf4e8e20ff 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -764,13 +764,13 @@ datum/preferences g_hair = rand(0,255) b_hair = rand(0,255) if("h_style") - h_style = random_hair_style(gender) + h_style = random_hair_style(gender, species) if("facial") r_facial = rand(0,255) g_facial = rand(0,255) b_facial = rand(0,255) if("f_style") - f_style = random_facial_hair_style(gender) + f_style = random_facial_hair_style(gender, species) if("underwear") underwear = rand(1,underwear_m.len) ShowChoices(user) diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index 48c6127a4be..86ed744fcca 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -7,8 +7,8 @@ datum/preferences else gender = FEMALE s_tone = random_skin_tone() - h_style = random_hair_style(gender) - f_style = random_facial_hair_style(gender) + h_style = random_hair_style(gender, species) + f_style = random_facial_hair_style(gender, species) randomize_hair_color("hair") randomize_hair_color("facial") randomize_eyes_color() From ec3000ecfb2609cbcc5116169aa640e1d89815b5 Mon Sep 17 00:00:00 2001 From: Erthilo Date: Tue, 20 Aug 2013 10:37:57 +0100 Subject: [PATCH 04/21] Experimentally readding Delete Book verb. --- code/modules/admin/admin_verbs.dm | 6 ++++-- code/modules/library/lib_machines.dm | 28 ++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 7f821923415..717924eb814 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -69,7 +69,8 @@ var/list/admin_verbs_admin = list( /client/proc/check_customitem_activity, /client/proc/man_up, /client/proc/global_man_up, - /client/proc/response_team // Response Teams admin verb + /client/proc/response_team, // Response Teams admin verb + /client/proc/delbook ) var/list/admin_verbs_ban = list( /client/proc/unban_panel, @@ -121,7 +122,8 @@ var/list/admin_verbs_server = list( /datum/admins/proc/toggle_aliens, /datum/admins/proc/toggle_space_ninja, /client/proc/toggle_random_events, - /client/proc/check_customitem_activity + /client/proc/check_customitem_activity, + /client/proc/delbook ) var/list/admin_verbs_debug = list( /client/proc/cmd_admin_list_open_jobs, diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index a47d80309d0..08b0c4f3bdc 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -195,7 +195,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f else dat += "(Order book by SS13BN)

" dat += "" - dat += "" + dat += "" var/DBQuery/query = dbcon_old.NewQuery("SELECT id, author, title, category FROM library") query.Execute() @@ -205,7 +205,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f var/author = query.item[2] var/title = query.item[3] var/category = query.item[4] - dat += "" + dat += "" dat += "
AUTHORTITLECATEGORY
AUTHORTITLECATEGORYID
[author][title][category]\[Order\]
[author][title][category][id]\[Order\]
" dat += "
(Return to main menu)
" if(5) @@ -463,3 +463,27 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f del(O) else ..() + +/client/proc/delbook() + set name = "Delete Book" + set desc = "Permamently deletes a book from the database." + set category = "Admin" + if(!src.holder) + src << "Only administrators may use this command." + return + + var/isbn = input("ISBN number?", "Delete Book") as num | null + if(!isbn) + return + + if(dbcon_old.IsConnected()) + var/DBConnection/dbcon = new() + dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]") + if(!dbcon.IsConnected()) + alert("Connection to Archive has been severed. Aborting.") + else + var/DBQuery/query = dbcon.NewQuery("DELETE FROM library WHERE id=[isbn]") + if(!query.Execute()) + usr << query.ErrorMsg() + dbcon.Disconnect() + log_admin("[usr.key] has deleted the book [isbn]") \ No newline at end of file From 16d9b765995e77713a572d74edc66853cdde9ea3 Mon Sep 17 00:00:00 2001 From: Erthilo Date: Tue, 20 Aug 2013 10:38:57 +0100 Subject: [PATCH 05/21] Allow all mobs to emote. Standardising emote proc. --- .../mob/living/carbon/alien/humanoid/emote.dm | 21 +++++++++++++++--- .../mob/living/carbon/alien/larva/emote.dm | 21 +++++++++++++++--- code/modules/mob/living/carbon/brain/emote.dm | 17 ++++++++++++++ code/modules/mob/living/carbon/human/emote.dm | 4 ++-- .../mob/living/carbon/metroid/emote.dm | 22 ++++++++++++++----- .../modules/mob/living/carbon/monkey/emote.dm | 21 +++++++++++++----- 6 files changed, 87 insertions(+), 19 deletions(-) diff --git a/code/modules/mob/living/carbon/alien/humanoid/emote.dm b/code/modules/mob/living/carbon/alien/humanoid/emote.dm index 087422810c3..71dc56ef402 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/emote.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/emote.dm @@ -1,4 +1,4 @@ -/mob/living/carbon/alien/humanoid/emote(var/act) +/mob/living/carbon/alien/humanoid/emote(var/act,var/m_type=1,var/message = null) var/param = null if (findtext(act, "-", 1, null)) @@ -9,10 +9,25 @@ if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_' act = copytext(act,1,length(act)) var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle) - var/m_type = 1 - var/message switch(act) + if ("me") + if(silent) + return + if (src.client) + if (client.prefs.muted & MUTE_IC) + src << "\red You cannot send IC messages (muted)." + return + if (src.client.handle_spam_prevention(message,MUTE_IC)) + return + if (stat) + return + if(!(message)) + return + return custom_emote(m_type, message) + + if ("custom") + return custom_emote(m_type, message) if("sign") if (!src.restrained()) message = text("The alien signs[].", (text2num(param) ? text(" the number []", text2num(param)) : null)) diff --git a/code/modules/mob/living/carbon/alien/larva/emote.dm b/code/modules/mob/living/carbon/alien/larva/emote.dm index 2be246fe8fb..375c5c6b0c9 100644 --- a/code/modules/mob/living/carbon/alien/larva/emote.dm +++ b/code/modules/mob/living/carbon/alien/larva/emote.dm @@ -1,4 +1,4 @@ -/mob/living/carbon/alien/larva/emote(var/act) +/mob/living/carbon/alien/larva/emote(var/act,var/m_type=1,var/message = null) var/param = null if (findtext(act, "-", 1, null)) @@ -9,10 +9,25 @@ if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_' act = copytext(act,1,length(act)) var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle) - var/m_type = 1 - var/message switch(act) + if ("me") + if(silent) + return + if (src.client) + if (client.prefs.muted & MUTE_IC) + src << "\red You cannot send IC messages (muted)." + return + if (src.client.handle_spam_prevention(message,MUTE_IC)) + return + if (stat) + return + if(!(message)) + return + return custom_emote(m_type, message) + + if ("custom") + return custom_emote(m_type, message) if("sign") if (!src.restrained()) message = text("The alien signs[].", (text2num(param) ? text(" the number []", text2num(param)) : null)) diff --git a/code/modules/mob/living/carbon/brain/emote.dm b/code/modules/mob/living/carbon/brain/emote.dm index 8f83bd390ab..1995ff5e1cc 100644 --- a/code/modules/mob/living/carbon/brain/emote.dm +++ b/code/modules/mob/living/carbon/brain/emote.dm @@ -12,6 +12,23 @@ if(src.stat == DEAD) return switch(act) + if ("me") + if(silent) + return + if (src.client) + if (client.prefs.muted & MUTE_IC) + src << "\red You cannot send IC messages (muted)." + return + if (src.client.handle_spam_prevention(message,MUTE_IC)) + return + if (stat) + return + if(!(message)) + return + return custom_emote(m_type, message) + + if ("custom") + return custom_emote(m_type, message) if ("alarm") src << "You sound an alarm." message = "[src] sounds an alarm." diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 4029fc46444..591e4426e09 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -63,7 +63,7 @@ else alert("Unable to use this emote, must be either hearable or visible.") return - message = "[src] [input]" + return custom_emote(m_type, message) if ("me") if(silent) @@ -78,7 +78,7 @@ return if(!(message)) return - message = "[src] [message]" + return custom_emote(m_type, message) if ("salute") if (!src.buckled) diff --git a/code/modules/mob/living/carbon/metroid/emote.dm b/code/modules/mob/living/carbon/metroid/emote.dm index 0e6688e69ea..2f6f0005396 100644 --- a/code/modules/mob/living/carbon/metroid/emote.dm +++ b/code/modules/mob/living/carbon/metroid/emote.dm @@ -1,4 +1,4 @@ -/mob/living/carbon/slime/emote(var/act, var/type, var/desc) +/mob/living/carbon/slime/emote(var/act,var/m_type=1,var/message = null) if (findtext(act, "-", 1, null)) @@ -9,14 +9,24 @@ if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_' act = copytext(act,1,length(act)) - var/m_type = 1 - var/message - switch(act) if ("me") - return custom_emote(m_type, desc) + if(silent) + return + if (src.client) + if (client.prefs.muted & MUTE_IC) + src << "\red You cannot send IC messages (muted)." + return + if (src.client.handle_spam_prevention(message,MUTE_IC)) + return + if (stat) + return + if(!(message)) + return + return custom_emote(m_type, message) + if ("custom") - return custom_emote(m_type, desc) + return custom_emote(m_type, message) if("moan") message = "The [src.name] moans." m_type = 2 diff --git a/code/modules/mob/living/carbon/monkey/emote.dm b/code/modules/mob/living/carbon/monkey/emote.dm index 8e6c281c781..615fb631d0e 100644 --- a/code/modules/mob/living/carbon/monkey/emote.dm +++ b/code/modules/mob/living/carbon/monkey/emote.dm @@ -1,4 +1,4 @@ -/mob/living/carbon/monkey/emote(var/act, var/type, var/desc) +/mob/living/carbon/monkey/emote(var/act,var/m_type=1,var/message = null) var/param = null if (findtext(act, "-", 1, null)) @@ -10,15 +10,26 @@ act = copytext(act,1,length(act)) var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle) - var/m_type = 1 - var/message switch(act) if ("me") - return custom_emote(m_type, desc) + if(silent) + return + if (src.client) + if (client.prefs.muted & MUTE_IC) + src << "\red You cannot send IC messages (muted)." + return + if (src.client.handle_spam_prevention(message,MUTE_IC)) + return + if (stat) + return + if(!(message)) + return + return custom_emote(m_type, message) + if ("custom") - return custom_emote(m_type, desc) + return custom_emote(m_type, message) if("sign") if (!src.restrained()) From b6900d50fc4a7762b645138cf5ea4cc62c17306f Mon Sep 17 00:00:00 2001 From: Erthilo Date: Tue, 20 Aug 2013 14:20:33 +0100 Subject: [PATCH 06/21] Fixes admins not spawning as aliens on roundstart. --- code/modules/admin/holder2.dm | 2 +- code/modules/mob/new_player/new_player.dm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/admin/holder2.dm b/code/modules/admin/holder2.dm index 2f0a38f985b..34b4cacde93 100644 --- a/code/modules/admin/holder2.dm +++ b/code/modules/admin/holder2.dm @@ -48,7 +48,7 @@ proc/admin_proc() world << "you have enough rights!" NOTE: it checks usr! not src! So if you're checking somebody's rank in a proc which they did not call -you will have to do something like if(client.rights & R_ADMIN) yourself. +you will have to do something like if(client.holder.rights & R_ADMIN) yourself. */ /proc/check_rights(rights_required, show_msg=1) if(usr && usr.client) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 9fa5357d103..c1e808a6bdc 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -347,7 +347,7 @@ if(client.prefs.species) chosen_species = all_species[client.prefs.species] if(chosen_species) - if(is_alien_whitelisted(src, client.prefs.species) || !config.usealienwhitelist || !(chosen_species.flags & WHITELISTED)) + if(is_alien_whitelisted(src, client.prefs.species) || !config.usealienwhitelist || !(chosen_species.flags & WHITELISTED) || (client.holder.rights & R_ADMIN) )// Have to recheck admin due to no usr at roundstart. Latejoins are fine though. new_character.set_species(client.prefs.species) if(chosen_species.language) new_character.add_language(chosen_species.language) From 13caefe13803498dcb435064db63226ac6381822 Mon Sep 17 00:00:00 2001 From: Erthilo Date: Tue, 20 Aug 2013 14:20:46 +0100 Subject: [PATCH 07/21] Uncomments Space Law book content. --- code/game/objects/items/weapons/manuals.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/weapons/manuals.dm b/code/game/objects/items/weapons/manuals.dm index cc2c284adce..0f65736b507 100644 --- a/code/game/objects/items/weapons/manuals.dm +++ b/code/game/objects/items/weapons/manuals.dm @@ -584,7 +584,7 @@ icon_state = "bookSpaceLaw" author = "Nanotrasen" title = "Space Law" - /*dat = {" + dat = {" @@ -594,7 +594,7 @@ - "}*/ + "} /obj/item/weapon/book/manual/engineering_guide name = "Engineering Textbook" From c188e46efcf336bad1173b5e83e885061e80535e Mon Sep 17 00:00:00 2001 From: Mloc-Argent Date: Tue, 20 Aug 2013 21:54:37 +0100 Subject: [PATCH 08/21] Removes alien virus. Signed-off-by: Mloc-Argent --- code/modules/virus2/effect.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/virus2/effect.dm b/code/modules/virus2/effect.dm index b5eaf35452a..b50943549cd 100644 --- a/code/modules/virus2/effect.dm +++ b/code/modules/virus2/effect.dm @@ -48,7 +48,7 @@ proc/deactivate(var/mob/living/carbon/mob) ////////////////////////SPECIAL///////////////////////////////// -/datum/disease2/effect/alien +/*/datum/disease2/effect/alien name = "Unidentified Foreign Body" stage = 4 activate(var/mob/living/carbon/mob,var/multiplier) @@ -62,7 +62,7 @@ new/mob/living/carbon/alien/larva(mob.loc) var/datum/disease2/disease/D = mob:virus2 mob:gib() - del D + del D*/ /datum/disease2/effect/invisible name = "Waiting Syndrome" From d3775875df6c4f4f53bf1f13b43fc31cbeee09ba Mon Sep 17 00:00:00 2001 From: Erthilo Date: Wed, 21 Aug 2013 09:10:21 +0100 Subject: [PATCH 09/21] Revert "Experimentally readding Delete Book verb." This reverts commit ec3000ecfb2609cbcc5116169aa640e1d89815b5. --- code/modules/admin/admin_verbs.dm | 6 ++---- code/modules/library/lib_machines.dm | 28 ++-------------------------- 2 files changed, 4 insertions(+), 30 deletions(-) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 717924eb814..7f821923415 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -69,8 +69,7 @@ var/list/admin_verbs_admin = list( /client/proc/check_customitem_activity, /client/proc/man_up, /client/proc/global_man_up, - /client/proc/response_team, // Response Teams admin verb - /client/proc/delbook + /client/proc/response_team // Response Teams admin verb ) var/list/admin_verbs_ban = list( /client/proc/unban_panel, @@ -122,8 +121,7 @@ var/list/admin_verbs_server = list( /datum/admins/proc/toggle_aliens, /datum/admins/proc/toggle_space_ninja, /client/proc/toggle_random_events, - /client/proc/check_customitem_activity, - /client/proc/delbook + /client/proc/check_customitem_activity ) var/list/admin_verbs_debug = list( /client/proc/cmd_admin_list_open_jobs, diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 08b0c4f3bdc..a47d80309d0 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -195,7 +195,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f else dat += "(Order book by SS13BN)

" dat += "" - dat += "" + dat += "" var/DBQuery/query = dbcon_old.NewQuery("SELECT id, author, title, category FROM library") query.Execute() @@ -205,7 +205,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f var/author = query.item[2] var/title = query.item[3] var/category = query.item[4] - dat += "" + dat += "" dat += "
AUTHORTITLECATEGORYID
AUTHORTITLECATEGORY
[author][title][category][id]\[Order\]
[author][title][category]\[Order\]
" dat += "
(Return to main menu)
" if(5) @@ -463,27 +463,3 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f del(O) else ..() - -/client/proc/delbook() - set name = "Delete Book" - set desc = "Permamently deletes a book from the database." - set category = "Admin" - if(!src.holder) - src << "Only administrators may use this command." - return - - var/isbn = input("ISBN number?", "Delete Book") as num | null - if(!isbn) - return - - if(dbcon_old.IsConnected()) - var/DBConnection/dbcon = new() - dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]") - if(!dbcon.IsConnected()) - alert("Connection to Archive has been severed. Aborting.") - else - var/DBQuery/query = dbcon.NewQuery("DELETE FROM library WHERE id=[isbn]") - if(!query.Execute()) - usr << query.ErrorMsg() - dbcon.Disconnect() - log_admin("[usr.key] has deleted the book [isbn]") \ No newline at end of file From d7fc84b42b565ac6e8b3fcf7d0d895aa9fcfb844 Mon Sep 17 00:00:00 2001 From: Erthilo Date: Wed, 21 Aug 2013 09:59:07 +0100 Subject: [PATCH 10/21] Better gender checks. --- code/__HELPERS/mobs.dm | 12 ++++-------- code/modules/client/preferences.dm | 12 +++--------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 324cfad6323..df7e4f18901 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -4,11 +4,9 @@ proc/random_hair_style(gender, species = "Human") var/list/valid_hairstyles = list() for(var/hairstyle in hair_styles_list) var/datum/sprite_accessory/S = hair_styles_list[hairstyle] - if(gender == MALE && S.gender == FEMALE) + if(gender != S.gender) continue - if(gender == FEMALE && S.gender == MALE) - continue - if( !(species in S.species_allowed)) + if(!(species in S.species_allowed)) continue valid_hairstyles[hairstyle] = hair_styles_list[hairstyle] @@ -23,11 +21,9 @@ proc/random_facial_hair_style(gender, species = "Human") var/list/valid_facialhairstyles = list() for(var/facialhairstyle in facial_hair_styles_list) var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle] - if(gender == MALE && S.gender == FEMALE) + if(gender != S.gender) continue - if(gender == FEMALE && S.gender == MALE) - continue - if( !(species in S.species_allowed)) + if(!(species in S.species_allowed)) continue valid_facialhairstyles[facialhairstyle] = facial_hair_styles_list[facialhairstyle] diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index cdf4e8e20ff..f4cb339f045 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -822,9 +822,7 @@ datum/preferences var/list/valid_hairstyles = list() for(var/hairstyle in hair_styles_list) var/datum/sprite_accessory/S = hair_styles_list[hairstyle] - if(gender == MALE && S.gender == FEMALE) - continue - if(gender == FEMALE && S.gender == MALE) + if(gender != S.gender) continue if( !(species in S.species_allowed)) continue @@ -840,9 +838,7 @@ datum/preferences var/list/valid_facialhairstyles = list() for(var/facialhairstyle in facial_hair_styles_list) var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle] - if(gender == MALE && S.gender == FEMALE) - continue - if(gender == FEMALE && S.gender == MALE) + if(gender != S.gender) continue if( !(species in S.species_allowed)) continue @@ -925,9 +921,7 @@ datum/preferences var/list/valid_facialhairstyles = list() for(var/facialhairstyle in facial_hair_styles_list) var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle] - if(gender == MALE && S.gender == FEMALE) - continue - if(gender == FEMALE && S.gender == MALE) + if(gender != S.gender) continue if( !(species in S.species_allowed)) continue From 740a44b600f77f8342e8c582977e8ef23f673b1f Mon Sep 17 00:00:00 2001 From: Mloc Date: Wed, 21 Aug 2013 20:27:14 +0100 Subject: [PATCH 11/21] Tweaked gitignore. --- .gitignore | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c1e9211514f..e7f44a7c441 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,10 @@ +#ignore misc BYOND files *.log *.int *.rsc *.dmb *.lk -info.json -/config/admins.txt + +#ignore any files in config/, except those in subdirectories. +/config/* +!/config/*/* From 5cee2d2ac2b1d141a26b8d6c8275e1274e4f0e3e Mon Sep 17 00:00:00 2001 From: Mloc-Argent Date: Wed, 21 Aug 2013 23:26:59 +0100 Subject: [PATCH 12/21] Species will no longer draw hair not allowed for them. Mirrors will no longer let you choose disallowed hair styles. --- code/game/objects/structures/mirror.dm | 22 +++++++++++++++++-- .../mob/living/carbon/human/update_icons.dm | 4 ++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index c6a448be97e..0937e72d848 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -22,13 +22,31 @@ //handle facial hair (if necessary) if(H.gender == MALE) - var/new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in facial_hair_styles_list + var/list/species_facial_hair = list() + if(H.species) + for(var/i in facial_hair_styles_list) + var/datum/sprite_accessory/facial_hair/tmp_facial = facial_hair_styles_list[i] + if(H.species.name in tmp_facial.species_allowed) + species_facial_hair += i + else + species_facial_hair = facial_hair_styles_list + + var/new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in species_facial_hair if(userloc != H.loc) return //no tele-grooming if(new_style) H.f_style = new_style //handle normal hair - var/new_style = input(user, "Select a hair style", "Grooming") as null|anything in hair_styles_list + var/list/species_hair = list() + if(H.species) + for(var/i in hair_styles_list) + var/datum/sprite_accessory/hair/tmp_hair = hair_styles_list[i] + if(H.species.name in tmp_hair.species_allowed) + species_hair += i + else + species_hair = hair_styles_list + + var/new_style = input(user, "Select a hair style", "Grooming") as null|anything in species_hair if(userloc != H.loc) return //no tele-grooming if(new_style) H.h_style = new_style diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 1526203f9ba..507f38723a4 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -347,7 +347,7 @@ proc/get_damage_icon_part(damage_state, body_part) if(f_style) var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style] - if(facial_hair_style) + if(facial_hair_style && src.species.name in facial_hair_style.species_allowed) var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s") var/icon/facial_l = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_l") facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD) @@ -357,7 +357,7 @@ proc/get_damage_icon_part(damage_state, body_part) if(h_style && !(head && (head.flags & BLOCKHEADHAIR))) var/datum/sprite_accessory/hair_style = hair_styles_list[h_style] - if(hair_style) + if(hair_style && src.species.name in hair_style.species_allowed) var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s") var/icon/hair_l = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_l") hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD) From 57c1a9a55633725dc2e31993e00dafe27c9b3af0 Mon Sep 17 00:00:00 2001 From: Segrain Date: Thu, 22 Aug 2013 10:11:49 +0300 Subject: [PATCH 13/21] Code cleanup. --- .../structures/crates_lockers/closets.dm | 23 ++--- .../closets/secure/secure_closets.dm | 87 ++++++------------- 2 files changed, 37 insertions(+), 73 deletions(-) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 48c13eb8499..3e23be3bfef 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -119,10 +119,11 @@ density = 1 return 1 -/obj/structure/closet/proc/toggle() - if(src.opened) - return src.close() - return src.open() +/obj/structure/closet/proc/toggle(mob/user as mob) + . = src.opened ? src.close() : src.open() + if(!.) + user << "It won't budge!" + return // this should probably use dump_contents() /obj/structure/closet/ex_act(severity) @@ -180,7 +181,6 @@ if(src.opened) if(istype(W, /obj/item/weapon/grab)) src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet - if(istype(W, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/WT = W if(!WT.remove_fuel(0,user)) @@ -191,15 +191,11 @@ M.show_message("\The [src] has been cut apart by [user] with \the [WT].", 3, "You hear welding.", 2) del(src) return - if(isrobot(user)) return - usr.drop_item() - if(W) W.loc = src.loc - else if(istype(W, /obj/item/weapon/packageWrap)) return else if(istype(W, /obj/item/weapon/weldingtool)) @@ -207,7 +203,7 @@ if(!WT.remove_fuel(0,user)) user << "You need more welding fuel to complete this task." return - src.welded =! src.welded + src.welded = !src.welded src.update_icon() for(var/mob/M in viewers(src)) M.show_message("[src] has been [welded?"welded shut":"unwelded"] by [user.name].", 3, "You hear welding.", 2) @@ -257,9 +253,7 @@ /obj/structure/closet/attack_hand(mob/user as mob) src.add_fingerprint(user) - - if(!src.toggle()) - usr << "It won't budge!" + src.toggle(user) /obj/structure/closet/verb/verb_toggleopen() set src in oview(1) @@ -270,7 +264,8 @@ return if(ishuman(usr)) - src.attack_hand(usr) + src.add_fingerprint(usr) + src.toggle(usr) else usr << "This mob type can't use this verb." diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm index 74062c27759..f6ce5d6d81e 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm @@ -17,16 +17,17 @@ health = 200 /obj/structure/closet/secure_closet/can_open() - ..() if(src.locked) return 0 - return 1 + return ..() /obj/structure/closet/secure_closet/close() - ..() - if(broken) - icon_state = src.icon_off - return 1 + if(..()) + if(broken) + icon_state = src.icon_off + return 1 + else + return 0 /obj/structure/closet/secure_closet/emp_act(severity) for(var/obj/O in src) @@ -44,15 +45,21 @@ ..() /obj/structure/closet/secure_closet/proc/togglelock(mob/user as mob) + if(src.opened) + user << "Close the locker first." + return + if(src.broken) + user << "The locker appears to be broken." + return + if(user.loc == src) + user << "You can't reach the lock from inside." + return if(src.allowed(user)) src.locked = !src.locked for(var/mob/O in viewers(user, 3)) if((O.client && !( O.blinded ))) O << "The locker has been [locked ? null : "un"]locked by [user]." - if(src.locked) - src.icon_state = src.icon_locked - else - src.icon_state = src.icon_closed + update_icon() else user << "Access Denied" @@ -62,15 +69,12 @@ if(src.large) src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet else - user << "The locker is too small to stuff [W] into!" + user << "The locker is too small to stuff [W:affecting] into!" if(isrobot(user)) return user.drop_item() if(W) W.loc = src.loc - else if(src.broken) - user << "The locker appears to be broken." - return else if((istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !src.broken) broken = 1 locked = 0 @@ -88,46 +92,17 @@ else for(var/mob/O in viewers(user, 3)) O.show_message("The locker has been broken by [user] with an electromagnetic card!", 1, "You hear a faint electrical spark.", 2) + else if(istype(W,/obj/item/weapon/packageWrap) || istype(W,/obj/item/weapon/weldingtool)) + return ..(W,user) else - if(istype(W, /obj/item/weapon/weldingtool)) - var/obj/item/weapon/weldingtool/WT = W - if(!WT.remove_fuel(0,user)) - user << "You need more welding fuel to complete this task." - return - src.welded =! src.welded - src.update_icon() - for(var/mob/M in viewers(src)) - M.show_message("[src] has been [welded?"welded shut":"unwelded"] by [user.name].", 3, "You hear welding.", 2) - else - togglelock(user) - -/obj/structure/closet/secure_closet/relaymove(mob/user as mob) - if(user.stat || !isturf(src.loc)) - return - - if(!(src.locked)) - for(var/obj/item/I in src) - I.loc = src.loc - for(var/mob/M in src) - M.loc = src.loc - if(M.client) - M.client.eye = M.client.mob - M.client.perspective = MOB_PERSPECTIVE - src.icon_state = src.icon_opened - src.opened = 1 - else - user << "The locker is locked!" - if(world.time > lastbang+5) - lastbang = world.time - for(var/mob/M in hearers(src, null)) - M << "BANG, bang!" - return + togglelock(user) /obj/structure/closet/secure_closet/attack_hand(mob/user as mob) src.add_fingerprint(user) - - if(!src.toggle()) - return src.attackby(null, user) + if(src.locked) + src.togglelock(user) + else + src.toggle(user) /obj/structure/closet/secure_closet/attack_paw(mob/user as mob) return src.attack_hand(user) @@ -140,15 +115,9 @@ if(!usr.canmove || usr.stat || usr.restrained()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain return - if(get_dist(usr, src) != 1) - return - - if(src.broken) - return - - if (ishuman(usr)) - if (!opened) - togglelock(usr) + if(ishuman(usr)) + src.add_fingerprint(usr) + src.togglelock(usr) else usr << "This mob type can't use this verb." From e20f2e1409f21739d4e702872855105c35c6db37 Mon Sep 17 00:00:00 2001 From: Mloc Date: Thu, 22 Aug 2013 15:12:59 +0100 Subject: [PATCH 14/21] Small fixes to hair. Hair styles that aren't designed to have color shifts will no longer be affected. Balding virus symptom now only applies to humans. Signed-off-by: Mloc --- .../mob/living/carbon/human/update_icons.dm | 12 ++++--- .../mob/new_player/sprite_accessories.dm | 33 ++++++++++++++++++- code/modules/organs/organ_external.dm | 8 +++-- code/modules/virus2/effect.dm | 2 +- 4 files changed, 47 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 507f38723a4..49242c64de1 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -350,8 +350,10 @@ proc/get_damage_icon_part(damage_state, body_part) if(facial_hair_style && src.species.name in facial_hair_style.species_allowed) var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s") var/icon/facial_l = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_l") - facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD) - facial_l.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD) + if(facial_hair_style.do_colouration) + facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD) + facial_l.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD) + face_standing.Blend(facial_s, ICON_OVERLAY) face_lying.Blend(facial_l, ICON_OVERLAY) @@ -360,8 +362,10 @@ proc/get_damage_icon_part(damage_state, body_part) if(hair_style && src.species.name in hair_style.species_allowed) var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s") var/icon/hair_l = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_l") - hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD) - hair_l.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD) + if(hair_style.do_colouration) + hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD) + hair_l.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD) + face_standing.Blend(hair_s, ICON_OVERLAY) face_lying.Blend(hair_l, ICON_OVERLAY) diff --git a/code/modules/mob/new_player/sprite_accessories.dm b/code/modules/mob/new_player/sprite_accessories.dm index c983c3ba23c..55e37a4a4f6 100644 --- a/code/modules/mob/new_player/sprite_accessories.dm +++ b/code/modules/mob/new_player/sprite_accessories.dm @@ -28,9 +28,12 @@ // Determines if the accessory will be skipped or included in random hair generations var/gender = NEUTER - // Restrict some styles to specific races + // Restrict some styles to specific species var/list/species_allowed = list("Human") + // Whether or not the accessory can be affected by colouration + var/do_colouration = 1 + /* //////////////////////////// @@ -386,117 +389,139 @@ name = "Long Unathi Spines" icon_state = "soghun_longspines" species_allowed = list("Unathi") + do_colouration = 0 una_spines_short name = "Short Unathi Spines" icon_state = "soghun_shortspines" species_allowed = list("Unathi") + do_colouration = 0 una_frills_long name = "Long Unathi Frills" icon_state = "soghun_longfrills" species_allowed = list("Unathi") + do_colouration = 0 una_frills_short name = "Short Unathi Frills" icon_state = "soghun_shortfrill" species_allowed = list("Unathi") + do_colouration = 0 una_horns name = "Unathi Horns" icon_state = "soghun_horns" species_allowed = list("Unathi") + do_colouration = 0 skr_tentacle_m name = "Skrell Male Tentacles" icon_state = "skrell_hair_m" species_allowed = list("Skrell") gender = MALE + do_colouration = 0 skr_tentacle_f name = "Skrell Female Tentacles" icon_state = "skrell_hair_f" species_allowed = list("Skrell") gender = FEMALE + do_colouration = 0 skr_gold_m name = "Gold plated Skrell Male Tentacles" icon_state = "skrell_goldhair_m" species_allowed = list("Skrell") gender = MALE + do_colouration = 0 skr_gold_f name = "Gold chained Skrell Female Tentacles" icon_state = "skrell_goldhair_f" species_allowed = list("Skrell") gender = FEMALE + do_colouration = 0 skr_clothtentacle_m name = "Cloth draped Skrell Male Tentacles" icon_state = "skrell_clothhair_m" species_allowed = list("Skrell") gender = MALE + do_colouration = 0 skr_clothtentacle_f name = "Cloth draped Skrell Female Tentacles" icon_state = "skrell_clothhair_f" species_allowed = list("Skrell") gender = FEMALE + do_colouration = 0 taj_ears name = "Tajaran Ears" icon_state = "ears_plain" species_allowed = list("Tajaran") + do_colouration = 0 taj_ears_clean name = "Tajara Clean" icon_state = "hair_clean" species_allowed = list("Tajaran") + do_colouration = 0 taj_ears_shaggy name = "Tajara Shaggy" icon_state = "hair_shaggy" species_allowed = list("Tajaran") + do_colouration = 0 taj_ears_mohawk name = "Tajaran Mohawk" icon_state = "hair_mohawk" species_allowed = list("Tajaran") + do_colouration = 0 taj_ears_plait name = "Tajara Plait" icon_state = "hair_plait" species_allowed = list("Tajaran") + do_colouration = 0 taj_ears_straight name = "Tajara Straight" icon_state = "hair_straight" species_allowed = list("Tajaran") + do_colouration = 0 taj_ears_long name = "Tajara Long" icon_state = "hair_long" species_allowed = list("Tajaran") + do_colouration = 0 taj_ears_rattail name = "Tajara Rat Tail" icon_state = "hair_rattail" species_allowed = list("Tajaran") + do_colouration = 0 taj_ears_spiky name = "Tajara Spiky" icon_state = "hair_tajspiky" species_allowed = list("Tajaran") + do_colouration = 0 taj_ears_messy name = "Tajara Messy" icon_state = "hair_messy" species_allowed = list("Tajaran") + do_colouration = 0 vox_quills_short name = "Short Vox Quills" icon_state = "vox_shortquills" species_allowed = list("Vox") + do_colouration = 0 /datum/sprite_accessory/facial_hair @@ -504,31 +529,37 @@ name = "Tajara Sideburns" icon_state = "facial_mutton" species_allowed = list("Tajaran") + do_colouration = 0 taj_mutton name = "Tajara Mutton" icon_state = "facial_mutton" species_allowed = list("Tajaran") + do_colouration = 0 taj_pencilstache name = "Tajara Pencilstache" icon_state = "facial_pencilstache" species_allowed = list("Tajaran") + do_colouration = 0 taj_moustache name = "Tajara Moustache" icon_state = "facial_moustache" species_allowed = list("Tajaran") + do_colouration = 0 taj_goatee name = "Tajara Goatee" icon_state = "facial_goatee" species_allowed = list("Tajaran") + do_colouration = 0 taj_smallstache name = "Tajara Smallsatche" icon_state = "facial_smallstache" species_allowed = list("Tajaran") + do_colouration = 0 //skin styles - WIP //going to have to re-integrate this with surgery diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 02d0e47512a..de037500009 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -766,14 +766,18 @@ obj/item/weapon/organ/New(loc, mob/living/carbon/human/H) var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[H.f_style] if(facial_hair_style) var/icon/facial = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_l") - facial.Blend(rgb(H.r_facial, H.g_facial, H.b_facial), ICON_ADD) + if(facial_hair_style.do_colouration) + facial.Blend(rgb(H.r_facial, H.g_facial, H.b_facial), ICON_ADD) + base.Blend(facial, ICON_OVERLAY) if(H.h_style && !(H.head && (H.head.flags & BLOCKHEADHAIR))) var/datum/sprite_accessory/hair_style = hair_styles_list[H.h_style] if(hair_style) var/icon/hair = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_l") - hair.Blend(rgb(H.r_hair, H.g_hair, H.b_hair), ICON_ADD) + if(hair_style.do_colouration) + hair.Blend(rgb(H.r_hair, H.g_hair, H.b_hair), ICON_ADD) + base.Blend(hair, ICON_OVERLAY) icon = base diff --git a/code/modules/virus2/effect.dm b/code/modules/virus2/effect.dm index b50943549cd..86b69cc8c15 100644 --- a/code/modules/virus2/effect.dm +++ b/code/modules/virus2/effect.dm @@ -309,7 +309,7 @@ activate(var/mob/living/carbon/mob,var/multiplier) if(istype(mob, /mob/living/carbon/human)) var/mob/living/carbon/human/H = mob - if(!(H.h_style == "Bald") && !(H.h_style == "Balding Hair")) + if(H.species.name == "Human" && !(H.h_style == "Bald") && !(H.h_style == "Balding Hair")) H << "Your hair starts to fall out in clumps..." spawn(50) H.h_style = "Balding Hair" From 1106845cb6d9aab97f47dbf95396c8b2081cdaf2 Mon Sep 17 00:00:00 2001 From: Mloc-Argent Date: Thu, 22 Aug 2013 15:54:28 +0100 Subject: [PATCH 15/21] further checks against mobs being loaded by hydraulic clamps. Signed-off-by: Mloc-Argent --- code/game/mecha/equipment/tools/tools.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index c877084339b..69f88c9c932 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -21,6 +21,9 @@ if(!action_checks(target)) return if(!cargo_holder) return if(istype(target, /obj/structure/stool)) return + for(var/M in target.contents) + if(istype(M, /mob/living) + return if(istype(target,/obj)) var/obj/O = target From acb4a01b9dd052f36678b752db107b5b6bf45b7f Mon Sep 17 00:00:00 2001 From: Segrain Date: Fri, 23 Aug 2013 10:42:29 +0300 Subject: [PATCH 16/21] Compile fix. --- code/game/mecha/equipment/tools/tools.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index 69f88c9c932..a7936f15643 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -22,7 +22,7 @@ if(!cargo_holder) return if(istype(target, /obj/structure/stool)) return for(var/M in target.contents) - if(istype(M, /mob/living) + if(istype(M, /mob/living)) return if(istype(target,/obj)) From cd2922cebec20fa17fc54b4db7c1a0ede523458e Mon Sep 17 00:00:00 2001 From: Segrain Date: Fri, 23 Aug 2013 15:30:49 +0300 Subject: [PATCH 17/21] Name fix. --- code/game/area/Space Station 13 areas.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index fd034fbf5ae..2ff200ae885 100755 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -1140,7 +1140,7 @@ proc/process_ghost_teleport_locs() icon_state = "cloning" /area/medical/sleeper - name = "\improper Emergency" + name = "\improper Medical Treatment Center" icon_state = "exam_room" //Security From 40909bde5370d65df86dd170e6539f44d683552b Mon Sep 17 00:00:00 2001 From: Segrain Date: Fri, 23 Aug 2013 15:31:37 +0300 Subject: [PATCH 18/21] Deconstruction fix. --- code/game/objects/structures/grille.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index c2514a11241..04f18fe3b6a 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -102,7 +102,7 @@ if(iswirecutter(W)) if(!shock(user, 100)) playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1) - new /obj/item/stack/rods(loc) + new /obj/item/stack/rods(loc, 2) del(src) else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored)) if(!shock(user, 90)) From 245d33c1af9c61bedb5009807b6d1a8b85e5a1ed Mon Sep 17 00:00:00 2001 From: Segrain Date: Fri, 23 Aug 2013 15:32:37 +0300 Subject: [PATCH 19/21] Fix for invisible wounds. --- .../mob/living/carbon/human/examine.dm | 71 ++++++++++--------- 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index b8b87003274..e074d9caae8 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -282,40 +282,43 @@ wound_descriptors[this_wound_desc] += W.amount continue wound_descriptors[this_wound_desc] = W.amount - var/list/flavor_text = list() - var/list/no_exclude = list("gaping wound", "big gaping wound", "massive wound", "large bruise",\ - "huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area") - for(var/wound in wound_descriptors) - switch(wound_descriptors[wound]) - if(1) - if(!flavor_text.len) - flavor_text += "[t_He] has[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]" - else - flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]" - if(2) - if(!flavor_text.len) - flavor_text += "[t_He] has[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s" - else - flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s" - if(3 to 5) - if(!flavor_text.len) - flavor_text += "[t_He] has several [wound]s" - else - flavor_text += " several [wound]s" - if(6 to INFINITY) - if(!flavor_text.len) - flavor_text += "[t_He] has a bunch of [wound]s" - else - flavor_text += " a ton of [wound]\s" - var/flavor_text_string = "" - for(var/text = 1, text <= flavor_text.len, text++) - if(text == flavor_text.len && flavor_text.len > 1) - flavor_text_string += ", and" - else if(flavor_text.len > 1 && text > 1) - flavor_text_string += "," - flavor_text_string += flavor_text[text] - flavor_text_string += " on [t_his] [temp.display_name].
" - wound_flavor_text["[temp.display_name]"] = flavor_text_string + if(wound_descriptors.len) + var/list/flavor_text = list() + var/list/no_exclude = list("gaping wound", "big gaping wound", "massive wound", "large bruise",\ + "huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area") + for(var/wound in wound_descriptors) + switch(wound_descriptors[wound]) + if(1) + if(!flavor_text.len) + flavor_text += "[t_He] has[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]" + else + flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]" + if(2) + if(!flavor_text.len) + flavor_text += "[t_He] has[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s" + else + flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s" + if(3 to 5) + if(!flavor_text.len) + flavor_text += "[t_He] has several [wound]s" + else + flavor_text += " several [wound]s" + if(6 to INFINITY) + if(!flavor_text.len) + flavor_text += "[t_He] has a bunch of [wound]s" + else + flavor_text += " a ton of [wound]\s" + var/flavor_text_string = "" + for(var/text = 1, text <= flavor_text.len, text++) + if(text == flavor_text.len && flavor_text.len > 1) + flavor_text_string += ", and" + else if(flavor_text.len > 1 && text > 1) + flavor_text_string += "," + flavor_text_string += flavor_text[text] + flavor_text_string += " on [t_his] [temp.display_name].
" + wound_flavor_text["[temp.display_name]"] = flavor_text_string + else + wound_flavor_text["[temp.display_name]"] = "" if(temp.status & ORGAN_BLEEDING) is_bleeding["[temp.display_name]"] = 1 else From 5f8c8d9cceac1149b4abce74b073025f41bb020a Mon Sep 17 00:00:00 2001 From: Segrain Date: Fri, 23 Aug 2013 15:33:51 +0300 Subject: [PATCH 20/21] Fix for negative damage. --- code/modules/organs/organ_internal.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm index 232fa2bc0e0..a3b1d59fe42 100644 --- a/code/modules/organs/organ_internal.dm +++ b/code/modules/organs/organ_internal.dm @@ -63,6 +63,9 @@ process() if(owner.life_tick % process_accuracy == 0) + if(src.damage < 0) + src.damage = 0 + //High toxins levels are dangerous if(owner.getToxLoss() >= 60 && !owner.reagents.has_reagent("anti_toxin")) //Healthy liver suffers on its own @@ -75,7 +78,7 @@ O.damage += 0.2 * process_accuracy //Detox can heal small amounts of damage - if (owner.reagents.has_reagent("anti_toxin") && src.damage < src.min_bruised_damage) + if (src.damage && src.damage < src.min_bruised_damage && owner.reagents.has_reagent("anti_toxin")) src.damage -= 0.2 * process_accuracy // Damaged liver means some chemicals are very dangerous From e634cd01f2bb9eeb5e62538afca16261ac70beee Mon Sep 17 00:00:00 2001 From: Kilakk Date: Fri, 23 Aug 2013 14:21:08 -0400 Subject: [PATCH 21/21] Fixes #3517 --- code/game/gamemodes/autotraitor/autotraitor.dm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/game/gamemodes/autotraitor/autotraitor.dm b/code/game/gamemodes/autotraitor/autotraitor.dm index de795b19222..a6da766b4e7 100644 --- a/code/game/gamemodes/autotraitor/autotraitor.dm +++ b/code/game/gamemodes/autotraitor/autotraitor.dm @@ -124,7 +124,12 @@ //message_admins("[newtraitor.real_name] is the new Traitor.") forge_traitor_objectives(newtraitor.mind) - equip_traitor(newtraitor) + + if(istype(newtraitor, /mob/living/silicon)) + add_law_zero(newtraitor) + else + equip_traitor(newtraitor) + traitors += newtraitor.mind newtraitor << "\red ATTENTION: \black It is time to pay your debt to the Syndicate..." newtraitor << "You are now a traitor."