Merge branch 'bleeding-edge-freeze' of https://github.com/Baystation12/Baystation12

This commit is contained in:
Zuhayr
2013-07-01 08:22:25 -07:00
10 changed files with 156 additions and 108 deletions
+19 -18
View File
@@ -10,7 +10,7 @@
var/turf/target_turf
var/mob/target_mob
var/obj/machinery/apiary/parent
pass_flags = PASSGRILLE|PASSTABLE
pass_flags = PASSTABLE
turns_per_move = 6
var/obj/machinery/hydroponics/my_hydrotray
@@ -29,21 +29,19 @@
if(stat == CONSCIOUS)
//if we're strong enough, sting some people
var/overrun = strength - 5 + feral / 2
if(prob(max( overrun * 10 + feral * 10, 0)))
var/mob/living/carbon/human/M = pick(range(1,src))
if(M)
var/sting_prob = 100
var/mob/living/carbon/human/M = target_mob
var/sting_prob = 100 // Bees will always try to sting.
if(M in view(src,1)) // Can I see my target?
if(prob(max(feral * 10, 0))) // Am I mad enough to want to sting? And yes, when I initially appear, I AM mad enough
var/obj/item/clothing/worn_suit = M.wear_suit
var/obj/item/clothing/worn_helmet = M.head
if(worn_suit)
sting_prob -= worn_suit.armor["bio"]
if(worn_suit) // Are you wearing clothes?
sting_prob -= min(worn_suit.armor["bio"],70) // Is it sealed? I can't get to 70% of your body.
if(worn_helmet)
sting_prob -= worn_helmet.armor["bio"]
if( prob(sting_prob) && (M.stat == CONSCIOUS || (M.stat == UNCONSCIOUS && prob(25))) )
M.apply_damage(overrun / 2 + mut / 2, BRUTE)
M.apply_damage(overrun / 2 + toxic / 2, TOX)
sting_prob -= min(worn_helmet.armor["bio"],30) // Is your helmet sealed? I can't get to 30% of your body.
if( prob(sting_prob) && (M.stat == CONSCIOUS || (M.stat == UNCONSCIOUS && prob(25))) ) // Try to sting! If you're not moving, think about stinging.
M.apply_damage(min(strength,2)+mut, BRUTE) // Stinging. The more mutated I am, the harder I sting.
M.apply_damage((round(feral/5,1)*(max((round(strength/10,1)),1)))+toxic, TOX) // Bee venom based on how angry I am and how many there are of me!
M << "\red You have been stung!"
M.flash_pain()
@@ -134,14 +132,17 @@
if(target_mob in view(src,7))
target_turf = get_turf(target_mob)
wander = 0
else
for(var/mob/living/carbon/M in view(src,7))
target_mob = M
else // My target's gone! But I might still be pissed! You there. You look like a good stinging target!
for(var/mob/living/carbon/G in view(src,7))
target_mob = G
break
if(target_turf)
Move(get_step(src, get_dir(src,target_turf)))
if (!(DirBlocked(get_step(src, get_dir(src,target_turf)),get_dir(src,target_turf)))) // Check for windows and doors!
Move(get_step(src, get_dir(src,target_turf)))
if (prob(0.1))
src.visible_message("\blue The bees swarm after [target_mob]!")
if(src.loc == target_turf)
target_turf = null
wander = 1
+8 -5
View File
@@ -87,7 +87,7 @@
if(harvestable_honey > 0)
if(health > 0)
user << "\red You begin to harvest the honey. The bees don't seem to like it."
angry_swarm()
angry_swarm(user)
else
user << "\blue You begin to harvest the honey."
if(do_after(user,50))
@@ -97,7 +97,7 @@
else
user << "\blue There is no honey left to harvest."
else
angry_swarm()
angry_swarm(user)
..()
/obj/machinery/apiary/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
@@ -171,16 +171,19 @@
//find some plants, harvest
for(var/obj/machinery/hydroponics/H in view(7, src))
if(H.planted && !H.dead && H.myseed && prob(owned_bee_swarms.len * 10))
src.nutrilevel++
H.nutrilevel++
if(mut < H.mutmod - 1)
mut = H.mutmod - 1
else if(mut > H.mutmod - 1)
H.mutmod = mut
//flowers give us pollen (nutrients)
/* - All plants should be giving nutrients to the hive.
if(H.myseed.type == /obj/item/seeds/harebell || H.myseed.type == /obj/item/seeds/sunflowerseed)
src.nutrilevel++
H.nutrilevel++
*/
//have a few beneficial effects on nearby plants
if(prob(10))
H.lastcycle -= 5
@@ -206,7 +209,7 @@
/obj/machinery/apiary/proc/angry_swarm(var/mob/M)
for(var/mob/living/simple_animal/bee/B in owned_bee_swarms)
B.feral = 50
B.feral = 25
B.target_mob = M
swarming = 25
@@ -219,7 +222,7 @@
var/mob/living/simple_animal/bee/B = new(get_turf(src), src)
B.target_mob = M
B.strength = spawn_strength
B.feral = 5
B.feral = 25
B.mut = mut
B.toxic = toxic
bees_in_hive -= spawn_strength
+3 -9
View File
@@ -34,6 +34,7 @@
icon_state = "bodybag_closed"
icon_closed = "bodybag_closed"
icon_opened = "bodybag_open"
var/item_path = /obj/item/bodybag
density = 0
@@ -74,10 +75,7 @@
if(opened) return 0
if(contents.len) return 0
visible_message("[usr] folds up the [src.name]")
if(istype(src,/obj/structure/closet/body_bag/cryobag))
new/obj/item/bodybag/cryobag(get_turf(src))
else
new/obj/item/bodybag(get_turf(src))
new item_path(get_turf(src))
spawn(0)
del(src)
return
@@ -106,11 +104,7 @@
name = "stasis bag"
desc = "A non-reusable plastic bag designed for the preservation of an occupant's brain by stasis."
icon = 'icons/obj/cryobag.dmi'
icon_state = "bodybag_closed"
icon_closed = "bodybag_closed"
icon_opened = "bodybag_open"
density = 0
item_path = /obj/item/bodybag/cryobag
var/used = 0
open()
+28
View File
@@ -64,6 +64,7 @@ datum/preferences
var/g_eyes = 0 //Eye color
var/b_eyes = 0 //Eye color
var/species = "Human"
var/language = "None" //Secondary language
//Mob preview
var/icon/preview_icon_front = null
@@ -251,6 +252,7 @@ datum/preferences
dat += "(<a href='?_src_=prefs;preference=all;task=random'>&reg;</A>)"
dat += "<br>"
dat += "Species: <a href='byond://?src=\ref[user];preference=species;task=input'>[species]</a><br>"
dat += "Secondary Language:<br><a href='byond://?src=\ref[user];preference=language;task=input'>[language]</a><br>"
dat += "Blood Type: <a href='byond://?src=\ref[user];preference=b_type;task=input'>[b_type]</a><br>"
dat += "Skin Tone: <a href='?_src_=prefs;preference=s_tone;task=input'>[-s_tone + 35]/220<br></a>"
//dat += "Skin pattern: <a href='byond://?src=\ref[user];preference=skin_style;task=input'>Adjust</a><br>"
@@ -851,6 +853,32 @@ datum/preferences
s_tone = 0
if("language")
var/list/new_language = list("None")
var/language_whitelisted = 0
if(config.usealienwhitelist)
if(is_alien_whitelisted(user, "Language_Soghun"))
new_language += "Unathi"
language_whitelisted = 1
if(is_alien_whitelisted(user, "Language_Tajaran"))
new_language += "Tajaran"
language_whitelisted = 1
if(is_alien_whitelisted(user, "Language_Skrell"))
new_language += "Skrell"
language_whitelisted = 1
if(is_alien_whitelisted(user, "Language_Kidan"))
new_language += "Kidan"
language_whitelisted = 1
if(!language_whitelisted)
alert(user, "You cannot select a secondary language as you need to be whitelisted. If you wish to enable a language, post in the Alien Whitelist forums.")
else
new_language += "Unathi"
new_language += "Tajaran"
new_language += "Skrell"
new_language += "Kidan"
language = input("Please select a secondary language", "Character Generation", null) in new_language
if("metadata")
var/new_metadata = input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , metadata) as message|null
+4 -1
View File
@@ -1,5 +1,5 @@
#define SAVEFILE_VERSION_MIN 8
#define SAVEFILE_VERSION_MAX 9
#define SAVEFILE_VERSION_MAX 10
//handles converting savefiles to new formats
//MAKE SURE YOU KEEP THIS UP TO DATE!
@@ -103,6 +103,7 @@
S["gender"] >> gender
S["age"] >> age
S["species"] >> species
S["language"] >> language
//colors to be consolidated into hex strings (requires some work with dna code)
S["hair_red"] >> r_hair
@@ -152,6 +153,7 @@
metadata = sanitize_text(metadata, initial(metadata))
real_name = reject_bad_name(real_name)
if(isnull(species)) species = "Human"
if(isnull(language)) language = "None"
if(isnull(nanotrasen_relation)) nanotrasen_relation = initial(nanotrasen_relation)
if(!real_name) real_name = random_name()
be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name))
@@ -206,6 +208,7 @@
S["gender"] << gender
S["age"] << age
S["species"] << species
S["language"] << language
S["hair_red"] << r_hair
S["hair_green"] << g_hair
S["hair_blue"] << b_hair
@@ -23,6 +23,8 @@ emp_act
if(C.body_parts_covered & select_area.body_part) // Is that body part being targeted covered?
P.agony=P.agony*C.siemens_coefficient
apply_effect(P.agony,AGONY,0)
flash_pain()
src <<"\red You have been shot!"
del P
/* Commenting out new-old taser nerf.
if(C.siemens_coefficient == 0) //If so, is that clothing shock proof?
@@ -41,7 +43,7 @@ emp_act
// END TASER NERF
if(wear_suit && istype(wear_suit, /obj/item/clothing/suit/armor/laserproof))
if(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam))
if(istype(P, /obj/item/projectile/energy) || !(istype(P, /obj/item/projectile/energy/electrode)) || istype(P, /obj/item/projectile/beam))
var/reflectchance = 40 - round(P.damage/3)
if(!(def_zone in list("chest", "groin")))
reflectchance /= 2
+4 -4
View File
@@ -978,10 +978,10 @@
blinded = 1
stat = UNCONSCIOUS
if(halloss > 0)
adjustHalLoss(-6)
adjustHalLoss(-3)
else if(sleeping)
handle_dreams()
adjustHalLoss(-6)
adjustHalLoss(-3)
if (mind)
if((mind.active && client != null) || immune_to_ssd) //This also checks whether a client is connected, if not, sleep is not reduced.
sleeping = max(sleeping-1, 0)
@@ -992,12 +992,12 @@
emote("snore")
else if(resting)
if(halloss > 0)
adjustHalLoss(-6)
adjustHalLoss(-3)
//CONSCIOUS
else
stat = CONSCIOUS
if(halloss > 0)
adjustHalLoss(-2)
adjustHalLoss(-1)
//Eyes
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
@@ -450,10 +450,10 @@
blinded = 1
stat = UNCONSCIOUS
if(halloss > 0)
adjustHalLoss(-6)
adjustHalLoss(-3)
else if(sleeping)
handle_dreams()
adjustHalLoss(-6)
adjustHalLoss(-3)
sleeping = max(sleeping-1, 0)
blinded = 1
stat = UNCONSCIOUS
@@ -462,12 +462,12 @@
emote("snore")
else if(resting)
if(halloss > 0)
adjustHalLoss(-6)
adjustHalLoss(-3)
//CONSCIOUS
else
stat = CONSCIOUS
if(halloss > 0)
adjustHalLoss(-2)
adjustHalLoss(-1)
//Eyes
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
+14
View File
@@ -356,6 +356,20 @@
new_character.dna.mutantrace = "kidan"
new_character.kidan_talk_understand = 1
if(client.prefs.language == "Tajaran")
if(is_alien_whitelisted(src, "Language_Tajaran") || !config.usealienwhitelist)
new_character.tajaran_talk_understand = 1
if(client.prefs.language == "Unathi")
if(is_alien_whitelisted(src, "Language_Soghun") || !config.usealienwhitelist)
new_character.soghun_talk_understand = 1
if(client.prefs.language == "Skrell")
if(is_alien_whitelisted(src, "Language_Skrell") || !config.usealienwhitelist)
new_character.skrell_talk_understand = 1
if(client.prefs.language == "Kidan")
if(is_alien_whitelisted(src, "Language_Kidan") || !config.usealienwhitelist)
new_character.kidan_talk_understand = 1
if(ticker.random_players)
new_character.gender = pick(MALE, FEMALE)
client.prefs.real_name = random_name()