From 9391d55e6e940676782b9d8790c1209577ee7311 Mon Sep 17 00:00:00 2001 From: Cael_Aislinn Date: Sat, 1 Dec 2012 18:05:05 +1000 Subject: [PATCH 1/5] compile fix Signed-off-by: Cael_Aislinn --- code/modules/customitems/item_defines.dm | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 6ee0502c886..d81cf5f2ef7 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -529,22 +529,6 @@ desc = "A colorful pair of magboots with the name Susan Harris clearly written on the back." icon = 'custom_items.dmi' icon_state = "atmosmagboots0" - verb/toggle() - set name = "Toggle Magboots" - set category = "Object" - set src in usr - if(src.magpulse) - src.flags &= ~NOSLIP - src.slowdown = SHOES_SLOWDOWN - src.magpulse = 0 - icon_state = "atmosmagboots0" - usr << "You disable the mag-pulse traction system." - else - src.flags |= NOSLIP - src.slowdown = 2 - src.magpulse = 1 - icon_state = "atmosmagboots1" - usr << "You enable the mag-pulse traction system." //////////// Sets //////////// From 7e3f58cea272d49f364f8cae332c225d21ff7500 Mon Sep 17 00:00:00 2001 From: Cael_Aislinn Date: Sat, 1 Dec 2012 18:06:19 +1000 Subject: [PATCH 2/5] CPR optimisations, made hypospray visible on the map Signed-off-by: Cael_Aislinn --- code/modules/mob/living/carbon/carbon.dm | 2 +- .../mob/living/carbon/human/inventory.dm | 4 +- code/modules/mob/new_player/preferences.dm | 112 +++++++++++------- code/modules/mob/screen.dm | 1 + .../reagents/reagent_containers/hypospray.dm | 8 +- 5 files changed, 77 insertions(+), 50 deletions(-) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 2024fefdbc7..1b5c560a3f0 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -192,7 +192,7 @@ swap_hand() /mob/living/carbon/proc/help_shake_act(mob/living/carbon/M) - if (src.health > 0) + if (src.health > config.health_threshold_crit) if(src == M && istype(src, /mob/living/carbon/human)) var/mob/living/carbon/human/H = src src.visible_message( \ diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 614715275e9..1c97d1281a0 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -305,7 +305,7 @@ /obj/effect/equip_e/human/process() if (item) item.add_fingerprint(source) - if (!item) + else switch(place) if("mask") if (!( target.wear_mask )) @@ -542,7 +542,7 @@ It can still be worn/put on as normal. if (target.legcuffed) strip_item = target.legcuffed if("CPR") - if ((target.health >= -99.0 && target.health <= 0)) + if ((target.health >= -99.0 && target.health <= 0)) if ((target.health > config.health_threshold_dead && target.health < config.health_threshold_crit)) var/suff = min(target.getOxyLoss(), 7) target.adjustOxyLoss(-suff) target.updatehealth() diff --git a/code/modules/mob/new_player/preferences.dm b/code/modules/mob/new_player/preferences.dm index 1b236500d61..78eaa36f473 100644 --- a/code/modules/mob/new_player/preferences.dm +++ b/code/modules/mob/new_player/preferences.dm @@ -12,6 +12,7 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set "pAI candidate" = 1, // -- TLE // 7 "cultist" = IS_MODE_COMPILED("cult"), // 8 "infested monkey" = IS_MODE_COMPILED("monkey"), // 9 + "space ninja" = "true", // 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 @@ -28,6 +29,7 @@ var/const/BE_ALIEN =(1<<6) var/const/BE_PAI =(1<<7) var/const/BE_CULTIST =(1<<8) var/const/BE_MONKEY =(1<<9) +var/const/BE_SPACENINJA=(1<<10) var/const/MAX_SAVE_SLOTS = 10 @@ -236,8 +238,8 @@ datum/preferences dat += "Rename slot - " dat += "Reload slot" - //column 1 - dat += "
" + //COLUMN 1 + dat += "
" dat += "Name: " dat += "[real_name] " @@ -263,41 +265,68 @@ datum/preferences dat += "[(sound_adminhelp)?"On":"Off"] toggle
" if(user.client.holder.level >= 5) - dat += "
OOC
" - dat += "Change color
__

