Merge branch 'master' of https://github.com/tgstation/-tg-station into explosive

Conflicts:
	code/modules/mob/living/carbon/human/life.dm
	code/modules/reagents/Chemistry-Goon-Medicine.dm
This commit is contained in:
Iamgoofball
2015-03-14 20:00:35 -07:00
209 changed files with 3397 additions and 3592 deletions
+3 -1
View File
@@ -113,7 +113,9 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
spawn(0) //Simultaneously not one at a time
var/throw_range = rand(throw_dist, max_range)
var/turf/throw_at = get_ranged_target_turf(I, throw_dir, throw_range)
I.throw_at(throw_at, throw_range,1)
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
+25 -14
View File
@@ -4,6 +4,10 @@
var/item_state = null
var/lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
var/righthand_file = 'icons/mob/inhands/items_righthand.dmi'
//Not on /clothing because for some reason any /obj/item can technically be "worn" with enough fuckery.
var/icon/alternate_worn_icon = null//If this is set, update_icons() will find on mob (WORN, NOT INHANDS) states in this file instead, primary use: badminnery/events
var/hitsound = null
var/throwhitsound = null
var/w_class = 3.0
@@ -33,7 +37,6 @@
var/list/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
var/list/allowed = null //suit storage stuff.
var/obj/item/device/uplink/hidden/hidden_uplink = null // All items can have an uplink hidden inside, just remember to add the triggers.
var/reflect_chance = 0 //This var dictates what % of a time an object will reflect an energy based weapon's shot
var/strip_delay = 40
var/put_on_delay = 20
var/m_amt = 0 // metal
@@ -48,9 +51,15 @@
var/hooded = 0
//So items can have custom embedd values
//Because customisation is king
var/embed_chance = EMBED_CHANCE
var/embedded_fall_chance = EMBEDDED_ITEM_FALLOUT
var/embedded_pain_chance = EMBEDDED_PAIN_CHANCE
var/embedded_pain_multiplier = EMBEDDED_PAIN_MULTIPLIER //The coefficient of multiplication for the damage this item does while embedded (this*w_class)
var/embedded_fall_pain_multiplier = EMBEDDED_FALL_PAIN_MULTIPLIER //The coefficient of multiplication for the damage this item does when falling out of a limb (this*w_class)
var/embedded_impact_pain_multiplier = EMBEDDED_IMPACT_PAIN_MULTIPLIER //The coefficient of multiplication for the damage this item does when first embedded (this*w_class)
var/embedded_unsafe_removal_pain_multiplier = EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER //The coefficient of multiplication for the damage removing this without surgery causes (this*w_class)
var/embedded_unsafe_removal_time = EMBEDDED_UNSAFE_REMOVAL_TIME //A time in ticks, multiplied by the w_class.
var/list/can_be_placed_into = list(
/obj/structure/table,
@@ -305,8 +314,7 @@
return 0
/obj/item/proc/IsReflect(var/def_zone) //This proc determines if and at what% an object will reflect energy projectiles if it's in l_hand,r_hand or wear_suit
if(prob(reflect_chance))
return 1
return 0
/obj/item/proc/eyestab(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
@@ -417,16 +425,19 @@
/obj/item/throw_impact(A)
if(istype(A, /mob/living/carbon/human))
var/mob/living/carbon/human/H = A
if(can_embed(src))
if(prob(embed_chance))
var/obj/item/organ/limb/L = pick(H.organs)
L.embedded_objects |= src
add_blood(H)//it embedded itself in you, of course it's bloody!
loc = H
L.take_damage(w_class*5)
H.visible_message("<span class='danger'>\the [name] embeds itself in [H]'s [L.getDisplayName()]!</span>","<span class='userdanger'>\the [name] embeds itself in your [L.getDisplayName()]!</span>")
return
if(throw_speed >= EMBED_THROWSPEED_THRESHOLD)
if(istype(A, /mob/living/carbon/human))
var/mob/living/carbon/human/H = A
if(can_embed(src))
if(prob(embed_chance))
var/obj/item/organ/limb/L = pick(H.organs)
L.embedded_objects |= src
add_blood(H)//it embedded itself in you, of course it's bloody!
loc = H
L.take_damage(w_class*embedded_impact_pain_multiplier)
H.visible_message("<span class='danger'>\the [name] embeds itself in [H]'s [L.getDisplayName()]!</span>","<span class='userdanger'>\the [name] embeds itself in your [L.getDisplayName()]!</span>")
return
//Reset regardless of if we hit a human.
throw_speed = initial(throw_speed) //explosions change this.
..()
+3 -3
View File
@@ -809,15 +809,15 @@ var/global/list/obj/item/device/pda/PDAs = list()
t = Gibberish(t, signal.data["compression"] + 50)
if(useMS && useTC) // only send the message if it's stable
if(useTC != 2) // Does our recepient have a broadcaster on their level?
U << "ERROR: Cannot reach recepient."
if(useTC != 2) // Does our recipient have a broadcaster on their level?
U << "ERROR: Cannot reach recipient."
return
useMS.send_pda_message("[P.owner]","[owner]","[t]")
tnote += "<i><b>&rarr; To [P.owner]:</b></i><br>[t]<br>"
P.tnote += "<i><b>&larr; From <a href='byond://?src=\ref[P];choice=Message;target=\ref[src]'>[owner]</a> ([ownjob]):</b></i><br>[t]<br>"
for(var/mob/M in player_list)
if(isobserver(M) && M.client && (M.client.prefs.toggles & CHAT_GHOSTPDA))
if(isobserver(M) && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTPDA))
M.show_message("<span class='game say'>PDA Message - <span class='name'>[owner]</span> -> <span class='name'>[P.owner]</span>: <span class='message'>[t]</span></span>")
if (!P.silent)
@@ -157,6 +157,10 @@
update_icon()
return
/obj/item/weapon/flamethrower/CheckParts()
weldtool = locate(/obj/item/weapon/weldingtool) in contents
igniter = locate(/obj/item/device/assembly/igniter) in contents
update_icon()
//Called from turf.dm turf/dblclick
/obj/item/weapon/flamethrower/proc/flame_turf(turflist)
@@ -195,9 +199,11 @@
/obj/item/weapon/flamethrower/full/New(var/loc)
..()
weldtool = new /obj/item/weapon/weldingtool(src)
if(!weldtool)
weldtool = new /obj/item/weapon/weldingtool(src)
weldtool.status = 0
igniter = new /obj/item/device/assembly/igniter(src)
if(!igniter)
igniter = new /obj/item/device/assembly/igniter(src)
igniter.secured = 0
status = 1
update_icon()
@@ -205,4 +211,4 @@
/obj/item/weapon/flamethrower/full/tank/New(var/loc)
..()
ptank = new /obj/item/weapon/tank/internals/plasma/full(src)
update_icon()
update_icon()
+4 -1
View File
@@ -680,7 +680,10 @@
<h2>Basic ingredients preparation:</h2>
<b>Dough:</b> Add an egg to 15 flour. Dough can be transformed by using your knife and rolling pin or by adding milk. All doughs can be microwaved.<br>
<b>Dough:</b> 10u water + 15u flour for simple dough.<br>
15u egg yolk + 15u flour + 5u sugar for cake batter.<br>
Doughs can be transformed by using a knife and rolling pin.<br>
All doughs can be microwaved.<br>
<b>Bowl:</b> Add water to it for soup preparation.<br>
<b>Meat:</b> Microwave it, process it, slice it into microwavable cutlets with your knife, or use it raw.<br>
<b>Cheese:</b> Add 5u universal enzyme (catalyst) to milk and soy milk to prepare cheese (sliceable) and tofu.
@@ -70,7 +70,6 @@
w_class = 4
playsound(user, 'sound/weapons/saberon.ogg', 35, 1)
user << "<span class='notice'>[src] is now active.</span>"
reflect_chance = 40
else
force = 3
throwforce = 3
@@ -78,7 +77,6 @@
w_class = 1
playsound(user, 'sound/weapons/saberoff.ogg', 35, 1)
user << "<span class='notice'>[src] can now be concealed.</span>"
reflect_chance = 0
add_fingerprint(user)
/obj/item/weapon/shield/riot/tele
@@ -277,7 +277,7 @@
max_combined_w_class = 21
max_w_class = 3
w_class = 4 //Bigger than a book because physics
can_hold = list(/obj/item/weapon/book, /obj/item/weapon/spellbook) //No bibles, consistent with bookcase
can_hold = list(/obj/item/weapon/book, /obj/item/weapon/storage/book, /obj/item/weapon/spellbook)
/*
* Trays - Agouri
@@ -35,18 +35,6 @@
else
user << "<span class='danger'>Access Denied.</span>"
return
else if(istype(W, /obj/item/weapon/melee/energy/blade) && !src.broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = src.icon_broken
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
visible_message("<span class='notice'>[user] has sliced open \the [src] with an energy blade!</span>", "<span class='danger'>You hear metal being sliced and sparks flying.</span>")
return
if(!locked)
..()
else
@@ -33,21 +33,6 @@
/obj/item/weapon/storage/secure/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(locked)
if (istype(W, /obj/item/weapon/melee/energy/blade) && !emagged)
emagged = 1
src.overlays += image('icons/obj/storage.dmi', icon_sparking)
sleep(6)
src.overlays = null
overlays += image('icons/obj/storage.dmi', icon_locking)
locked = 0
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
user << "You slice through the lock on [src]."
return
if (istype(W, /obj/item/weapon/screwdriver))
if (do_after(user, 20))
src.open =! src.open
@@ -96,6 +96,7 @@
F.ptank = src
user.unEquip(src)
src.loc = F
F.update_icon()
return
/obj/item/weapon/tank/internals/plasma/full/New()
+1
View File
@@ -308,6 +308,7 @@
//Toggles the welder off and on
/obj/item/weapon/weldingtool/proc/toggle(mob/user, message = 0)
if(!status)
user << "<span class='notice'>[src] can't be turned on while unsecured.</span>"
return
welding = !welding
if(welding)
+4 -4
View File
@@ -192,7 +192,6 @@ obj/item/weapon/twohanded/
item_color = "green"
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
var/hacked = 0
reflect_chance = 0
/obj/item/weapon/twohanded/dualsaber/New()
item_color = pick("red", "blue", "green", "purple")
@@ -234,7 +233,7 @@ obj/item/weapon/twohanded/
user << "<span class='warning'>You cant pick up such dangerous item with your meaty hands without losing fingers, better not to.</span>"
return 1
/obj/item/weapon/twohanded/dualsaber/wield(mob/living/carbon/M) //Specific wield () hulk checks due to reflect_chance var for balance issues and switches hitsounds.
/obj/item/weapon/twohanded/dualsaber/wield(mob/living/carbon/M) //Specific wield () hulk checks due to reflection chance for balance issues and switches hitsounds.
if(istype(M))
if(M.dna.check_mutation(HULK))
M << "<span class='warning'>You lack the grace to wield this.</span>"
@@ -279,9 +278,10 @@ obj/item/weapon/twohanded/
w_class = 4.0
slot_flags = SLOT_BACK
force_unwielded = 10
force_wielded = 18 // Was 13, Buffed - RR
force_wielded = 18
throwforce = 20
throw_speed = 3
throw_speed = 4
embedded_impact_pain_multiplier = 3
flags = NOSHIELD
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
+10 -2
View File
@@ -138,11 +138,15 @@ obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob, params)
icon_state = "throwingstar"
item_state = "eshield0"
force = 2
throwforce = 20
throwforce = 0 //This is never used since this has a 100% embed chance.
throw_speed = 4
embedded_pain_multiplier = 4
w_class = 2
embed_chance = 100
embedded_fall_chance = 0 //Hahaha!
//5*(2*4) = 5*8 = 45, 45 damage if you hit one person with all 5 stars.
//Not counting the damage it will do while embedded (2*4 = 8, at 15% chance)
/obj/item/weapon/storage/box/throwing_stars/New()
..()
contents = list()
@@ -150,4 +154,8 @@ obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob, params)
new /obj/item/weapon/throwing_star(src)
new /obj/item/weapon/throwing_star(src)
new /obj/item/weapon/throwing_star(src)
new /obj/item/weapon/throwing_star(src)
new /obj/item/weapon/throwing_star(src)
@@ -55,6 +55,12 @@ LINEN BINS
icon_state = "sheetpurple"
item_color = "purple"
/obj/item/weapon/bedsheet/patriot
name = "patriotic bedsheet"
desc = "You've never felt more free than when sleeping on this."
icon_state = "sheetUSA"
item_color = "sheetUSA"
/obj/item/weapon/bedsheet/rainbow
name = "rainbow bedsheet"
desc = "A multicolored blanket. It's actually several different sheets cut up and sewn together."
@@ -65,18 +65,6 @@
if(!src.opened && src.broken)
user << "<span class='notice'>The locker appears to be broken.</span>"
return
else if(istype(W, /obj/item/weapon/melee/energy/blade) && !broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = icon_off
flick(icon_broken, src)
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
visible_message("<span class='warning'>[user] has sliced the locker open with an energy blade!</span>", "You hear metal being sliced and sparks flying.")
else
..(W, user)
@@ -307,17 +307,6 @@
overlays += redlight
add_fingerprint(user)
return
else if (istype(W, /obj/item/weapon/melee/energy/blade) && locked && !broken)
overlays.Cut()
overlays += emag
overlays += sparks
spawn(6) overlays -= sparks //Tried lots of stuff but nothing works right. so i have to use this *sadface*
playsound(src.loc, "sparks", 60, 1)
src.locked = 0
src.broken = 1
user << "<span class='notice'>You unlock \the [src].</span>"
add_fingerprint(user)
return
return ..()
+3 -4
View File
@@ -118,16 +118,15 @@
else
user << "<span class='warning'>You can't reach, close it first!</span>"
if(istype(W, /obj/item/weapon/pickaxe/plasmacutter) || istype(W, /obj/item/weapon/melee/energy/blade))
if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
dismantle(user)
if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer))
var/obj/item/weapon/pickaxe/drill/jackhammer/D = W
if(!D.bcell.use(300))
user << "<span class='notice'>Your jackhammer doesn't have enough power to break through that wall.</span>"
D.update_charge()
user << "<span class='notice'>Your [D.name] doesn't have enough power to break through the [name].</span>"
return
D.update_charge()
D.update_icon()
D.playDigSound()
dismantle(user)
+3 -4
View File
@@ -45,9 +45,9 @@
else if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer))
var/obj/item/weapon/pickaxe/drill/jackhammer/D = W
if(!D.bcell.use(D.drillcost))
D.update_charge()
user << "<span class='notice'>Your [D.name] doesn't have enough power to break through the [name].</span>"
return
D.update_charge()
D.update_icon()
user << "<span class='notice'>You smash through the girder!</span>"
new /obj/item/stack/sheet/metal(get_turf(src))
D.playDigSound()
@@ -292,9 +292,8 @@
else if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer))
var/obj/item/weapon/pickaxe/drill/jackhammer/D = W
if(!D.bcell.use(D.drillcost))
D.update_charge()
return
D.update_charge()
D.update_icon()
user << "<span class='notice'>Your jackhammer smashes through the girder!</span>"
var/obj/effect/decal/remains/human/R = new (get_turf(src))
transfer_fingerprints_to(R)
+7 -2
View File
@@ -250,9 +250,14 @@
else
user << "<span class='notice'>You'll need the keys in one of your hands to drive this [callme].</span>"
/obj/structure/stool/bed/chair/janicart/user_buckle_mob(mob/living/M, mob/user)
M.loc = loc
if(user.incapacitated()) //user can't move the mob on the janicart's turf if incapacitated
return
for(var/atom/movable/A in get_turf(src)) //we check for obstacles on the turf.
if(A.density)
if(A != src && A != M)
return
M.loc = loc //we move the mob on the janicart's turf before checking if we can buckle.
..()
update_mob()
+93 -1
View File
@@ -100,4 +100,96 @@
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
shatter()
shatter()
/obj/structure/mirror/magic
name = "magic mirror"
desc = "Turn and face the strange... face."
icon_state = "magic_mirror"
/obj/structure/mirror/magic/attack_hand(mob/user as mob)
if(!ishuman(user))
return
var/mob/living/carbon/human/H = user
var/choice = input(user, "Something to change?", "Magical Grooming") as null|anything in list("name", "race", "gender", "hair", "eyes")
switch(choice)
if("name")
var/newname = copytext(sanitize(input(H, "Who are we again?", "Name change", H.name) as null|text),1,MAX_NAME_LEN)
if(!newname)
return
H.real_name = newname
H.name = newname
if(H.mind)
H.mind.name = newname
if("race")
var/newrace
var/racechoice = input(H, "What are we again?", "Race change") as null|anything in species_list
newrace = species_list[racechoice]
if(!newrace || !H.dna)
return
H.dna.species = new newrace
if(H.dna.species.use_skintones)
var/new_s_tone = input(user, "What are we again?", "Race change") as null|anything in skin_tones
if(new_s_tone)
H.skin_tone = new_s_tone
if(MUTCOLORS in H.dna.species.specflags)
var/new_mutantcolor = input(user, "Choose your skin color:", "Race change") as color|null
if(new_mutantcolor)
var/temp_hsv = RGBtoHSV(new_mutantcolor)
if(ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright
H.dna.mutant_color = sanitize_hexcolor(new_mutantcolor)
else
H << "<span class='notice'>Invalid color. Your color is not bright enough.</span>"
H.regenerate_icons()
if("gender")
if(!(H.gender in list("male", "female"))) //blame the patriarchy
return
if(H.gender == "male")
if(alert(H, "Become a Witch?", "Confirmation", "Yes", "No") == "Yes")
H.gender = "female"
H << "<span class='notice'>Man, you feel like a woman!</span>"
H.regenerate_icons()
else
if(alert(H, "Become a Warlock?", "Confirmation", "Yes", "No") == "Yes")
H.gender = "male"
H << "<span class='notice'>Whoa man, you feel like a man!</span>"
H.regenerate_icons()
if("hair")
var/hairchoice = alert(H, "Hair style or hair color?", "Change Hair", "Style", "Color")
if(hairchoice == "Style") //So you just want to use a mirror then?
..()
else
var/new_hair_color = input(H, "Choose your hair color", "Hair Color") as null|color
if(new_hair_color)
H.hair_color = sanitize_hexcolor(new_hair_color)
if(H.gender == "male")
var/new_face_color = input(H, "Choose your facial hair color", "Hair Color") as null|color
if(new_face_color)
H.facial_hair_color = sanitize_hexcolor(new_face_color)
H.update_hair()
if("eyes")
var/new_eye_color = input(H, "Choose your eye color", "Eye Color") as null|color
if(new_eye_color)
H.eye_color = sanitize_hexcolor(new_eye_color)
H.update_body()
+2 -2
View File
@@ -57,9 +57,9 @@
else if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer))
var/obj/item/weapon/pickaxe/drill/jackhammer/D = W
if(!D.bcell.use(D.drillcost))
D.update_charge()
user << "<span class='notice'>Your [D.name] doesn't have enough power to break through the [name].</span>"
return
D.update_charge()
D.update_icon()
if(!src.loc)
return
user.visible_message("<span class='notice'>[user] destroys the [name]!</span>", \
@@ -26,7 +26,7 @@
*/
/obj/structure/stool/bed/nest/user_buckle_mob(mob/M as mob, mob/user as mob)
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
return
if(istype(M,/mob/living/carbon/alien))
@@ -36,27 +36,22 @@
unbuckle_mob()
if(M == usr)
return
else
if(buckle_mob(M))
M.visible_message(\
"<span class='notice'>[user.name] secretes a thick vile goo, securing [M.name] into [src]!</span>",\
"<span class='warning'>[user.name] drenches you in a foul-smelling resin, trapping you in [src]!</span>",\
"<span class='notice'>You hear squelching...</span>")
return
/obj/structure/stool/bed/nest/post_buckle_mob(mob/living/M)
if(M == buckled_mob)
M.pixel_y += 1
M.pixel_y += 6
M.pixel_x += 2
overlays += image('icons/mob/alien.dmi', "nestoverlay", layer=6)
else
buckled_mob.pixel_y -= 1
buckled_mob.pixel_x -= 2
M.pixel_x -= 2
M.pixel_y = initial(M.pixel_y)
overlays.Cut()
/obj/structure/stool/bed/nest/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
var/aforce = W.force
health = max(0, health - aforce)
@@ -314,16 +314,6 @@
if(isrobot(user))
return
if(istype(I, /obj/item/weapon/melee/energy/blade))
var/datum/effect/effect/system/spark_spread/SS = new /datum/effect/effect/system/spark_spread()
SS.set_up(5, 0, src.loc)
SS.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
user.visible_message("<span class='notice'>The [src.name] was sliced apart by [user]!</span>")
table_destroy(1)
return
if(!(I.flags & ABSTRACT)) //rip more parems rip in peace ;_;
if(user.drop_item())
I.Move(loc)