Fixes issue 521.

Fixes issue 676.
Fixes issue 700.
Fixes issue 753.
Fixes issue 754.
Fixes issue 755.

Additionally I slightly cleaned up grenade code and stunglove code, and removed mustardbomb.dm (because it was fucking awful).

THIS BUGFIX TRAIN AIN'T STOPPIN'
Thanks QualityVan for the issue 521 fix, and thanks Nodrak & Tobba for pointing out my dumbness for issues 753 & 754 respectively.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4382 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
petethegoat@gmail.com
2012-08-12 19:51:08 +00:00
parent 7f0e81c5bc
commit faea964e13
12 changed files with 109 additions and 360 deletions
@@ -13,11 +13,16 @@
var/list/beakers = new/list()
var/list/allowed_containers = list("/obj/item/weapon/reagent_containers/glass/beaker", "/obj/item/weapon/reagent_containers/glass/dispenser", "/obj/item/weapon/reagent_containers/glass/bottle")
var/affected_area = 3
New()
var/datum/reagents/R = new/datum/reagents(1000)
reagents = R
R.my_atom = src
attack_self(mob/user as mob)
if(stage > 1)
..()
attackby(obj/item/weapon/W as obj, mob/user as mob)//TODO:Have grenades use the new assembly things
if(istype(W,/obj/item/device/assembly_holder) && !stage && path != 2)
+83 -70
View File
@@ -1,7 +1,6 @@
/obj/item/weapon/grenade
var/det_time = 50
desc = "It is set to detonate in 5 seconds."
name = "grenade"
desc = "A hand held grenade, with an adjustable timer."
w_class = 2.0
icon = 'icons/obj/grenade.dmi'
icon_state = "grenade"
@@ -11,80 +10,94 @@
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
var/active = 0
var/det_time = 50
proc/clown_check(var/mob/living/user)
if((CLUMSY in user.mutations) && prob(50))
user << "\red Huh? How does this thing work?!"
src.active = 1
src.icon_state = initial(icon_state) + "_active"
playsound(src.loc, 'armbomb.ogg', 75, 1, -3)
spawn(5)
src.prime()
return 0
return 1
/obj/item/weapon/grenade/proc/clown_check(var/mob/living/user)
if((CLUMSY in user.mutations) && prob(50))
user << "<span class='warning'>Huh? How does this thing work?</span>"
active = 1
icon_state = initial(icon_state) + "_active"
playsound(loc, 'armbomb.ogg', 75, 1, -3)
spawn(5)
if(user)
user.drop_item()
prime()
return 0
return 1
/* afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
if (istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
if (istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
if((user.get_active_hand() == src) && (!active) && (clown_check(user)) && target.loc != src.loc)
user << "\red You prime the [name]! [det_time/10] seconds!"
src.active = 1
src.icon_state = initial(icon_state) + "_active"
playsound(src.loc, 'armbomb.ogg', 75, 1, -3)
spawn(src.det_time)
src.prime()
/*/obj/item/weapon/grenade/afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
if (istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
if (istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
if((user.get_active_hand() == src) && (!active) && (clown_check(user)) && target.loc != src.loc)
user << "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>"
active = 1
icon_state = initial(icon_state) + "_active"
playsound(loc, 'armbomb.ogg', 75, 1, -3)
spawn(det_time)
prime()
return
user.dir = get_dir(user, target)
user.drop_item()
var/t = (isturf(target) ? target : target.loc)
walk_towards(src, t, 3)
return*/
/obj/item/weapon/grenade/examine()
set src in usr
usr << desc
if(det_time > 1)
usr << "The timer is set to [det_time/10] seconds."
return
usr << "\The [src] is set for instant detonation."
/obj/item/weapon/grenade/attack_self(mob/user as mob)
if(!active)
if(clown_check(user))
user << "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>"
active = 1
icon_state = initial(icon_state) + "_active"
add_fingerprint(user)
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
spawn(det_time)
if(user)
user.drop_item()
prime()
return
user.dir = get_dir(user, target)
user.drop_item()
var/t = (isturf(target) ? target : target.loc)
walk_towards(src, t, 3)
return*/
return
attack_self(mob/user as mob)
if(!active)
if(clown_check(user))
user << "\red You prime the [name]! [det_time/10] seconds!"
src.active = 1
src.icon_state = initial(icon_state) + "_active"
add_fingerprint(user)
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
spawn(src.det_time)
src.prime()
return
return
/obj/item/weapon/grenade/proc/prime()
playsound(loc, 'Welder2.ogg', 25, 1)
var/turf/T = get_turf(src)
if(T)
T.hotspot_expose(700,125)
proc/prime()
playsound(src.loc, 'Welder2.ogg', 25, 1)
var/turf/T = get_turf(src)
if(T)
T.hotspot_expose(700,125)
/obj/item/weapon/grenade/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(isscrewdriver(W))
switch(det_time)
if ("1")
det_time = 30
user << "<span class='notice'>You set the [name] for 3 second detonation time.</span>"
if ("30")
det_time = 100
user << "<span class='notice'>You set the [name] for 10 second detonation time.</span>"
if ("100")
det_time = 1
user << "<span class='notice'>You set the [name] for instant detonation.</span>"
add_fingerprint(user)
..()
return
/obj/item/weapon/grenade/attack_hand()
walk(src, null, null)
..()
return
attackby(obj/item/weapon/W as obj, mob/user as mob)
if (isscrewdriver(W))
switch(src.det_time)
if ("1")
src.det_time = 30
user.show_message("\blue You set the [name] for 3 second detonation time.")
if ("30")
src.det_time = 100
user.show_message("\blue You set the [name] for 10 second detonation time.")
if ("100")
src.det_time = 1
user.show_message("\blue You set the [name] for instant detonation.")
src.add_fingerprint(user)
src.desc = "It is set to detonate [det_time-1 ? "in [det_time/10] seconds." : "instantly."]"
..()
return
attack_hand()
walk(src, null, null)
..()
return
attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/item/weapon/grenade/attack_paw(mob/user as mob)
return attack_hand(user)
-32
View File
@@ -1,32 +0,0 @@
/obj/item/weapon/grenade/mustardbomb
desc = "It is set to detonate in 4 seconds."
name = "mustard gas bomb"
icon = 'icons/obj/grenade.dmi'
icon_state = "flashbang"
det_time = 40.0
item_state = "flashbang"
var/datum/effect/effect/system/mustard_gas_spread/mustard_gas
New()
..()
src.mustard_gas = new /datum/effect/effect/system/mustard_gas_spread
src.mustard_gas.attach(src)
src.mustard_gas.set_up(5, 0, usr.loc)
prime()
playsound(src.loc, 'smoke.ogg', 50, 1, -3)
spawn(0)
src.mustard_gas.start()
sleep(10)
src.mustard_gas.start()
sleep(10)
src.mustard_gas.start()
sleep(10)
src.mustard_gas.start()
for(var/obj/effect/blob/B in view(8,src))
var/damage = round(30/(get_dist(B,src)+1))
B.health -= damage
B.update_icon()
sleep(100)
del(src)
return
@@ -27,14 +27,15 @@
else if(istype(W, /obj/item/weapon/wirecutters))
if(cell)
cell.updateicon()
cell.loc = get_turf(src.loc)
cell = 0
cell = null
user << "You cut the cell away from [src]."
update_icon()
return
if(wired) //wires disappear into the void because fuck that shit
wired = 0
siemens_coefficient = siemens_coefficient_archived
siemens_coefficient = initial(siemens_coefficient)
user << "You cut the wires away from [src]."
update_icon()
..()
@@ -46,7 +47,4 @@
if(wired)
overlays += "gloves_wire"
if(cell)
overlays += "gloves_cell"
/obj/item/clothing/gloves/New()
siemens_coefficient_archived = siemens_coefficient
overlays += "gloves_cell"
+3 -3
View File
@@ -245,12 +245,12 @@
var/mob/living/carbon/C = M
if(watertemp == "freezing")
C.bodytemperature = min(100, 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 = max(500, C.bodytemperature + 35)
C.adjustFireLoss(10)
C.bodytemperature = min(500, C.bodytemperature + 35)
C.adjustFireLoss(5)
C << "<span class='danger'>The water is searing!</span>"
return