" + dat += "
OOC color
__

" - dat += "
Occupation Choices
" - dat += "\tSet Preferences

" + dat += "\tOccupation Preferences
" if(jobban_isbanned(user, "Records")) dat += "You are banned from using character records.
" else - dat += "Character Records

" + dat += "Character Records
" - dat += "Flavor Text
" - dat += "Change
" + dat += "\tSet Skills ([GetSkillClass(used_skillpoints)][used_skillpoints > 0 ? " [used_skillpoints]" : "0"])
" + + dat += "Set Flavor Text
" if(lentext(flavor_text) <= 40) - dat += "[flavor_text]" + if(!lentext(flavor_text)) + dat += "\[...\]" + else + dat += "[flavor_text]" else dat += "[copytext(flavor_text, 1, 37)]...
" dat += "
" - dat += "Skill Choices
" - dat += "\t[GetSkillClass(used_skillpoints)] ([used_skillpoints])
" - dat += "\tSet Skills

" - - //column 2 - dat += "
" //height='300px' - - dat += "" + + //COLUMN 2 + dat += "
Body " - dat += "(®)" + //antag dat += "
" + if(jobban_isbanned(user, "Syndicate")) + dat += "You are banned from antagonist roles." + src.be_special = 0 + else + var/n = 0 + for (var/i in special_roles) + if(special_roles[i]) //if mode is available on the server + if(jobban_isbanned(user, i)) + dat += "Be [i]: \[BANNED]
" + else if(i == "pai candidate") + if(jobban_isbanned(user, "pAI")) + dat += "Be [i]: \[BANNED]
" + else + dat += "Be [i]: [src.be_special&(1<
" + n++ + dat += "
" + dat += "" + + dat += "" - dat += "Limbs: Adjust Limbs
" + dat += "" + + dat += "
" + dat += "Body (®)
" dat += "Species: [species]
" dat += "Blood Type: [b_type]
" - dat += "Skin Tone: [-s_tone + 35]/220
" + dat += "Skin Tone: [-s_tone + 35]/220
" + dat += "Adjust Skin
" + dat += "Adjust Limbs
" + dat += "
Preview
" + dat += "
" + + //display limbs below + var/ind = 0 for(var/name in organ_data) + //world << "[ind] \ [organ_data.len]" var/status = organ_data[name] var/organ_name = null switch(name) @@ -319,11 +348,18 @@ datum/preferences organ_name = "right hand" if(status == "cyborg") - dat += "\tRobotical [organ_name] prothesis
" - if(status == "amputated") - dat += "\tAmputated [organ_name]
" - dat+="
" - + ++ind + if(ind > 1) + dat += ", " + dat += "\tMechanical [organ_name] prothesis" + else if(status == "amputated") + ++ind + if(ind > 1) + dat += ", " + dat += "\tAmputated [organ_name]" + if(ind) + dat += "\[...\]" + dat += "

" if(gender == MALE) dat += "Underwear: [underwear_m[underwear]]
" @@ -332,8 +368,6 @@ datum/preferences dat += "Backpack Type:
[backbaglist[backbag]]
" - dat += "
Preview
" - dat += "
Hair
" dat += "Change Color
__

" dat += "Style: [h_style]
" @@ -345,22 +379,7 @@ datum/preferences dat += "
Eyes
" dat += "Change Color
__
" - dat += "

" - if(jobban_isbanned(user, "Syndicate")) - dat += "You are banned from antagonist roles." - src.be_special = 0 - else - var/n = 0 - for (var/i in special_roles) - if(special_roles[i]) //if mode is available on the server - if(jobban_isbanned(user, i)) - dat += "Be [i]: \[BANNED]
" - else if(i == "pai candidate") - if(jobban_isbanned(user, "pAI")) - dat += "Be [i]: \[BANNED]
" - else - dat += "Be [i]: [src.be_special&(1<
" - n++ + dat += "
" dat += "
" dat += "
" @@ -1021,6 +1040,10 @@ datum/preferences if(second_limb) organ_data[second_limb] = "cyborg" + if("skin_style") + var/skin_style_name = input(user, "Select a new skin style") as null|anything in list("default1", "default2", "default3") + if(!skin_style_name) return + else switch(href_list["preference"]) @@ -1231,6 +1254,7 @@ datum/preferences C.be_alien = be_special & BE_ALIEN C.be_pai = be_special & BE_PAI C.be_syndicate = be_special & BE_TRAITOR + C.be_spaceninja = be_special & BE_SPACENINJA if(isnull(src.ghost_ears)) src.ghost_ears = 1 //There were problems where the default was null before someone saved their profile. C.ghost_ears = src.ghost_ears C.ghost_sight = src.ghost_sight diff --git a/code/modules/mob/screen.dm b/code/modules/mob/screen.dm index 3cc082d1798..640f199ac10 100644 --- a/code/modules/mob/screen.dm +++ b/code/modules/mob/screen.dm @@ -518,6 +518,7 @@ if ((!( L.stat ) && L.canmove && !( L.restrained() ))) var/resisting = 0 for(var/obj/O in L.requests) + L.requests.Remove(O) del(O) resisting++ for(var/obj/item/weapon/grab/G in usr.grabbed_by) diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 48f044c6cc6..830fdaa319e 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -6,8 +6,9 @@ name = "hypospray" desc = "The DeForest Medical Corporation hypospray is a sterile, air-needle autoinjector for rapid administration of drugs to patients." icon = 'icons/obj/syringe.dmi' - item_state = "hypo" + item_state = "hypo1" icon_state = "hypo" + var/original_icon_state = "hypo" amount_per_transfer_from_this = 5 volume = 30 possible_transfer_amounts = null @@ -56,6 +57,7 @@ name = "autoinjector" desc = "A rapid and safe way to administer small amounts of drugs by untrained or trained personnel." icon_state = "autoinjector" + original_icon_state = "autoinjector" item_state = "autoinjector" amount_per_transfer_from_this = 5 volume = 5 @@ -74,9 +76,9 @@ /obj/item/weapon/reagent_containers/hypospray/autoinjector/update_icon() if(reagents.total_volume > 0) - icon_state = "[initial(icon_state)]1" + icon_state = "[original_icon_state]1" else - icon_state = "[initial(icon_state)]0" + icon_state = "[original_icon_state]0" /obj/item/weapon/reagent_containers/hypospray/autoinjector/examine() ..() From c8f603cebdd2543c202acc4df64944009e451871 Mon Sep 17 00:00:00 2001 From: Cael_Aislinn Date: Sat, 1 Dec 2012 18:07:02 +1000 Subject: [PATCH 3/5] WIP stuff for skin styles sprite accessory Signed-off-by: Cael_Aislinn --- code/defines/procs/global_lists.dm | 10 +++++++ .../mob/new_player/sprite_accessories.dm | 26 +++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/code/defines/procs/global_lists.dm b/code/defines/procs/global_lists.dm index 29e9ad28ad5..dda5d364bde 100644 --- a/code/defines/procs/global_lists.dm +++ b/code/defines/procs/global_lists.dm @@ -10,6 +10,7 @@ var/global/list/client_list = list() //List of all clients, based on ckey 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/skin_styles_list = list() //stores /datum/sprite_accessory/skin 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 @@ -26,12 +27,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 + //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 + //Skin Styles - Initialise all /datum/sprite_accessory/skin into a list indexed by the name + //Check to make sure the icon file exists first + paths = typesof(/datum/sprite_accessory/skin) - /datum/sprite_accessory/skin + for(var/path in paths) + var/datum/sprite_accessory/skin/S = new path() + if(fexists("[S.icon].dmi")) + skin_styles_list[S.name] = S + proc/make_player_list()//Global proc that rebuilds the player list for(var/mob/p in player_list)//Clears out everyone that logged out if(!(p.client)) diff --git a/code/modules/mob/new_player/sprite_accessories.dm b/code/modules/mob/new_player/sprite_accessories.dm index 8bf5982eec4..792e1abb143 100644 --- a/code/modules/mob/new_player/sprite_accessories.dm +++ b/code/modules/mob/new_player/sprite_accessories.dm @@ -331,3 +331,29 @@ name = "Tajaran Ears" icon_state = "tajears" species_allowed = list("Tajaran") + +//skin styles - WIP + +/datum/sprite_accessory/skin + human + name = "Default human skin" + icon = "human" + + human_tatt01 + name = "Tatt01 human skin" + icon = "human_tattoo1" + + tajaran + name = "Default tajaran skin" + icon = "tajaran" + species_allowed = list("Tajaran") + + soghun + name = "Default soghun skin" + icon = "soghun" + species_allowed = list("Soghun") + + skrell + name = "Default skrell skin" + icon = "skrell" + species_allowed = list("Skrell") From 3b6c00eae590ca58b26571596a5d88180b5cd906 Mon Sep 17 00:00:00 2001 From: Cael_Aislinn Date: Sat, 1 Dec 2012 18:07:18 +1000 Subject: [PATCH 4/5] made space ninja a toggleable client option Signed-off-by: Cael_Aislinn --- code/game/gamemodes/events/space_ninja.dm | 3 +-- code/modules/client/client defines.dm | 1 + code/modules/mob/dead/observer/observer.dm | 11 +++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/code/game/gamemodes/events/space_ninja.dm b/code/game/gamemodes/events/space_ninja.dm index 2801807815b..7536f9c2315 100644 --- a/code/game/gamemodes/events/space_ninja.dm +++ b/code/game/gamemodes/events/space_ninja.dm @@ -140,13 +140,12 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp var/list/candidates = list() //list of candidate keys for(var/mob/dead/observer/G in player_list) - if(G.client && !G.client.holder && ((G.client.inactivity/10)/60) <= 5) + if(G.client && !G.client.holder && ((G.client.inactivity/10)/60) <= 5 && G.client.be_spaceninja) if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD)) candidates += G.key if(!candidates.len) return candidates = shuffle(candidates)//Incorporating Donkie's list shuffle - //The ninja will be created on the right spawn point or at late join. var/mob/living/carbon/human/new_ninja = create_space_ninja(pick(spawn_list.len ? spawn_list : latejoin )) new_ninja.key = pick(candidates) diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm index ce43e6e1130..a49d6ade13a 100644 --- a/code/modules/client/client defines.dm +++ b/code/modules/client/client defines.dm @@ -26,6 +26,7 @@ var/be_alien = 0 //Check if that guy wants to be an alien var/be_pai = 1 //Consider client when searching for players to recruit as a pAI var/be_syndicate = 1 //Consider client for late-game autotraitor + var/be_spaceninja = 0 var/activeslot = 1 //Default active slot! var/STFU_ghosts //80+ people rounds are fun to admin when text flies faster than airport security var/STFU_radio //80+ people rounds are fun to admin when text flies faster than airport security diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 42e0f89d68a..614aaec63b0 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -257,6 +257,17 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp client.be_pai = 1 src << "You will now be considered a viable candidate when a pAI device requests a new personality, effective until the end of this round." +/mob/dead/observer/verb/toggle_spaceninja_candidate() + set name = "Toggle Be Space Ninja Candidate" + set category = "Ghost" + set desc = "Determines whether you will be a candidate for when a new space ninja spawns. (toggle)" + if(client.be_spaceninja) + client.be_spaceninja = 0 + src << "You are now excluded from space ninja candidate lists until end of round." + else + client.be_spaceninja = 1 + src << "You are now included in space ninja candidate lists until end of round." + /mob/dead/observer/memory() set hidden = 1 src << "\red You are dead! You have no mind to store memory!" From d55170ab973372b200fe78f627c4f46cd73aa8b3 Mon Sep 17 00:00:00 2001 From: Cael_Aislinn Date: Mon, 3 Dec 2012 01:04:14 +1000 Subject: [PATCH 5/5] fixed an extra line added Signed-off-by: Cael_Aislinn --- code/modules/mob/living/carbon/human/inventory.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 1c97d1281a0..90500d0d924 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -542,7 +542,7 @@ It can still be worn/put on as normal. if (target.legcuffed) strip_item = target.legcuffed if("CPR") - if ((target.health >= -99.0 && target.health <= 0)) if ((target.health > config.health_threshold_dead && target.health < config.health_threshold_crit)) + if ((target.health > config.health_threshold_dead && target.health < config.health_threshold_crit)) var/suff = min(target.getOxyLoss(), 7) target.adjustOxyLoss(-suff) target.updatehealth()