Merge branch 'dev' into ofChemistryAndStuff

Conflicts:
	code/game/objects/effects/chem/chemsmoke.dm
	code/modules/customitems/item_defines.dm
	code/modules/projectiles/guns/launcher/syringe_gun.dm
	code/modules/reagents/Chemistry-Holder.dm
	code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm
	code/modules/reagents/reagent_containers/food/drinks.dm
	code/modules/reagents/reagent_containers/pill.dm
	maps/exodus-1.dmm
This commit is contained in:
Kelenius
2015-05-15 11:28:05 +03:00
468 changed files with 7273 additions and 9076 deletions
-9
View File
@@ -341,9 +341,6 @@
..()
if(!seed)
return
if(seed.get_trait(TRAIT_BIOLUM))
user.SetLuminosity(user.luminosity + seed.get_trait(TRAIT_BIOLUM))
SetLuminosity(0)
if(seed.get_trait(TRAIT_STINGS))
var/mob/living/carbon/human/H = user
if(istype(H) && H.gloves)
@@ -354,12 +351,6 @@
seed.do_thorns(H,src)
seed.do_sting(H,src,pick("r_hand","l_hand"))
/obj/item/weapon/reagent_containers/food/snacks/grown/dropped(mob/user)
..()
if(seed && seed.get_trait(TRAIT_BIOLUM))
user.SetLuminosity(user.luminosity - seed.get_trait(TRAIT_BIOLUM))
SetLuminosity(seed.get_trait(TRAIT_BIOLUM))
// Predefined types for placing on the map.
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/libertycap
+11 -10
View File
@@ -165,9 +165,10 @@
if(!istype(splat)) // Plants handle their own stuff.
splat.name = "[thrown.name] [pick("smear","smudge","splatter")]"
if(get_trait(TRAIT_BIOLUM))
var/clr
if(get_trait(TRAIT_BIOLUM_COLOUR))
splat.l_color = get_trait(TRAIT_BIOLUM_COLOUR)
splat.SetLuminosity(get_trait(TRAIT_BIOLUM))
clr = get_trait(TRAIT_BIOLUM_COLOUR)
splat.set_light(get_trait(TRAIT_BIOLUM), l_color = clr)
if(get_trait(TRAIT_PRODUCT_COLOUR))
splat.color = get_trait(TRAIT_PRODUCT_COLOUR)
@@ -276,12 +277,11 @@
// Handle light requirements.
if(!light_supplied)
var/area/A = get_area(current_turf)
if(A)
if(A.lighting_use_dynamic)
light_supplied = max(0,min(10,current_turf.lighting_lumcount)-5)
else
light_supplied = 5
var/atom/movable/lighting_overlay/L = locate(/atom/movable/lighting_overlay) in current_turf
if(L)
light_supplied = max(0,min(10,L.lum_r + L.lum_g + L.lum_b)-5)
else
light_supplied = 5
if(light_supplied)
if(abs(light_supplied - get_trait(TRAIT_IDEAL_LIGHT)) > get_trait(TRAIT_LIGHT_TOLERANCE))
health_change += rand(1,3) * HYDRO_SPEED_MULTIPLIER
@@ -696,9 +696,10 @@
product.desc += " On second thought, something about this one looks strange."
if(get_trait(TRAIT_BIOLUM))
var/clr
if(get_trait(TRAIT_BIOLUM_COLOUR))
product.l_color = get_trait(TRAIT_BIOLUM_COLOUR)
product.SetLuminosity(get_trait(TRAIT_BIOLUM))
clr = get_trait(TRAIT_BIOLUM_COLOUR)
product.set_light(get_trait(TRAIT_BIOLUM), l_color = clr)
//Handle spawning in living, mobile products (like dionaea).
if(istype(product,/mob/living))
+2 -2
View File
@@ -88,7 +88,7 @@
if(S.seed && S.seed.get_trait(TRAIT_IMMUTABLE) > 0)
user << "That seed is not compatible with our genetics technology."
else
user.remove_from_mob(W)
user.drop_from_inventory(W)
W.loc = src
seed = W
user << "You load [W] into [src]."
@@ -120,7 +120,7 @@
user << "That disk does not have any gene data loaded."
return
user.remove_from_mob(W)
user.drop_from_inventory(W)
W.loc = src
loaded_disk = W
user << "You load [W] into [src]."
+2 -2
View File
@@ -13,7 +13,7 @@
spawn(75)
if(!host.ckey && !host.client)
host.death() // This seems redundant, but a lot of mobs don't
host.stat = 2 // handle death() properly. Better safe than etc.
host.stat = DEAD // handle death() properly. Better safe than etc.
host.visible_message("<span class='danger'>[host] is malformed and unable to survive. It expires pitifully, leaving behind some seeds.</span>")
var/total_yield = rand(1,3)
@@ -27,7 +27,7 @@
for(var/mob/dead/observer/O in player_list)
if(jobban_isbanned(O, "Dionaea"))
continue
if(O.client)
if(O.client && O.MayRespawn())
if(O.client.prefs.be_special & BE_PLANT && !(O.client in currently_querying))
currently_querying |= O.client
question(O.client,host)
+20 -13
View File
@@ -1,22 +1,28 @@
#define DEFAULT_SEED "glowshroom"
#define VINE_GROWTH_STAGES 5
/proc/spacevine_infestation()
/proc/spacevine_infestation(var/potency_min=70, var/potency_max=100, var/maturation_min=5, var/maturation_max=15)
spawn() //to stop the secrets panel hanging
var/list/turf/simulated/floor/turfs = list() //list of all the empty floor turfs in the hallway areas
for(var/areapath in typesof(/area/hallway))
var/area/A = locate(areapath)
for(var/area/B in A.related)
for(var/turf/simulated/floor/F in B.contents)
if(!F.contents.len)
turfs += F
for(var/turf/simulated/floor/F in A.contents)
if(!F.contents.len)
turfs += F
if(turfs.len) //Pick a turf to spawn at if we can
var/turf/simulated/floor/T = pick(turfs)
var/datum/seed/seed = plant_controller.create_random_seed(1)
seed.set_trait(TRAIT_SPREAD,2) // So it will function properly as vines.
seed.set_trait(TRAIT_POTENCY,rand(70,100)) // Guarantee a wide spread and powerful effects.
new /obj/effect/plant(T,seed)
seed.set_trait(TRAIT_POTENCY,rand(potency_min, potency_max)) // 70-100 potency will help guarantee a wide spread and powerful effects.
seed.set_trait(TRAIT_MATURATION,rand(maturation_min, maturation_max))
//make vine zero start off fully matured
var/obj/effect/plant/vine = new(T,seed)
vine.health = vine.max_health
vine.mature_time = 0
vine.process()
message_admins("<span class='notice'>Event: Spacevines spawned at [T.loc] ([T.x],[T.y],[T.z])</span>")
/obj/effect/dead_plant
@@ -57,6 +63,7 @@
var/spread_chance = 40
var/spread_distance = 3
var/evolve_chance = 2
var/mature_time //minimum maturation time
var/last_tick = 0
var/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/plant
@@ -112,6 +119,7 @@
if(max_growth > 2 && prob(50))
max_growth-- //Ensure some variation in final sprite, makes the carpet of crap look less wonky.
mature_time = world.time + seed.get_trait(TRAIT_MATURATION) + 15 //prevent vines from maturing until at least a few seconds after they've been created.
spread_chance = seed.get_trait(TRAIT_POTENCY)
spread_distance = ((growth_type>0) ? round(spread_chance*0.6) : round(spread_chance*0.3))
update_icon()
@@ -146,14 +154,13 @@
color = icon_colour
// Apply colour and light from seed datum.
if(seed.get_trait(TRAIT_BIOLUM))
SetLuminosity(1+round(seed.get_trait(TRAIT_POTENCY)/20))
var/clr
if(seed.get_trait(TRAIT_BIOLUM_COLOUR))
l_color = seed.get_trait(TRAIT_BIOLUM_COLOUR)
else
l_color = null
clr = seed.get_trait(TRAIT_BIOLUM_COLOUR)
set_light(1+round(seed.get_trait(TRAIT_POTENCY)/20), l_color = clr)
return
else
SetLuminosity(0)
set_light(0)
/obj/effect/plant/proc/refresh_icon()
var/growth = min(max_growth,round(health/growth_threshold))
@@ -256,4 +263,4 @@
die_off()
/obj/effect/plant/proc/is_mature()
return (health >= (max_health/3))
return (health >= (max_health/3) && world.time > mature_time)
@@ -70,7 +70,10 @@
update_neighbors()
if(is_mature() && neighbors.len && prob(spread_chance))
for(var/i=1,i<=seed.get_trait(TRAIT_YIELD),i++)
//spread to 1-3 adjacent turfs depending on yield trait.
var/max_spread = between(1, round(seed.get_trait(TRAIT_YIELD)*3/14), 3)
for(var/i in 1 to max_spread)
if(prob(spread_chance))
sleep(rand(3,5))
if(!neighbors.len)
@@ -7,11 +7,16 @@
if(!istype(M))
return
if(!buckled_mob && !M.buckled && !M.anchored && (M.small || prob(round(seed.get_trait(TRAIT_POTENCY)/2))))
entangle(M)
if(!buckled_mob && !M.buckled && !M.anchored && (M.small || prob(round(seed.get_trait(TRAIT_POTENCY)/6))))
//wait a tick for the Entered() proc that called HasProximity() to finish (and thus the moving animation),
//so we don't appear to teleport from two tiles away when moving into a turf adjacent to vines.
spawn(1)
entangle(M)
/obj/effect/plant/attack_hand(mob/user as mob)
// Todo, cause damage.
/obj/effect/plant/attack_hand(var/mob/user)
manual_unbuckle(user)
/obj/effect/plant/attack_generic(var/mob/user)
manual_unbuckle(user)
/obj/effect/plant/proc/trodden_on(var/mob/living/victim)
@@ -60,13 +65,11 @@
if(buckled_mob)
return
if(!Adjacent(victim))
if(victim.buckled)
return
victim.buckled = src
victim.update_canmove()
buckled_mob = victim
if(!victim.anchored && !victim.buckled && victim.loc != get_turf(src))
//grabbing people
if(!victim.anchored && Adjacent(victim) && victim.loc != get_turf(src))
var/can_grab = 1
if(istype(victim, /mob/living/carbon/human))
var/mob/living/carbon/human/H = victim
@@ -75,4 +78,9 @@
if(can_grab)
src.visible_message("<span class='danger'>Tendrils lash out from \the [src] and drag \the [victim] in!</span>")
victim.loc = src.loc
victim << "<span class='danger'>Tendrils [pick("wind", "tangle", "tighten")] around you!</span>"
//entangling people
if(victim.loc == src.loc)
buckle_mob(victim)
victim.set_dir(pick(cardinal))
victim << "<span class='danger'>Tendrils [pick("wind", "tangle", "tighten")] around you!</span>"
+6 -7
View File
@@ -350,7 +350,7 @@
usr << "There is no label to remove."
return
/obj/machinery/portable_atmospherics/hydroponics/verb/set_light()
/obj/machinery/portable_atmospherics/hydroponics/verb/setlight()
set name = "Set Light"
set category = "Object"
set src in view(1)
@@ -596,13 +596,12 @@
if(closed_system && mechanical)
light_string = "that the internal lights are set to [tray_light] lumens"
else
var/area/A = T.loc
var/atom/movable/lighting_overlay/L = locate(/atom/movable/lighting_overlay) in T
var/light_available
if(A)
if(A.lighting_use_dynamic)
light_available = max(0,min(10,T.lighting_lumcount)-5)
else
light_available = 5
if(L)
light_available = max(0,min(10,L.lum_r + L.lum_g + L.lum_b)-5)
else
light_available = 5
light_string = "a light level of [light_available] lumens"
usr << "The tray's sensor suite is reporting [light_string] and a temperature of [environment.temperature]K."
@@ -120,6 +120,14 @@
harvest = 1
lastproduce = age
// If we're a vine which is not in a closed tray and is at least half mature, and there's no vine currently on our turf: make one (maybe)
if(!closed_system && \
seed.get_trait(TRAIT_SPREAD) == 2 && \
2 * age >= seed.get_trait(TRAIT_MATURATION) && \
!(locate(/obj/effect/plant) in get_turf(src)) && \
prob(2 * seed.get_trait(TRAIT_POTENCY)))
new /obj/effect/plant(get_turf(src), seed)
if(prob(3)) // On each tick, there's a chance the pest population will increase
pestlevel += 0.1 * HYDRO_SPEED_MULTIPLIER
@@ -58,7 +58,7 @@
force = 5.0
throwforce = 7.0
w_class = 2.0
matter = list("metal" = 50)
matter = list(DEFAULT_WALL_MATERIAL = 50)
attack_verb = list("slashed", "sliced", "cut", "clawed")
+1 -1
View File
@@ -16,7 +16,7 @@
..()
verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/close_lid_verb
verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/remove_label
verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/set_light
verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/setlight
/obj/machinery/portable_atmospherics/hydroponics/soil/CanPass()
return 1
+3 -11
View File
@@ -215,7 +215,7 @@
force = 5.0
throwforce = 7.0
w_class = 2.0
matter = list("metal" = 50)
matter = list(DEFAULT_WALL_MATERIAL = 50)
attack_verb = list("slashed", "sliced", "cut", "clawed")
//Hatchets and things to kill kudzu
@@ -226,13 +226,13 @@
icon_state = "hatchet"
flags = CONDUCT
force = 12.0
w_class = 3.0
w_class = 2
throwforce = 15.0
throw_speed = 4
throw_range = 4
sharp = 1
edge = 1
matter = list("metal" = 15000)
matter = list(DEFAULT_WALL_MATERIAL = 15000)
origin_tech = "materials=2;combat=1"
attack_verb = list("chopped", "torn", "cut")
@@ -270,11 +270,3 @@
slot_flags = SLOT_BACK
origin_tech = "materials=2;combat=2"
attack_verb = list("chopped", "sliced", "cut", "reaped")
/obj/item/weapon/scythe/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity) return
if(istype(A, /obj/effect/plant))
for(var/obj/effect/plant/B in orange(A,1))
if(prob(80))
B.die_off(1)
qdel(A)
@@ -73,12 +73,11 @@
// Update bioluminescence.
if(seed)
if(seed.get_trait(TRAIT_BIOLUM))
SetLuminosity(round(seed.get_trait(TRAIT_POTENCY)/10))
var/clr
if(seed.get_trait(TRAIT_BIOLUM_COLOUR))
l_color = seed.get_trait(TRAIT_BIOLUM_COLOUR)
else
l_color = null
clr = seed.get_trait(TRAIT_BIOLUM_COLOUR)
set_light(round(seed.get_trait(TRAIT_POTENCY)/10), l_color = clr)
return
SetLuminosity(0)
return
set_light(0)
return