From de6eb16e1aeca7cb62c86394a34ab2b439ac620c Mon Sep 17 00:00:00 2001 From: Erthilo Date: Tue, 20 Aug 2013 10:37:05 +0100 Subject: [PATCH 01/12] 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 9156b5b416..324cfad632 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 597ad94ebf..cdf4e8e20f 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 48c6127a4b..86ed744fcc 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 02/12] 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 7f82192341..717924eb81 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 a47d80309d..08b0c4f3bd 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 03/12] 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 087422810c..71dc56ef40 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 2be246fe8f..375c5c6b0c 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 8f83bd390a..1995ff5e1c 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 4029fc4644..591e4426e0 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 0e6688e69e..2f6f000539 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 8e6c281c78..615fb631d0 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 04/12] 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 2f0a38f985..34b4cacde9 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 9fa5357d10..c1e808a6bd 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 05/12] 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 cc2c284adc..0f65736b50 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 d3775875df6c4f4f53bf1f13b43fc31cbeee09ba Mon Sep 17 00:00:00 2001 From: Erthilo Date: Wed, 21 Aug 2013 09:10:21 +0100 Subject: [PATCH 06/12] 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 717924eb81..7f82192341 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 08b0c4f3bd..a47d80309d 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 07/12] 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 324cfad632..df7e4f1890 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 cdf4e8e20f..f4cb339f04 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 08/12] Tweaked gitignore. --- .gitignore | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c1e9211514..e7f44a7c44 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 09/12] 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 c6a448be97..0937e72d84 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 1526203f9b..507f38723a 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 4085aaf49b067f38c6ee0323d8ea6516253833bc Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Thu, 22 Aug 2013 16:03:37 -0700 Subject: [PATCH 10/12] Added two verbs to dionaea nymphs, gave them their own file. --- code/game/machinery/podmen.dm | 2 +- .../modules/mob/living/carbon/monkey/diona.dm | 122 ++++++++++++++++++ .../mob/living/carbon/monkey/monkey.dm | 71 ---------- 3 files changed, 123 insertions(+), 72 deletions(-) create mode 100644 code/modules/mob/living/carbon/monkey/diona.dm diff --git a/code/game/machinery/podmen.dm b/code/game/machinery/podmen.dm index b3be5ce053..7654bda964 100644 --- a/code/game/machinery/podmen.dm +++ b/code/game/machinery/podmen.dm @@ -153,5 +153,5 @@ Growing it to term with nothing injected will grab a ghost from the observers. * if (newname != "") podman.real_name = newname - parent.visible_message("\blue The pod disgorges a fully-formed plant person!") + parent.visible_message("\blue The pod disgorges a fully-formed plant creature!") parent.update_tray() diff --git a/code/modules/mob/living/carbon/monkey/diona.dm b/code/modules/mob/living/carbon/monkey/diona.dm new file mode 100644 index 0000000000..461c5a264f --- /dev/null +++ b/code/modules/mob/living/carbon/monkey/diona.dm @@ -0,0 +1,122 @@ +/* + Tiny babby plant critter plus procs. +*/ + +/mob/living/carbon/monkey/diona + name = "diona nymph" + voice_name = "diona nymph" + speak_emote = list("chirrups") + ico = "nymph" + var/list/donors = list() + var/ready_evolve = 0 + +/mob/living/carbon/monkey/diona/New() + + ..() + gender = NEUTER + dna.mutantrace = "plant" + greaterform = "Diona" + add_language("Rootspeak") + +//Verbs after this point. + +/mob/living/carbon/monkey/diona/verb/fertilize_plant() + + set category = "Diona" + set name = "Fertilize plant" + set desc = "Turn your food into nutrients for plants." + + var/list/trays = list() + for(var/obj/machinery/hydroponics/tray in range(1)) + if(tray.nutrilevel < 10) + trays += tray + + var/obj/machinery/hydroponics/target = input("Select a tray:") as null|anything in trays + + if(!src || !target || target.nutrilevel == 10) return //Sanity check. + + src.nutrition -= ((10-target.nutrilevel)*5) + target.nutrilevel = 10 + src.visible_message("\red [src] secretes a trickle of green liquid from its tail, refilling [target]'s nutrient tray.","\red You secrete a trickle of green liquid from your tail, refilling [target]'s nutrient tray.") + +/mob/living/carbon/monkey/diona/verb/eat_weeds() + + set category = "Diona" + set name = "Eat Weeds" + set desc = "Clean the weeds out of soil or a hydroponics tray." + + var/list/trays = list() + for(var/obj/machinery/hydroponics/tray in range(1)) + if(tray.weedlevel > 0) + trays += tray + + var/obj/machinery/hydroponics/target = input("Select a tray:") as null|anything in trays + + if(!src || !target || target.weedlevel == 0) return //Sanity check. + + src.reagents.add_reagent("nutriment", target.weedlevel) + target.weedlevel = 0 + src.visible_message("\red [src] begins rooting through [target], ripping out weeds and eating them noisily.","\red You begin rooting through [target], ripping out weeds and eating them noisily.") + +/mob/living/carbon/monkey/diona/verb/evolve() + + set category = "Diona" + set name = "Evolve" + set desc = "Grow to a more complex form." + + if(donors.len < 5) + src << "You are not yet ready for your growth..." + return + + if(reagents.get_reagent_amount("nutriment") < 5) + src << "You have not yet consumed enough to grow..." + return + + src.visible_message("\red [src] begins to shift and quiver, and erupts in a shower of shed bark and twigs!","\red You begin to shift and quiver, then erupt in a shower of shed bark and twigs, attaining your adult form!") + var/mob/living/carbon/human/adult = new(loc) + adult.set_species("Diona") + for(var/datum/language/L in languages) + adult.add_language(L.name) + adult.regenerate_icons() + + adult.name = src.name + adult.real_name = src.real_name + adult.ckey = src.ckey + del(src) + +/mob/living/carbon/monkey/diona/verb/steal_blood() + set category = "Diona" + set name = "Steal Blood" + set desc = "Take a blood sample from a suitable donor." + + var/list/choices = list() + for(var/mob/living/C in view(1,src)) + if(C.real_name != real_name) + choices += C + + var/mob/living/M = input(src,"Who do you wish to take a sample from?") in null|choices + + if(!M || !src) return + + if(donors.Find(M.real_name)) + src << "\red That donor offers you nothing new." + return + + src.visible_message("\red [src] flicks out a feeler and neatly steals a sample of [M]'s blood.","\red You flick out a feeler and neatly steal a sample of [M]'s blood.") + donors += M.real_name + spawn(25) + update_progression() + +/mob/living/carbon/monkey/diona/proc/update_progression() + + if(!donors.len) + return + + if(donors.len == 5) + ready_evolve = 1 + src << "\green You feel ready to move on to your next stage of growth." + else if(donors.len == 3) + universal_speak = 1 + src << "\green You feel your awareness expand, and realize you know how to speak to the meat-creatures around you." + else + src << "\green The blood seeps into your small form, and you draw out the echoes of memories and personality from it, working them into your budding mind." \ No newline at end of file diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index ad288d1914..7f109dd7d7 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -34,77 +34,6 @@ ico = "stokkey" uni_append = "044C5D" -/mob/living/carbon/monkey/diona - name = "diona nymph" - voice_name = "diona nymph" - speak_emote = list("chirrups") - ico = "nymph" - var/list/donors = list() - var/ready_evolve = 0 - -/mob/living/carbon/monkey/diona/verb/evolve() - - set category = "Diona" - set name = "Evolve" - set desc = "Grow to a more complex form." - - if(donors.len < 5) - src << "You are not yet ready for your growth..." - return - - if(reagents.get_reagent_amount("nutriment") < 5) - src << "You have not yet consumed enough to grow..." - return - - src.visible_message("\red [src] begins to shift and quiver, and erupts in a shower of shed bark and twigs!","\red You begin to shift and quiver, then erupt in a shower of shed bark and twigs, attaining your adult form!") - var/mob/living/carbon/human/adult = new(loc) - adult.set_species("Diona") - for(var/datum/language/L in languages) - adult.add_language(L.name) - adult.regenerate_icons() - - adult.name = src.name - adult.real_name = src.real_name - adult.ckey = src.ckey - del(src) - -/mob/living/carbon/monkey/diona/verb/steal_blood() - set category = "Diona" - set name = "Steal Blood" - set desc = "Take a blood sample from a suitable donor." - - var/list/choices = list() - for(var/mob/living/C in view(1,src)) - if(C.real_name != real_name) - choices += C - - var/mob/living/M = input(src,"Who do you wish to take a sample from?") in null|choices - - if(!M || !src) return - - if(donors.Find(M.real_name)) - src << "\red That donor offers you nothing new." - return - - src.visible_message("\red [src] flicks out a feeler and neatly steals a sample of [M]'s blood.","\red You flick out a feeler and neatly steal a sample of [M]'s blood.") - donors += M.real_name - spawn(25) - update_progression() - -/mob/living/carbon/monkey/diona/proc/update_progression() - - if(!donors.len) - return - - if(donors.len == 5) - ready_evolve = 1 - src << "\green You feel ready to move on to your next stage of growth." - else if(donors.len == 3) - universal_speak = 1 - src << "\green You feel your awareness expand, and realize you know how to speak to the meat-creatures around you." - else - src << "\green The blood seeps into your small form, and you draw out the echoes of memories and personality from it, working them into your budding mind." - /mob/living/carbon/monkey/New() var/datum/reagents/R = new/datum/reagents(1000) reagents = R From b20de202abbdd61f350e0b341aa0a95607c6aba3 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Thu, 22 Aug 2013 16:03:49 -0700 Subject: [PATCH 11/12] Forgot the DME for the previous commit. --- baystation12.dme | 1 + 1 file changed, 1 insertion(+) diff --git a/baystation12.dme b/baystation12.dme index acb23ee24f..bb2c31042a 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -949,6 +949,7 @@ #include "code\modules\mob\living\carbon\metroid\subtypes.dm" #include "code\modules\mob\living\carbon\metroid\update_icons.dm" #include "code\modules\mob\living\carbon\monkey\death.dm" +#include "code\modules\mob\living\carbon\monkey\diona.dm" #include "code\modules\mob\living\carbon\monkey\emote.dm" #include "code\modules\mob\living\carbon\monkey\examine.dm" #include "code\modules\mob\living\carbon\monkey\hud.dm" From 75896a8824233a3c240ee342f3acf47f01305b71 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Thu, 22 Aug 2013 16:10:06 -0700 Subject: [PATCH 12/12] Fixes from Ravensdale to robot code, unsure of issue numbers. --- code/game/objects/items/robot/robot_upgrades.dm | 1 - code/modules/mob/living/silicon/robot/robot.dm | 14 ++++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 5011f5346e..7a76812b34 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -30,7 +30,6 @@ R.uneq_all() R.hands.icon_state = "nomod" R.icon_state = "robot" - R.base_icon = "robot" del(R.module) R.module = null R.camera.network.Remove(list("Medical","MINE")) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index ab6739d744..818cd06cb7 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -9,7 +9,6 @@ var/sight_mode = 0 var/custom_name = "" - var/base_icon var/custom_sprite = 0 //Due to all the sprites involved, a var for our custom borgs may be best var/crisis //Admin-settable for combat module use. @@ -232,7 +231,6 @@ choose_icon(6,module_sprites) radio.config(channels) - base_icon = icon_state /mob/living/silicon/robot/proc/updatename(var/prefix as text) if(prefix) @@ -1007,9 +1005,11 @@ if(module_active && istype(module_active,/obj/item/borg/combat/shield)) overlays += "[icon_state]-shield" - if(base_icon) + if(modtype == "Combat") + var/base_icon = "" + base_icon = icon_state if(module_active && istype(module_active,/obj/item/borg/combat/mobility)) - icon_state = "[base_icon]-roll" + icon_state = "[icon_state]-roll" else icon_state = base_icon return @@ -1229,8 +1229,8 @@ var/icontype - if (src.name == "Lucy" && src.ckey == "rowtree") - icontype = "Lucy" + if (custom_sprite == 1) + icontype = "Custom" triesleft = 0 else icontype = input("Select an icon! [triesleft ? "You have [triesleft] more chances." : "This is your last try."]", "Robot", null, null) in module_sprites @@ -1240,11 +1240,9 @@ else src << "Something is badly wrong with the sprite selection. Harass a coder." icon_state = module_sprites[1] - base_icon = icon_state return overlays -= "eyes" - base_icon = icon_state updateicon() if (triesleft >= 1)