Merge pull request #3568 from Zuhayr/dev

Fixes from master, diona verbs, Raven's fixes.
This commit is contained in:
Mloc
2013-08-22 08:02:42 -07:00
21 changed files with 286 additions and 131 deletions
+5 -2
View File
@@ -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/*/*
+1
View File
@@ -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"
+31 -8
View File
@@ -1,14 +1,37 @@
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 != S.gender)
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 != S.gender)
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))
+1 -1
View File
@@ -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()
@@ -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"))
+2 -2
View File
@@ -584,7 +584,7 @@
icon_state = "bookSpaceLaw"
author = "Nanotrasen"
title = "Space Law"
/*dat = {"
dat = {"
<html><head>
</head>
@@ -594,7 +594,7 @@
</html>
"}*/
"}
/obj/item/weapon/book/manual/engineering_guide
name = "Engineering Textbook"
+20 -2
View File
@@ -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
+1 -1
View File
@@ -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)
+5 -11
View File
@@ -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)
@@ -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
@@ -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("<B>The alien</B> signs[].", (text2num(param) ? text(" the number []", text2num(param)) : null))
@@ -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("<B>The alien</B> signs[].", (text2num(param) ? text(" the number []", text2num(param)) : null))
@@ -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 = "<B>[src]</B> sounds an alarm."
@@ -63,7 +63,7 @@
else
alert("Unable to use this emote, must be either hearable or visible.")
return
message = "<B>[src]</B> [input]"
return custom_emote(m_type, message)
if ("me")
if(silent)
@@ -78,7 +78,7 @@
return
if(!(message))
return
message = "<B>[src]</B> [message]"
return custom_emote(m_type, message)
if ("salute")
if (!src.buckled)
@@ -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)
@@ -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 = "<B>The [src.name]</B> moans."
m_type = 2
@@ -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."
+16 -5
View File
@@ -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())
@@ -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
@@ -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)
+1 -1
View File
@@ -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)
@@ -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()