Merge branch 'master' into development

This commit is contained in:
skull132
2017-04-08 23:20:02 +03:00
34 changed files with 438 additions and 239 deletions
@@ -329,6 +329,14 @@
C.holder.original_mob = null
suicide()
/mob/living/carbon/human/bst/verb/tgm()
set name = "Toggle Godmode"
set desc = "Enable or disable god mode. For testing things that require you to be vulnerable."
set category = "BST"
status_flags ^= GODMODE
src << span("notice", "God mode is now [status_flags & GODMODE ? "enabled" : "disabled"]")
//Equipment. All should have canremove set to 0
//All items with a /bst need the attack_hand() proc overrided to stop people getting overpowered items.
+7 -4
View File
@@ -115,7 +115,7 @@ var/list/global/random_stock_common = list(
"cosmetic" = 2.2,
"suitcooler" = 1.2,
"officechair" = 1.2,
"booze" = 3.5,
"booze" = 3.7,
"plant" = 3.5,
"bag" = 2,
"extinguish" = 2.2,
@@ -795,7 +795,7 @@ var/list/global/random_stock_large = list(
break
new /obj/structure/bed/chair/office/dark(T)
if ("booze")
if (prob(8))//Spare keg of beer
if (prob(8))//Spare keg of beer or xuizi juice
var/turf/T = get_turf(L)
if (!turf_clear(T))
for (var/turf/U in range(T,1))
@@ -803,7 +803,10 @@ var/list/global/random_stock_large = list(
T = U
break
new /obj/structure/reagent_dispensers/beerkeg(T)
if (prob(80))
new /obj/structure/reagent_dispensers/beerkeg(T)
else
new /obj/structure/reagent_dispensers/xuizikeg(T)
else
var/list/drinks = typesof(/obj/item/weapon/reagent_containers/food/drinks/bottle)
drinks -= /obj/item/weapon/reagent_containers/food/drinks/bottle
@@ -1657,7 +1660,7 @@ var/list/global/random_stock_large = list(
if ("bike")
new /obj/vehicle/bike(L)
if ("sol")
if (prob(50))
new /obj/structure/closet/sol/navy(L)
@@ -241,8 +241,12 @@
if(target_mob != H)
H << "<span class='danger'>You inject [target_mob] with [chems_to_use] unit\s of [charge.display_name].</span>"
target_mob << "<span class='danger'>You feel a rushing in your veins as [chems_to_use] unit\s of [charge.display_name] [chems_to_use == 1 ? "is" : "are"] injected.</span>"
target_mob.reagents.add_reagent(charge.display_name, chems_to_use)
if(target_mob.is_physically_disabled())
target_mob.reagents.add_reagent(charge.display_name, chems_to_use)
else
target_mob << "<span class='danger'>You feel a rushing in your veins as [chems_to_use] unit\s of [charge.display_name] [chems_to_use == 1 ? "is" : "are"] injected.</span>"
target_mob.reagents.add_reagent(charge.display_name, chems_to_use)
charge.charges -= chems_to_use
if(charge.charges < 0) charge.charges = 0
+1 -8
View File
@@ -21,16 +21,9 @@ datum/event/viral_infection/setup()
viruses += D
datum/event/viral_infection/announce()
var/level
if (severity == EVENT_LEVEL_MUNDANE)
return
else if (severity == EVENT_LEVEL_MODERATE)
level = pick("one", "two", "three", "four")
else
level = "five"
if (severity == EVENT_LEVEL_MAJOR || prob(60))
command_announcement.Announce("Confirmed outbreak of level [level] biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak5.ogg')
command_announcement.Announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak5.ogg')
datum/event/viral_infection/start()
if(!viruses.len) return
+1
View File
@@ -569,6 +569,7 @@ I said no!
items = list()
result = /obj/item/weapon/reagent_containers/food/snacks/slimesoup
/datum/recipe/boiledslimeextract
reagents = list("water" = 5)
items = list(
@@ -1128,7 +1128,7 @@
else
usr << "<span class='warning'>You failed to check the pulse. Try again.</span>"
/mob/living/carbon/human/proc/set_species(var/new_species, var/default_colour)
/mob/living/carbon/human/proc/set_species(var/new_species, var/default_colour, var/kpg=0)
if(!dna)
if(!new_species)
@@ -1180,7 +1180,7 @@
species.create_organs(src)
species.handle_post_spawn(src)
species.handle_post_spawn(src,kpg) // should be zero by default
maxHealth = species.total_health
@@ -12,7 +12,7 @@
#define BASE_DIZZY 100
#define ALCOHOL_FILTRATION_RATE 0.02//The base rate at which intoxication decreases per proc. this is actually multiplied by 3 most of the time if the liver is healthy
#define ALCOHOL_FILTRATION_RATE 0.015//The base rate at which intoxication decreases per proc. this is actually multiplied by 3 most of the time if the liver is healthy
#define BASE_VOMIT_CHANCE 2
#define VOMIT_CHANCE_SCALE 0.2//An extra 1% for every 5 units over the vomiting threshold
@@ -26,6 +26,17 @@ var/mob/living/carbon/human/alcohol_clumsy = 0
intoxication = 0
return
//Godmode messes some things up, so no more BSTs getting drunk unless they toggle it off
if (status_flags & GODMODE)
intoxication = 0 //Zero out intoxication but don't return, let the rest of this function run to remove any residual effects
slurring = 0
confused = 0
eye_blurry = 0
drowsyness = 0
paralysis = 0
sleeping = 0
//Many of these parameters normally tick down in life code, but some parts of that code don't run in godmode, so this prevents a BST being stuck with blurred vision
if(intoxication > AE_DIZZY*SR) // Early warning
if (dizziness == 0)
src << "<span class='notice'>The room starts spinning!</span>"
+2 -3
View File
@@ -182,6 +182,8 @@
if(!(sdisabilities & BLIND))
if(equipment_tint_total >= TINT_BLIND) // Covered eyes, heal faster
eye_blurry = max(eye_blurry-2, 0)
else
eye_blurry = max(eye_blurry-1, 0)
if (disabilities & EPILEPSY)
if ((prob(1) && paralysis < 1))
@@ -916,9 +918,6 @@
if (intoxication)
handle_intoxication()
else if (alcohol_clumsy)//This var is defined in intoxication.dm, its set true when alcohol has caused clumsiness
mutations.Remove(CLUMSY)
alcohol_clumsy = 0
if(status_flags & GODMODE) return 0 //godmode
@@ -317,13 +317,18 @@
H.verbs |= verb_path
return
/datum/species/proc/handle_post_spawn(var/mob/living/carbon/human/H) //Handles anything not already covered by basic species assignment.
/datum/species/proc/handle_post_spawn(var/mob/living/carbon/human/H,var/kpg = 0) //Handles anything not already covered by basic species assignment. Keepgene value should only be used by genetics.
add_inherent_verbs(H)
H.mob_bump_flag = bump_flag
H.mob_swap_flags = swap_flags
H.mob_push_flags = push_flags
H.pass_flags = pass_flags
H.mob_size = mob_size
if(!kpg)
if(islesserform(H))
H.dna.SetSEState(MONKEYBLOCK,1)
else
H.dna.SetSEState(MONKEYBLOCK,0)
/datum/species/proc/handle_death(var/mob/living/carbon/human/H, var/gibbed = 0) //Handles any species-specific death events (such as dionaea nymph spawns).
return
@@ -60,13 +60,24 @@
icobase = 'icons/mob/human_races/monkeys/r_farwa.dmi'
deform = 'icons/mob/human_races/monkeys/r_farwa.dmi'
greater_form = "Tajaran"
greater_form = "Tajara"
default_language = "Farwa"
flesh_color = "#AFA59E"
base_color = "#333333"
tail = "farwatail"
holder_type = /obj/item/weapon/holder/monkey/farwa
/datum/species/monkey/tajaran/get_random_name()
return "farwa ([rand(100,999)])" // HACK HACK HACK, oh lords of coding please forgive me!
/datum/species/monkey/tajaran/m_sai
name = "M'sai Farwa"
greater_form = "M'sai Tajara"
/datum/species/monkey/tajaran/zhan_khazan
name = "Zhan-Khazan Farwa"
greater_form = "Zhan-Khazan Tajara"
/datum/species/monkey/skrell
name = "Neaera"
short_name = "nea"
@@ -23,6 +23,8 @@
heat_level_2 = 360 //RaceDefault 380 Default 400
heat_level_3 = 700 //RaceDefault 800 Default 1000
primitive_form = "Zhan-Khazan Farwa"
num_alternate_languages = 1 // Only one Extra Language
/datum/species/tajaran/m_sai
@@ -48,4 +50,6 @@
heat_level_2 = 390 //RaceDefault 380 Default 400
heat_level_3 = 900 //RaceDefault 800 Default 1000
primitive_form = "M'sai Farwa"
secondary_langs = list(LANGUAGE_SIIK_MAAS, LANGUAGE_SIIK_TAJR, LANGUAGE_SIGN_TAJARA)
@@ -954,6 +954,12 @@
gib()
return
/mob/living/silicon/robot/update_canmove() // to fix lockdown issues w/ chairs
. = ..()
if (lockcharge)
canmove = 0
. = 0
/mob/living/silicon/robot/proc/UnlinkSelf()
disconnect_from_ai()
lawupdate = 0
+44 -5
View File
@@ -1,4 +1,4 @@
/mob/living/carbon/human/proc/monkeyize()
/mob/living/carbon/human/proc/monkeyize(var/kpg=0)
if (transforming)
return
for(var/obj/item/W in src)
@@ -11,8 +11,6 @@
stunned = 1
icon = null
invisibility = 101
for(var/t in organs)
qdel(t)
var/atom/movable/overlay/animation = new /atom/movable/overlay( loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
@@ -33,14 +31,55 @@
for(var/obj/item/W in src)
drop_from_inventory(W)
set_species(species.primitive_form)
dna.SetSEState(MONKEYBLOCK,1)
dna.SetSEValueRange(MONKEYBLOCK,0xDAC, 0xFFF)
if(!kpg)
dna.SetSEState(MONKEYBLOCK,1)
src << "<B>You are now [species.name]. </B>"
qdel(animation)
return src
/mob/living/carbon/human/proc/humanize(var/kpg=0) // we needed this a lot to be honest, why wasn't it made before?
if (transforming)
return
for(var/obj/item/W in src)
drop_from_inventory(W)
regenerate_icons()
transforming = 1
canmove = 0
stunned = 1
icon = null
invisibility = 101
var/atom/movable/overlay/animation = new /atom/movable/overlay( loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
flick("monkey2h", animation)
sleep(48)
transforming = 0
stunned = 0
update_canmove()
invisibility = initial(invisibility)
if(!species.greater_form) //If the creature in question has no greater form set, this is going to be messy.
gib()
return
for(var/obj/item/W in src)
drop_from_inventory(W)
set_species(species.greater_form)
if(!kpg)
dna.SetSEState(MONKEYBLOCK,0)
src << "<B>You are now [species.name]. </B>"
qdel(animation)
return src
/mob/new_player/AIize()
spawning = 1
return ..()
+4 -1
View File
@@ -141,10 +141,13 @@
if(is_broken())
filter_effect -= 2
if (owner.intoxication)
if (owner.intoxication > 0)
//ALCOHOL_FILTRATION_RATE is defined in intoxication.dm
owner.intoxication -= ALCOHOL_FILTRATION_RATE*filter_effect*PROCESS_ACCURACY//A weakened liver filters out alcohol more slowly
owner.intoxication = max(owner.intoxication, 0)
if (!owner.intoxication)
//If intoxication has just been reduced to zero, this will handle removing any effects
owner.handle_intoxication()
// Do some reagent processing.
if(owner.chem_effects[CE_ALCOHOL_TOXIC])
@@ -117,9 +117,9 @@
if(alien == IS_DIONA)
return //Diona can gain nutrients, but don't get drunk or suffer other effects
if(isunathi(M))//unathi are poisoned by alcohol as well
M.adjustToxLoss(2.5 * removed * (strength / 100))
M.adjustToxLoss(1.5 * removed * (strength / 100))
var/quantity = (strength / 100) * removed
M.intoxication += quantity
@@ -158,6 +158,50 @@
usr << "<span class='notice'>The solution dissolves the ink on the book.</span>"
return
//Butanol is a common alcohol that is fairly ineffective for humans and most other species, but highly intoxicating to unathi
//Butanol duplicates a lot of code from ethanol. This is by design, it does not inherit.
//Possible future todo: Add "alcohol" as a parent class to both ethanol and butanol
/datum/reagent/butanol
name = "Butanol" //Parent class for all alcoholic reagents.
id = "butanol"
description = "A fairly harmless alcohol that has intoxicating effects on certain species."
reagent_state = LIQUID
color = "#404030"
ingest_met = 0.17 //Extremely slow metabolic rate means the liver will generally purge it faster than it can intoxicate you
var/nutriment_factor = 0.5
var/strength = 100 // This is the ABV of the drink
glass_icon_state = "glass_clear"
glass_name = "glass of butanol"
glass_desc = "A fairly harmless alcohol that has intoxicating effects on certain species."
/datum/reagent/butanol/touch_mob(var/mob/living/L, var/amount)
if(istype(L) && strength > 40)
L.adjust_fire_stacks((amount / 7) * (strength / 100)) //Butanol is a bit less flammable than ethanol
/datum/reagent/butanol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
M.adjustToxLoss(removed)
return
/datum/reagent/butanol/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
if(isvaurca(M))//Vaurca are damaged instead of getting nutrients, but they can still get drunk
M.adjustToxLoss(removed * (strength / 100))
else
M.nutrition += nutriment_factor * removed
if(alien == IS_DIONA)
return //Diona can gain nutrients, but don't get drunk or suffer other effects
if(isunathi(M))
ingest_met = initial(ingest_met)*3 //Unathi digest butanol much faster
var/quantity = (strength / 100) * removed
M.intoxication += quantity
/datum/reagent/hydrazine
name = "Hydrazine"
id = "hydrazine"
@@ -787,6 +787,7 @@
glass_desc = "No relation to a certain rap artist/ actor."
glass_center_of_mass = list("x"=15, "y"=10)
/datum/reagent/drink/coffee
name = "Coffee"
id = "coffee"
@@ -1262,6 +1263,18 @@
glass_desc = "A crystal clear glass of Griffeater gin."
glass_center_of_mass = list("x"=16, "y"=12)
/datum/reagent/ethanol/victorygin
name = "Victory Gin"
id = "victorygin"
description = "An oily Adhomai-based gin."
color = "#664300"
strength = 32
glass_icon_state = "ginvodkaglass"
glass_name = "glass of gin"
glass_desc = "It has an oily smell and doesn't taste like typical gin."
glass_center_of_mass = list("x"=16, "y"=12)
//Base type for alchoholic drinks containing coffee
/datum/reagent/ethanol/coffee
overdose = 45
@@ -2529,3 +2542,31 @@
glass_icon_state = "tallblackrussian"
glass_name = "glass of Tall Black Russian"
glass_desc = "Just like black russian but taller."
// Butanol-based alcoholic drinks
//=====================================
//These are mainly for unathi, and have very little (but still some) effect on other species
/datum/reagent/butanol/xuizijuice
name = "Xuizi Juice"
id = "xuizijuice"
description = "Blended flower buds from a Moghean Xuizi cactus. Has a mild butanol content and is a staple recreational beverage in Unathi culture."
color = "#91de47"
strength = 5
glass_icon_state = "xuiziglass"
glass_name = "glass of Xuizi Juice"
glass_desc = "The clear green liquid smells like vanilla, tastes like water. Unathi swear it has a rich taste and texture."
/datum/reagent/butanol/sarezhiwine
name = "Sarezhi Wine"
id = "sarezhiwine"
description = "An alcoholic beverage made from lightly fermented Sareszhi berries, considered an upper class delicacy on Moghes. Significant butanol content indicates intoxicating effects on Unathi."
color = "#bf8fbc"
strength = 20
glass_icon_state = "sarezhiglass"
glass_name = "glass of Sarezhi Wine"
glass_desc = "It tastes like flat grape soda. Is this supposed to be alcoholic?"
@@ -1560,6 +1560,8 @@
required_reagents = list("ice" = 1, "tea" = 2)
result_amount = 3
/datum/chemical_reaction/icecoffee
name = "Iced Coffee"
id = "icecoffee"
@@ -1582,6 +1584,14 @@
catalysts = list("enzyme" = 5)
result_amount = 10
/datum/chemical_reaction/butanol
name = "Butanol"
id = "butanol"
result = "butanol"
required_reagents = list("cornoil" = 10, "sugar" = 10)
catalysts = list("enzyme" = 5)
result_amount = 5
/datum/chemical_reaction/grenadine
name = "Grenadine Syrup"
id = "grenadine"
@@ -27,6 +27,7 @@
mercury spawn_reagent = "mercury"
radium spawn_reagent = "radium"
ethanol spawn_reagent = "ethanol"
butanol spawn_reagent = "butanol"
sacid spawn_reagent = "sacid"
tungsten spawn_reagent = "tungsten"
@@ -18,6 +18,7 @@
/obj/item/weapon/reagent_containers/chem_disp_cartridge/radium,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/water,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/ethanol,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/butanol,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/sugar,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/sacid,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/tungsten
@@ -179,6 +179,15 @@
..()
reagents.add_reagent("gin", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/victorygin
name = "Victory gin"
desc = "Pour one out for Al'mari. His gun was on stun, bless his heart."
icon_state = "victorygin"
center_of_mass = list("x"=16, "y"=4)
New()
..()
reagents.add_reagent("victorygin", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey
name = "Uncle Git's Special Reserve"
desc = "A premium single-malt whiskey, gently matured inside the tunnels of a nuclear shelter. TUNNEL WHISKEY RULES."
@@ -499,3 +508,25 @@
New()
..()
reagents.add_reagent("sbiten", 100)
// Butanol-based alcoholic drinks
//=====================================
//These are mainly for unathi, and have very little (but still some) effect on other species
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/xuizijuice
name = "Xuizi Juice"
desc = "Blended flower buds from the Xuizi cactus. It smells faintly of vanilla. Bottled by the Arizi Guild for over 200 years."
icon_state = "xuizibottle"
center_of_mass = list("x"=16, "y"=10)
New()
..()
reagents.add_reagent("xuizijuice", 30)
/obj/item/weapon/reagent_containers/food/drinks/bottle/sarezhiwine
name = "Sarezhi Wine"
desc = "A premium Moghean wine made from Sareszhi berries. Bottled by the Arizi Guild for over 200 years."
icon_state = "sarezhibottle"
New()
..()
reagents.add_reagent("sarezhiwine", 100)
@@ -245,6 +245,16 @@
..()
reagents.add_reagent("beer",capacity)
/obj/structure/reagent_dispensers/xuizikeg
name = "xuizi juice keg"
desc = "A keg full of Xuizi juice, blended flower buds from the Moghean Xuizi cactus. The export stamp of the Arizi Guild is imprinted on the side."
icon = 'icons/obj/objects.dmi'
icon_state = "keg_xuizi"
amount_per_transfer_from_this = 10
New()
..()
reagents.add_reagent("xuizijuice",capacity)
/obj/structure/reagent_dispensers/virusfood
name = "Virus Food Dispenser"
desc = "A dispenser of virus food."