Merge remote-tracking branch 'upstream/master' into hit-reactions

This commit is contained in:
Fox-McCloud
2016-07-07 22:50:53 -04:00
899 changed files with 8338 additions and 8181 deletions
+3 -3
View File
@@ -254,7 +254,7 @@
for(var/i=0,i<2,i++)
var/obj/item/stack/sheet/wood/NG = new (user.loc)
NG.color = seed.get_trait(TRAIT_PRODUCT_COLOUR)
for (var/obj/item/stack/sheet/wood/G in user.loc)
for(var/obj/item/stack/sheet/wood/G in user.loc)
if(G==NG)
continue
if(G.amount>=G.max_amount)
@@ -325,7 +325,7 @@
else
user.visible_message("<span class='danger'>[M] has been attacked with [src] by [user]!</span>")
if (hitsound)
if(hitsound)
playsound(loc, hitsound, 50, 1, -1)
switch(damtype)
if("brute")
@@ -407,7 +407,7 @@
for(var/i=0,i<2,i++)
var/obj/item/stack/tile/grass/G = new (user.loc)
G.color = seed.get_trait(TRAIT_PRODUCT_COLOUR)
for (var/obj/item/stack/tile/grass/NG in user.loc)
for(var/obj/item/stack/tile/grass/NG in user.loc)
if(G==NG)
continue
if(NG.amount>=NG.max_amount)
+4 -4
View File
@@ -151,7 +151,7 @@
/obj/machinery/botany/extractor/RefreshParts()
var/tier = 1
for (var/obj/item/weapon/stock_parts/scanning_module/S in component_parts)
for(var/obj/item/weapon/stock_parts/scanning_module/S in component_parts)
tier = S.rating
degrade_lower = 25 - (tier * 5) //Tier 1: 20, Tier 4: 5
degrade_upper = 70 - (tier * 10) //Tier 1: 60, Tier 4: 30
@@ -191,7 +191,7 @@
data["sourceName"] = 0
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
if(!ui)
ui = new(user, src, ui_key, "botany_isolator.tmpl", "Lysis-isolation Centrifuge UI", 470, 450)
ui.set_initial_data(data)
ui.open()
@@ -302,7 +302,7 @@
/obj/machinery/botany/editor/RefreshParts()
var/tier = 1
for (var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
tier = M.rating
degrade_lower = 6 - tier //Tier 1: 5, Tier 4: 1
degrade_upper = 11 - tier //Tier 1: 10, Tier 4: 6
@@ -341,7 +341,7 @@
data["loaded"] = 0
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
if(!ui)
ui = new(user, src, ui_key, "botany_editor.tmpl", "Bioballistic Delivery UI", 470, 450)
ui.set_initial_data(data)
ui.open()
+32 -32
View File
@@ -13,7 +13,7 @@
src.ID = ID
/datum/seed_pile/proc/matches(var/obj/item/seeds/O)
if (O.seed == seed_type)
if(O.seed == seed_type)
return 1
return 0
@@ -52,52 +52,52 @@
interact(user)
/obj/machinery/seed_storage/interact(mob/user as mob)
if (..())
if(..())
return
if (!initialized)
if(!initialized)
for(var/typepath in starting_seeds)
var/amount = starting_seeds[typepath]
if(isnull(amount)) amount = 1
for (var/i = 1 to amount)
for(var/i = 1 to amount)
var/O = new typepath
add(O)
initialized = 1
var/dat = "<center><h1>Seed storage contents</h1></center>"
if (piles.len == 0)
if(piles.len == 0)
dat += "<font color='red'>No seeds</font>"
else
dat += "<table style='text-align:center;border-style:solid;border-width:1px;padding:4px'><tr><td>Name</td>"
dat += "<td>Variety</td>"
if ("stats" in scanner)
if("stats" in scanner)
dat += "<td>E</td><td>Y</td><td>M</td><td>Pr</td><td>Pt</td><td>Harvest</td>"
if ("temperature" in scanner)
if("temperature" in scanner)
dat += "<td>Temp</td>"
if ("light" in scanner)
if("light" in scanner)
dat += "<td>Light</td>"
if ("soil" in scanner)
if("soil" in scanner)
dat += "<td>Nutri</td><td>Water</td>"
dat += "<td>Notes</td><td>Amount</td><td></td></tr>"
for (var/datum/seed_pile/S in piles)
for(var/datum/seed_pile/S in piles)
var/datum/seed/seed = S.seed_type
if(!seed)
continue
dat += "<tr>"
dat += "<td>[seed.seed_name]</td>"
dat += "<td>#[seed.uid]</td>"
if ("stats" in scanner)
if("stats" in scanner)
dat += "<td>[seed.get_trait(TRAIT_ENDURANCE)]</td><td>[seed.get_trait(TRAIT_YIELD)]</td><td>[seed.get_trait(TRAIT_MATURATION)]</td><td>[seed.get_trait(TRAIT_PRODUCTION)]</td><td>[seed.get_trait(TRAIT_POTENCY)]</td>"
if(seed.get_trait(TRAIT_HARVEST_REPEAT))
dat += "<td>Multiple</td>"
else
dat += "<td>Single</td>"
if ("temperature" in scanner)
if("temperature" in scanner)
dat += "<td>[seed.get_trait(TRAIT_IDEAL_HEAT)] K</td>"
if ("light" in scanner)
if("light" in scanner)
dat += "<td>[seed.get_trait(TRAIT_IDEAL_LIGHT)] L</td>"
if ("soil" in scanner)
if("soil" in scanner)
if(seed.get_trait(TRAIT_REQUIRES_NUTRIENTS))
if(seed.get_trait(TRAIT_NUTRIENT_CONSUMPTION) < 0.05)
dat += "<td>Low</td>"
@@ -128,17 +128,17 @@
dat += "VINE "
if(2)
dat += "<font color='red'>VINE </font>"
if ("pressure" in scanner)
if("pressure" in scanner)
if(seed.get_trait(TRAIT_LOWKPA_TOLERANCE) < 20)
dat += "LP "
if(seed.get_trait(TRAIT_HIGHKPA_TOLERANCE) > 220)
dat += "HP "
if ("temperature" in scanner)
if("temperature" in scanner)
if(seed.get_trait(TRAIT_HEAT_TOLERANCE) > 30)
dat += "TEMRES "
else if(seed.get_trait(TRAIT_HEAT_TOLERANCE) < 10)
dat += "TEMSEN "
if ("light" in scanner)
if("light" in scanner)
if(seed.get_trait(TRAIT_LIGHT_TOLERANCE) > 10)
dat += "LIGRES "
else if(seed.get_trait(TRAIT_LIGHT_TOLERANCE) < 3)
@@ -157,7 +157,7 @@
dat += "WEEDRES "
if(seed.get_trait(TRAIT_PARASITE))
dat += "PAR "
if ("temperature" in scanner)
if("temperature" in scanner)
if(seed.get_trait(TRAIT_ALTER_TEMP) > 0)
dat += "TEMP+ "
if(seed.get_trait(TRAIT_ALTER_TEMP) < 0)
@@ -174,27 +174,27 @@
onclose(user, "seedstorage")
/obj/machinery/seed_storage/Topic(var/href, var/list/href_list)
if (..())
if(..())
return
var/task = href_list["task"]
var/ID = text2num(href_list["id"])
for (var/datum/seed_pile/N in piles)
if (N.ID == ID)
if (task == "vend")
for(var/datum/seed_pile/N in piles)
if(N.ID == ID)
if(task == "vend")
var/obj/O = pick(N.seeds)
if (O)
if(O)
--N.amount
N.seeds -= O
if (N.amount <= 0 || N.seeds.len <= 0)
if(N.amount <= 0 || N.seeds.len <= 0)
piles -= N
qdel(N)
O.loc = src.loc
else
piles -= N
qdel(N)
else if (task == "purge")
for (var/obj/O in N.seeds)
else if(task == "purge")
for(var/obj/O in N.seeds)
qdel(O)
piles -= N
qdel(N)
@@ -202,17 +202,17 @@
updateUsrDialog()
/obj/machinery/seed_storage/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (istype(O, /obj/item/seeds))
if(istype(O, /obj/item/seeds))
add(O)
user.visible_message("[user] puts \the [O.name] into \the [src].", "You put \the [O] into \the [src].")
return
else if (istype(O, /obj/item/weapon/storage/bag/plants))
else if(istype(O, /obj/item/weapon/storage/bag/plants))
var/obj/item/weapon/storage/P = O
var/loaded = 0
for(var/obj/item/seeds/G in P.contents)
++loaded
add(G)
if (loaded)
if(loaded)
user.visible_message("[user] puts the seeds from \the [O.name] into \the [src].", "You put the seeds from \the [O.name] into \the [src].")
else
to_chat(user, "<span class='notice'>There are no seeds in \the [O.name].</span>")
@@ -223,7 +223,7 @@
to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].")
/obj/machinery/seed_storage/proc/add(var/obj/item/seeds/O as obj)
if (istype(O.loc, /mob))
if(istype(O.loc, /mob))
var/mob/user = O.loc
user.drop_item(O)
else if(istype(O.loc,/obj/item/weapon/storage))
@@ -233,8 +233,8 @@
O.loc = src
var/newID = 0
for (var/datum/seed_pile/N in piles)
if (N.matches(O))
for(var/datum/seed_pile/N in piles)
if(N.matches(O))
++N.amount
N.seeds += (O)
return
@@ -259,11 +259,11 @@
die_off()
return
if(2.0)
if (prob(50))
if(prob(50))
die_off()
return
if(3.0)
if (prob(5))
if(prob(5))
die_off()
return
else
+10 -10
View File
@@ -112,7 +112,7 @@
/obj/machinery/portable_atmospherics/hydroponics/RefreshParts()
var/tmp_capacity = 0
for (var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
tmp_capacity += M.rating
maxwater = tmp_capacity * 50 // Up to 300
maxnutri = tmp_capacity * 5 // Up to 30
@@ -427,7 +427,7 @@
//--FalseIncarnate
//Check if held item is an open container
if (O.is_open_container())
if(O.is_open_container())
//Check if container is of the "glass" subtype (includes buckets, beakers, vials)
if(istype(O, /obj/item/weapon/reagent_containers/glass))
var/obj/item/weapon/reagent_containers/glass/C = O
@@ -471,7 +471,7 @@
update_icon()
//Check if container is any spray container
else if (istype(O, /obj/item/weapon/reagent_containers/spray))
else if(istype(O, /obj/item/weapon/reagent_containers/spray))
var/obj/item/weapon/reagent_containers/spray/S = O
//Check if there is a plant in the tray
if(seed)
@@ -537,7 +537,7 @@
var/obj/item/weapon/reagent_containers/syringe/S = O
if (S.mode == 1)
if(S.mode == 1)
if(seed)
return ..()
else
@@ -551,7 +551,7 @@
to_chat(user, "There's nothing to draw something from.")
return 1
else if (istype(O, /obj/item/seeds))
else if(istype(O, /obj/item/seeds))
if(!seed)
@@ -579,7 +579,7 @@
else
to_chat(user, "<span class='danger'>\The [src] already has seeds in it!</span>")
else if (istype(O, /obj/item/weapon/minihoe)) // The minihoe
else if(istype(O, /obj/item/weapon/minihoe)) // The minihoe
if(weedlevel > 0)
user.visible_message("<span class='danger'>[user] starts uprooting the weeds.</span>", "<span class='danger'>You remove the weeds from the [src].</span>")
@@ -588,12 +588,12 @@
else
to_chat(user, "<span class='danger'>This plot is completely devoid of weeds. It doesn't need uprooting.</span>")
else if (istype(O, /obj/item/weapon/storage/bag/plants))
else if(istype(O, /obj/item/weapon/storage/bag/plants))
attack_hand(user)
var/obj/item/weapon/storage/bag/plants/S = O
for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in locate(user.x,user.y,user.z))
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in locate(user.x,user.y,user.z))
if(!S.can_be_inserted(G))
return
S.handle_item_insertion(G, 1)
@@ -608,8 +608,8 @@
anchored = !anchored
to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].")
else if ((istype(O, /obj/item/weapon/tank) && !( src.destroyed )))
if (src.holding)
else if((istype(O, /obj/item/weapon/tank) && !( src.destroyed )))
if(src.holding)
to_chat(user, "\blue There is alreadu a tank loaded into the [src].")
return
var/obj/item/weapon/tank/T = O
@@ -36,7 +36,7 @@
if(!yieldmod)
yieldmod += 1
// to_chat(world, "Yield increased by 1, from 0, to a total of [myseed.yield]")
else if (prob(1/(yieldmod * yieldmod) *100))//This formula gives you diminishing returns based on yield. 100% with 1 yield, decreasing to 25%, 11%, 6, 4, 2...
else if(prob(1/(yieldmod * yieldmod) *100))//This formula gives you diminishing returns based on yield. 100% with 1 yield, decreasing to 25%, 11%, 6, 4, 2...
yieldmod += 1
// to_chat(world, "Yield increased by 1, to a total of [myseed.yield]")
else
@@ -24,7 +24,7 @@
// There's a chance for a weed explosion to happen if the weeds take over.
// Plants that are themselves weeds (weed_tolerance > 10) are unaffected.
if (weedlevel >= 10 && prob(10))
if(weedlevel >= 10 && prob(10))
if(!seed || weedlevel >= seed.get_trait(TRAIT_WEED_TOLERANCE))
weed_invasion()
@@ -81,7 +81,7 @@
T.air_update_turf()
// If we're attached to a pipenet, then we should let the pipenet know we might have modified some gasses
if (closed_system && connected_port)
if(closed_system && connected_port)
connected_port.parent.update = 1
// Toxin levels beyond the plant's tolerance cause damage, but
@@ -98,7 +98,7 @@
if(seed.get_trait(TRAIT_CARNIVOROUS))
health += HYDRO_SPEED_MULTIPLIER
pestlevel -= HYDRO_SPEED_MULTIPLIER
else if (pestlevel >= seed.get_trait(TRAIT_PEST_TOLERANCE))
else if(pestlevel >= seed.get_trait(TRAIT_PEST_TOLERANCE))
health -= HYDRO_SPEED_MULTIPLIER
// Some plants thrive and live off of weeds.
@@ -106,7 +106,7 @@
if(seed.get_trait(TRAIT_PARASITE))
health += HYDRO_SPEED_MULTIPLIER
weedlevel -= HYDRO_SPEED_MULTIPLIER
else if (weedlevel >= seed.get_trait(TRAIT_WEED_TOLERANCE))
else if(weedlevel >= seed.get_trait(TRAIT_WEED_TOLERANCE))
health -= HYDRO_SPEED_MULTIPLIER
// Handle life and death.
@@ -11,7 +11,7 @@
var/reagent_total = reagents.get_reagent_amount(R.id)
//These are here because they have checks that would clutter up the switch statement cases, and thus get handled after the switch (readability)
//These are here because they have checks that would clutter up the switch statement cases, and thus get handled after the switch(readability)
var/water_value = 0
var/health_value = 0
var/production_stat_value = 0
+1 -1
View File
@@ -374,7 +374,7 @@
H.update_inv_l_hand()
H.update_inv_r_hand()
add_fingerprint(user)
if (!blood_DNA) return
if(!blood_DNA) return
if(blood_overlay && (blood_DNA.len >= 1)) //updates blood overlay, if any
overlays.Cut()//this might delete other item overlays as well but eeeeeeeh