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

Conflicts:
	code/defines/obj/weapon.dm
	code/modules/hydroponics/trays/tray_tools.dm
This commit is contained in:
Tigercat2000
2015-05-10 14:15:51 -07:00
97 changed files with 5080 additions and 3482 deletions
@@ -171,6 +171,16 @@
icon = 'icons/effects/tomatodecal.dmi'
random_icon_states = list("smashed_pie")
/obj/effect/decal/cleanable/fruit_smudge
name = "smudge"
desc = "Some kind of fruit smear."
density = 0
anchored = 1
layer = 2
icon = 'icons/effects/blood.dmi'
icon_state = "mfloor1"
random_icon_states = list("mfloor1", "mfloor2", "mfloor3", "mfloor4", "mfloor5", "mfloor6", "mfloor7")
/obj/effect/decal/cleanable/fungus
name = "space fungus"
desc = "A fungal growth. Looks pretty nasty."
+45 -9
View File
@@ -79,6 +79,9 @@ would spawn and follow the beaker, even if it is carried or thrown.
/obj/effect/effect/water/Bump(atom/A)
if(reagents)
reagents.reaction(A)
if(istype(A,/atom/movable))
var/atom/movable/AM = A
AM.water_act(life, 310.15, src)
return ..()
@@ -423,6 +426,28 @@ steam.start() -- spawns the effect
return
// Spores
/datum/effect/effect/system/chem_smoke_spread/spores
var/datum/seed/seed
/datum/effect/effect/system/chem_smoke_spread/spores/New(seed_name)
if(seed_name && plant_controller)
seed = plant_controller.seeds[seed_name]
if(!seed)
del(src)
..()
/datum/effect/effect/system/chem_smoke_spread/New()
..()
chemholder = new/obj()
var/datum/reagents/R = new/datum/reagents(500)
chemholder.reagents = R
R.my_atom = chemholder
/datum/effect/effect/system/chem_smoke_spread
var/total_smoke = 0 // To stop it being spammed and lagging!
var/direction
@@ -460,16 +485,20 @@ steam.start() -- spawns the effect
var/where = "[A.name] | [location.x], [location.y]"
var/whereLink = "<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>[where]</a>"
if(carry.my_atom.fingerprintslast)
var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast)
var/more = ""
if(M)
more = "(<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</a>)"
msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1)
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].")
if(carry && carry.my_atom)
if(carry.my_atom.fingerprintslast)
var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast)
var/more = ""
if(M)
more = "(<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</a>)"
msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1)
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].")
else
msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1)
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")
else
msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1)
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")
msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key. CODERS: carry.my_atom may be null.", 0, 1)
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key. CODERS: carry.my_atom may be null.")
start(effect_range = 2)
var/i = 0
@@ -482,6 +511,13 @@ steam.start() -- spawns the effect
var/mob/living/carbon/C = A
if(!(C.wear_mask && (C.internals != null || C.wear_mask.flags & BLOCK_GAS_SMOKE_EFFECT)))
chemholder.reagents.copy_to(C, chemholder.reagents.total_volume)
if(istype(A, /obj/machinery/portable_atmospherics/hydroponics))
var/obj/machinery/portable_atmospherics/hydroponics/tray = A
chemholder.reagents.copy_to(tray, chemholder.reagents.total_volume)
if(istype(A, /obj/effect/plant))
var/obj/effect/plant/plant = A
if(chemholder.reagents.has_reagent("atrazine"))
plant.die_off()
qdel(smokeholder)
for(i=0, i<src.number, i++)
if(src.total_smoke > 20)
+97 -2
View File
@@ -74,16 +74,43 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
for(var/turf/T in trange(max_range, epicenter))
var/dist = cheap_pythag(T.x - x0,T.y - y0)
if(config.reactionary_explosions)
var/turf/Trajectory = T
while(Trajectory != epicenter)
Trajectory = get_step_towards(Trajectory, epicenter)
if(Trajectory.density && Trajectory.explosion_block)
dist += Trajectory.explosion_block
for(var/obj/machinery/door/D in Trajectory)
if(D.density && D.explosion_block)
dist += D.explosion_block
var/throw_dist = dist
if(dist < devastation_range) dist = 1
else if(dist < heavy_impact_range) dist = 2
else if(dist < light_impact_range) dist = 3
else continue
else dist = 0
T.ex_act(dist)
if(T)
for(var/atom_movable in T.contents) //bypass type checking since only atom/movable can be contained by turfs anyway
var/atom/movable/AM = atom_movable
if(AM) AM.ex_act(dist)
// if(flame_dist && prob(40) && !istype(T, /turf/space) && !T.density)
// PoolOrNew(/obj/effect/hotspot, T) //Mostly for ambience!
if(dist > 0)
T.ex_act(dist)
//--- THROW ITEMS AROUND ---
var/throw_dir = get_dir(epicenter,T)
for(var/obj/item/I in T)
spawn(0) //Simultaneously not one at a time
if(I)
var/throw_range = rand(throw_dist, max_range)
var/turf/throw_at = get_ranged_target_turf(I, throw_dir, throw_range)
I.throw_speed = 4 //Temporarily change their throw_speed for embedding purposes (Reset when it finishes throwing, regardless of hitting anything)
I.throw_at(throw_at, throw_range, 2)//Throw it at 2 speed, this is purely visual anyway.
var/took = (world.timeofday-start)/10
//You need to press the DebugGame verb to see these now....they were getting annoying and we've collected a fair bit of data. Just -test- changes to explosion code using this please so we can compare
@@ -109,3 +136,71 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
proc/secondaryexplosion(turf/epicenter, range)
for(var/turf/tile in trange(range, epicenter))
tile.ex_act(2)
/client/proc/check_bomb_impacts()
set name = "Check Bomb Impact"
set category = "Debug"
var/newmode = alert("Use reactionary explosions?","Check Bomb Impact", "Yes", "No")
var/turf/epicenter = get_turf(src)
var/dev = 0
var/heavy = 0
var/light = 0
var/list/choices = list("Small Bomb","Medium Bomb","Big Bomb","Custom Bomb")
var/choice = input("Bomb Size?") in choices
switch(choice)
if(null)
return 0
if("Small Bomb")
dev = 1
heavy = 2
light = 3
if("Medium Bomb")
dev = 2
heavy = 3
light = 4
if("Big Bomb")
dev = 3
heavy = 5
light = 7
if("Custom Bomb")
dev = input("Devestation range (Tiles):") as num
heavy = input("Heavy impact range (Tiles):") as num
light = input("Light impact range (Tiles):") as num
var/max_range = max(dev, heavy, light)
var/x0 = epicenter.x
var/y0 = epicenter.y
var/list/wipe_colours = list()
for(var/turf/T in trange(max_range, epicenter))
wipe_colours += T
var/dist = cheap_pythag(T.x - x0, T.y - y0)
if(newmode == "Yes")
var/turf/TT = T
while(TT != epicenter)
TT = get_step_towards(TT,epicenter)
if(TT.density && TT.explosion_block)
dist += TT.explosion_block
for(var/obj/machinery/door/D in TT)
if(D.density && D.explosion_block)
dist += D.explosion_block
if(dist < dev)
T.color = "red"
T.maptext = "Dev"
else if (dist < heavy)
T.color = "yellow"
T.maptext = "Heavy"
else if (dist < light)
T.color = "blue"
T.maptext = "Light"
else
continue
sleep(100)
for(var/turf/T in wipe_colours)
T.color = null
T.maptext = ""
+3 -3
View File
@@ -61,7 +61,7 @@
// identify_probability = 0
New()
..()
var/global/list/chems_only = list("slimejelly","blood","water","lube","charcoal","toxin","cyanide","morphine","epinephrine","space_drugs","serotrotium","oxygen","copper","nitrogen","hydrogen","potassium","mercury","sulfur","carbon","chlorine","fluorine","sodium","phosphorus","lithium","sugar","sacid","facid","glycerol","radium","mutadone","thermite","mutagen","virusfood","iron","gold","silver","uranium","aluminum","silicon","fuel","cleaner","atrazine","plasma","teporone","lexorin","silver_sulfadiazine","salbutamol","perfluorodecalin","omnizine","synaptizine","haloperidol","potass_iodide","pen_acid","mannitol","oculine","styptic_powder","methamphetamine","cryoxadone","clonexadone","spaceacillin","carpotoxin","mindbreaker","fluorosurfactant","fluorosurfactant","ethanol","ammonia","diethylamine","antihol","pancuronium","lipolicide","condensedcapsaicin","frostoil","amanitin","psilocybin","enzyme","nothing","salglu_solution","antifreeze","neurotoxin")
var/global/list/chems_only = list("slimejelly","blood","water","lube","charcoal","toxin","cyanide","morphine","epinephrine","space_drugs","serotrotium","oxygen","copper","nitrogen","hydrogen","potassium","mercury","sulfur","carbon","chlorine","fluorine","sodium","phosphorus","lithium","sugar","sacid","facid","glycerol","radium","mutadone","thermite","mutagen","virusfood","iron","gold","silver","uranium","aluminum","silicon","fuel","cleaner","atrazine","plasma","teporone","lexorin","silver_sulfadiazine","salbutamol","perfluorodecalin","omnizine","synaptizine","haloperidol","potass_iodide","pen_acid","mannitol","oculine","styptic_powder","methamphetamine","cryoxadone","spaceacillin","carpotoxin","mindbreaker","fluorosurfactant","fluorosurfactant","ethanol","ammonia","diethylamine","antihol","pancuronium","lipolicide","condensedcapsaicin","frostoil","amanitin","psilocybin","enzyme","nothing","salglu_solution","antifreeze","neurotoxin")
var/global/list/rare_chems = list("minttoxin","nanites","xenomicrobes","adminordrazine")
var/datum/reagent/R = pick(chems_only + rare_chems)
@@ -198,7 +198,7 @@
B.desc = "Looks like the label fell off."
// B.identify_probability = 0
/*
/obj/structure/closet/crate/bin/flowers
name = "flower barrel"
desc = "A bin full of fresh flowers for the bereaved."
@@ -211,7 +211,6 @@
AM.pixel_x = rand(-10,10)
AM.pixel_y = rand(-5,5)
/obj/structure/closet/crate/bin/plants
name = "plant barrel"
desc = "Caution: Contents may contain vitamins and minerals. It is recommended that you deep fry them before eating."
@@ -234,6 +233,7 @@
var/obj/O = new ptype(src)
O.pixel_x = rand(-10,10)
O.pixel_y = rand(-5,5)
*/
/obj/structure/closet/secure_closet/random_drinks
name = "Unlabelled Booze"
@@ -245,6 +245,16 @@ CIGARETTE PACKETS ARE IN FANCY.DM
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
/obj/item/clothing/mask/cigarette/handroll
name = "hand-rolled cigarette"
desc = "A roll of tobacco and nicotine, freshly rolled by hand."
icon_state = "hr_cigoff"
item_state = "hr_cigoff"
icon_on = "hr_cigon" //Note - these are in masks.dmi not in cigarette.dmi
icon_off = "hr_cigoff"
type_butt = /obj/item/weapon/cigbutt
chem_volume = 50
////////////
// CIGARS //
////////////
@@ -498,7 +508,7 @@ obj/item/weapon/rollingpaper
name = "rolling paper"
desc = "A thin piece of paper used to make fine smokeables."
icon = 'icons/obj/cigarettes.dmi'
icon_state = "cig paper"
icon_state = "cig_paper"
w_class = 1
+1 -1
View File
@@ -30,7 +30,7 @@
B1.reagents.add_reagent("blood",60)
if(prob(5))
B1.reagents.add_reagent("blood",1) // Quality control problems, causes a mess
B2.reagents.add_reagent("clonexadone",30)
B2.reagents.add_reagent("cryoxadone",30)
beakers += B1
beakers += B2
@@ -146,7 +146,7 @@
if(!user.gloves)
user << "\red The [name] burns your bare hand!"
user.adjustFireLoss(rand(1,5))
/*
/*
* Nettle
*/
@@ -237,3 +237,4 @@
new /obj/item/clothing/mask/cigarette/pipe/cobpipe (user.loc)
del(src)
return
*/
@@ -38,6 +38,26 @@
show_to(M)
return
if ((istype(over_object, /obj/structure/table) || istype(over_object, /turf/simulated/floor)) \
&& contents.len && loc == usr && !usr.stat && !usr.restrained() && usr.canmove && over_object.Adjacent(usr) \
&& !istype(src, /obj/item/weapon/storage/lockbox))
var/turf/T = get_turf(over_object)
if (istype(over_object, /turf/simulated/floor))
if (get_turf(usr) != T)
return // Can only empty containers onto the floor under you
if("Yes" != alert(usr,"Empty \the [src] onto \the [T]?","Confirm","Yes","No"))
return
if(!(usr && over_object && contents.len && loc == usr && !usr.stat && !usr.restrained() && usr.canmove && get_turf(usr) == T))
return // Something happened while the player was thinking
hide_from(usr)
usr.face_atom(over_object)
usr.visible_message("<span class='notice'>[usr] empties \the [src] onto \the [over_object].</span>",
"<span class='notice'>You empty \the [src] onto \the [over_object].</span>")
for(var/obj/item/I in contents)
remove_from_storage(I, T)
update_icon() // For content-sensitive icons
return
if (!( istype(over_object, /obj/screen) ))
return ..()
if (!(src.loc == usr) || (src.loc && src.loc.loc == usr))
+21 -4
View File
@@ -146,8 +146,10 @@
if (M.loc == loc)
wash(M)
check_heat(M)
M.water_act(100, convertHeat(), src)
for (var/atom/movable/G in src.loc)
G.clean_blood()
G.water_act(100, convertHeat(), src)
/obj/machinery/shower/attackby(obj/item/I as obj, mob/user as mob, params)
if(I.type == /obj/item/device/analyzer)
@@ -163,6 +165,8 @@
if("boiling")
watertemp = "normal"
user.visible_message("<span class='notice'>[user] adjusts the shower with the [I].</span>", "<span class='notice'>You adjust the shower with the [I].</span>")
if(on)
I.water_act(100, convertHeat(), src)
/obj/machinery/shower/update_icon() //this is terribly unreadable, but basically it makes the shower mist up
overlays.Cut() //once it's been on for a while, in addition to handling the water overlay.
@@ -201,10 +205,21 @@
mobpresent -= 1
..()
/obj/machinery/shower/proc/convertHeat()
switch(watertemp)
if("boiling")
return 340.15
if("normal")
return 310.15
if("freezing")
return 230.15
//Yes, showers are super powerful as far as washing goes.
/obj/machinery/shower/proc/wash(atom/movable/O as obj|mob)
if(!on) return
O.water_act(100, convertHeat(), src)
if(isliving(O))
var/mob/living/L = O
L.ExtinguishMob()
@@ -293,22 +308,22 @@
check_heat(C)
/obj/machinery/shower/proc/check_heat(mob/M as mob)
M.water_act(100, convertHeat(), src) //convenience
if(!on || watertemp == "normal") return
if(iscarbon(M))
var/mob/living/carbon/C = M
if(watertemp == "freezing")
C.bodytemperature = max(80, C.bodytemperature - 80)
//C.bodytemperature = max(80, C.bodytemperature - 80)
C << "<span class='warning'>The water is freezing!</span>"
return
if(watertemp == "boiling")
C.bodytemperature = min(500, C.bodytemperature + 35)
//C.bodytemperature = min(500, C.bodytemperature + 35)
C.adjustFireLoss(5)
C << "<span class='danger'>The water is searing!</span>"
return
/obj/item/weapon/bikehorn/rubberducky
name = "rubber ducky"
desc = "Rubber ducky you're so fine, you make bathtime lots of fuuun. Rubber ducky I'm awfully fooooond of yooooouuuu~" //thanks doohl
@@ -372,7 +387,9 @@
user.visible_message("\blue [user] fills the [RG] using \the [src].","\blue You fill the [RG] using \the [src].")
return
else if (istype(O, /obj/item/weapon/melee/baton))
O.water_act(20,310.15,src)
if (istype(O, /obj/item/weapon/melee/baton))
var/obj/item/weapon/melee/baton/B = O
if (B.bcell.charge > 0 && B.status == 1)
flick("baton_active", src)