Merge remote-tracking branch 'upstream/master' into receiverssss

This commit is contained in:
Fox-McCloud
2017-03-24 16:50:57 -04:00
56 changed files with 1901 additions and 1191 deletions
+49 -18
View File
@@ -10,30 +10,55 @@
icon_state = "glowshroom" //replaced in New
layer = 2.1
var/endurance = 30
var/potency = 30
var/delay = 1200
var/floor = 0
var/yield = 3
var/generation = 1
var/spreadIntoAdjacentChance = 60
light_color = "#006622"
var/obj/item/seeds/myseed = /obj/item/seeds/glowshroom
obj/effect/glowshroom/glowcap
/obj/effect/glowshroom/glowcap
name = "glowcap"
desc = "Mycena Ruthenia, a species of mushroom that, while it does glow in the dark, is not actually bioluminescent."
icon_state = "glowcap"
light_color = "#8E0300"
myseed = /obj/item/seeds/glowshroom/glowcap
/obj/effect/glowshroom/single
yield = 0
/obj/effect/glowshroom/shadowshroom
name = "shadowshroom"
desc = "Mycena Umbra, a species of mushroom that emits shadow instead of light."
icon_state = "shadowshroom"
myseed = /obj/item/seeds/glowshroom/shadowshroom
/obj/effect/glowshroom/single/Spread()
return
/obj/effect/glowshroom/examine(mob/user)
. = ..()
to_chat(user, "This is a [generation]\th generation [name]!")
/obj/effect/glowshroom/New()
/obj/effect/glowshroom/Destroy()
if(myseed)
qdel(myseed)
myseed = null
return ..()
/obj/effect/glowshroom/New(loc, obj/item/seeds/newseed, mutate_stats)
..()
set_light(round(potency/10))
dir = CalcDir()
if(newseed)
myseed = newseed.Copy()
myseed.forceMove(src)
else
myseed = new myseed(src)
if(mutate_stats) //baby mushrooms have different stats :3
myseed.adjust_potency(rand(-3,6))
myseed.adjust_yield(rand(-1,2))
myseed.adjust_production(rand(-3,6))
myseed.adjust_endurance(rand(-3,6))
delay = delay - myseed.production * 100 //So the delay goes DOWN with better stats instead of up. :I
endurance = myseed.endurance
if(myseed.get_gene(/datum/plant_gene/trait/glow))
var/datum/plant_gene/trait/glow/G = myseed.get_gene(/datum/plant_gene/trait/glow)
set_light(G.glow_range(myseed), G.glow_power(myseed), G.glow_color)
setDir(CalcDir())
var/base_icon_state = initial(icon_state)
if(!floor)
switch(dir) //offset to make it be on the wall rather than on the floor
@@ -49,10 +74,12 @@ obj/effect/glowshroom/glowcap
else //if on the floor, glowshroom on-floor sprite
icon_state = "[base_icon_state]f"
addtimer(src, "Spread", delay)
addtimer(src, "Spread", delay, FALSE)
/obj/effect/glowshroom/proc/Spread()
for(var/i = 1 to yield)
var/turf/ownturf = get_turf(src)
var/shrooms_planted = 0
for(var/i in 1 to myseed.yield)
if(prob(1/(generation * generation) * 100))//This formula gives you diminishing returns based on generation. 100% with 1st gen, decreasing to 25%, 11%, 6, 4, 2...
var/list/possibleLocs = list()
var/spreadsIntoAdjacent = FALSE
@@ -61,6 +88,8 @@ obj/effect/glowshroom/glowcap
spreadsIntoAdjacent = TRUE
for(var/turf/simulated/floor/earth in view(3,src))
if(!ownturf.CanAtmosPass(earth))
continue
if(spreadsIntoAdjacent || !locate(/obj/effect/glowshroom) in view(1,earth))
possibleLocs += earth
CHECK_TICK
@@ -81,14 +110,16 @@ obj/effect/glowshroom/glowcap
if(shroomCount >= placeCount)
continue
var/obj/effect/glowshroom/child = new type(newLoc)//The baby mushrooms have different stats :3
child.potency = max(potency + rand(-3,6), 0)
child.yield = max(yield + rand(-1,2), 0)
child.delay = max(delay + rand(-30,60), 0)
child.endurance = max(endurance + rand(-3,6), 1)
var/obj/effect/glowshroom/child = new type(newLoc, myseed, TRUE)
child.generation = generation + 1
shrooms_planted++
CHECK_TICK
else
shrooms_planted++ //if we failed due to generation, don't try to plant one later
if(shrooms_planted < myseed.yield) //if we didn't get all possible shrooms planted, try again later
myseed.yield -= shrooms_planted
addtimer(src, "Spread", delay, FALSE)
/obj/effect/glowshroom/proc/CalcDir(turf/location = loc)
var/direction = 16
@@ -146,4 +177,4 @@ obj/effect/glowshroom/glowcap
/obj/effect/glowshroom/proc/CheckEndurance()
if(endurance <= 0)
qdel(src)
qdel(src)
@@ -13,7 +13,7 @@
var/mob/living/carbon/M = AM
M.slip("soap", 4, 2)
/obj/item/weapon/soap/afterattack(atom/target, mob/user as mob, proximity)
/obj/item/weapon/soap/afterattack(atom/target, mob/user, proximity)
if(!proximity) return
//I couldn't feasibly fix the overlay bugs caused by cleaning items we are wearing.
//So this is a workaround. This also makes more sense from an IC standpoint. ~Carn
@@ -37,6 +37,9 @@
var/obj/effect/decal/cleanable/C = locate() in target
qdel(C)
target.clean_blood()
if(istype(target, /turf/simulated))
var/turf/simulated/T = target
T.dirt = 0
return
/obj/item/weapon/soap/attack(mob/target as mob, mob/user as mob)
@@ -3,7 +3,7 @@
desc = "A rod of pure obsidian, its very presence disrupts and dampens the powers of Nar-Sie's followers."
icon_state = "nullrod"
item_state = "nullrod"
force = 18
force = 15
throw_speed = 3
throw_range = 4
throwforce = 10
@@ -197,7 +197,7 @@
item_state = "hfrequency1"
desc = "Bad references are the DNA of the soul."
attack_verb = list("chopped", "sliced", "cut", "zandatsu'd")
/obj/item/weapon/nullrod/scythe/spellblade
icon_state = "spellblade"
item_state = "spellblade"
@@ -328,7 +328,7 @@
icon = 'icons/obj/toy.dmi'
icon_state = "carpplushie"
item_state = "carp_plushie"
force = 15
force = 13
attack_verb = list("bitten", "eaten", "fin slapped")
hitsound = 'sound/weapons/bite.ogg'
var/used_blessing = FALSE
@@ -346,7 +346,7 @@
name = "monk's staff"
desc = "A long, tall staff made of polished wood. Traditionally used in ancient old-Earth martial arts, now used to harass the clown."
w_class = 4
force = 15
force = 13
block_chance = 40
slot_flags = SLOT_BACK
sharp = 0
+1
View File
@@ -28,6 +28,7 @@
/obj/item/weapon/mop/proc/clean(turf/simulated/A)
if(reagents.has_reagent("water", 1) || reagents.has_reagent("cleaner", 1) || reagents.has_reagent("holywater", 1))
A.clean_blood()
A.dirt = 0
for(var/obj/effect/O in A)
if(is_cleanable(O))
qdel(O)
+3 -3
View File
@@ -280,7 +280,7 @@
icon_state = "jaws_cutter"
item_state = "jawsoflife"
origin_tech = "materials=2;engineering=2"
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_GOLD=25)
usesound = 'sound/items/jaws_cut.ogg'
toolspeed = 0.25
@@ -495,7 +495,7 @@
//Switches the welder on
/obj/item/weapon/weldingtool/proc/switched_on(mob/user)
if(!status)
to_chat(user, "span class='warning'>[src] can't be turned on while unsecured!</span>")
to_chat(user, "<span class='warning'>[src] can't be turned on while unsecured!</span>")
return
welding = !welding
if(welding)
@@ -692,7 +692,7 @@ obj/item/weapon/weldingtool/experimental/process()
desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a prying head."
icon_state = "jaws_pry"
item_state = "jawsoflife"
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_DIAMOND=25)
origin_tech = "materials=2;engineering=2"
usesound = 'sound/items/jaws_pry.ogg'
force = 15
@@ -20,6 +20,12 @@
/obj/structure/stool/bed/MouseDrop(atom/over_object)
..(over_object, skip_fucking_stool_shit = 1)
/obj/structure/stool/bed/attackby(obj/item/weapon/W as obj, mob/user, params)
if(iswrench(W))
playsound(loc, W.usesound, 50, 1)
new /obj/item/stack/sheet/metal(loc, 2)
qdel(src)
/obj/structure/stool/psychbed
name = "psych bed"
desc = "For prime comfort during psychiatric evaluations."
@@ -54,7 +60,7 @@
/obj/structure/stool/bed/attack_animal(var/mob/living/simple_animal/M)//No more buckling hostile mobs to chairs to render them immobile forever
if(M.environment_smash)
new /obj/item/stack/sheet/metal(src.loc)
new /obj/item/stack/sheet/metal(loc)
qdel(src)
@@ -73,7 +79,7 @@
if(buckled_mob)
user_unbuckle_mob(user)
else
user.visible_message("<span class='notice'>[user] collapses \the [src.name].</span>", "<span class='notice'>You collapse \the [src.name].</span>")
user.visible_message("<span class='notice'>[user] collapses \the [name].</span>", "<span class='notice'>You collapse \the [name].</span>")
new/obj/item/roller(get_turf(src))
qdel(src)
return
@@ -107,8 +113,8 @@
if(istype(W, /obj/item/roller_holder))
var/obj/item/roller_holder/RH = W
if(!RH.held)
user.visible_message("<span class='notice'>[user] collects \the [src.name].</span>", "<span class='notice'>You collect \the [src.name].</span>")
src.forceMove(RH)
user.visible_message("<span class='notice'>[user] collects \the [name].</span>", "<span class='notice'>You collect \the [name].</span>")
forceMove(RH)
RH.held = src
/obj/structure/stool/bed/roller/MouseDrop(over_object, src_location, over_location)
@@ -118,7 +124,7 @@
return
if(buckled_mob)
return 0
usr.visible_message("<span class='notice'>[usr] collapses \the [src.name].</span>", "<span class='notice'>You collapse \the [src.name].</span>")
usr.visible_message("<span class='notice'>[usr] collapses \the [name].</span>", "<span class='notice'>You collapse \the [name].</span>")
new/obj/item/roller(get_turf(src))
qdel(src)
return
@@ -12,25 +12,25 @@
return
if(2.0)
if(prob(70))
new /obj/item/stack/sheet/metal(src.loc)
new /obj/item/stack/sheet/metal(loc)
qdel(src)
return
if(3.0)
if(prob(50))
new /obj/item/stack/sheet/metal(src.loc)
new /obj/item/stack/sheet/metal(loc)
qdel(src)
return
return
/obj/structure/stool/blob_act()
if(prob(75))
new /obj/item/stack/sheet/metal(src.loc)
new /obj/item/stack/sheet/metal(loc)
qdel(src)
/obj/structure/stool/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, W.usesound, 50, 1)
new /obj/item/stack/sheet/metal(src.loc)
playsound(loc, W.usesound, 50, 1)
new /obj/item/stack/sheet/metal(loc)
qdel(src)
/obj/structure/stool/MouseDrop(atom/over_object, src_location, over_location, src_control, over_control, params, skip_fucking_stool_shit = 0)
@@ -41,7 +41,7 @@
if(H==usr && !H.restrained() && !H.stat && in_range(src, over_object))
var/obj/item/weapon/stool/S = new/obj/item/weapon/stool()
S.origin = src
src.loc = S
loc = S
H.put_in_hands(S)
H.visible_message("<span class='warning'>[H] grabs [src] from the floor!</span>", "<span class='warning'>You grab [src] from the floor!</span>")