diff --git a/.travis.yml b/.travis.yml
index 948be8cfe5..f20d2b2d24 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,8 +2,8 @@
language: c
env:
- BYOND_MAJOR="507"
- BYOND_MINOR="1282"
+ BYOND_MAJOR="508"
+ BYOND_MINOR="1287"
before_install:
- sudo apt-get update -qq
diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm
index 651d7f880a..caaa82adcb 100644
--- a/code/game/objects/items/weapons/grenades/chem_grenade.dm
+++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm
@@ -5,6 +5,7 @@
desc = "A hand made chemical grenade."
w_class = 2.0
force = 2.0
+ det_time = null
var/stage = 0
var/state = 0
var/path = 0
@@ -25,6 +26,7 @@
detonator.detached()
usr.put_in_hands(detonator)
detonator=null
+ det_time = null
stage=0
icon_state = initial(icon_state)
else if(beakers.len)
@@ -60,6 +62,12 @@
user.remove_from_mob(det)
det.loc = src
detonator = det
+ if(istimer(detonator.a_left))
+ var/obj/item/device/assembly/timer/T = detonator.a_left
+ det_time = 10*T.time
+ if(istimer(detonator.a_right))
+ var/obj/item/device/assembly/timer/T = detonator.a_right
+ det_time = 10*T.time
icon_state = initial(icon_state) +"_ass"
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
stage = 1
@@ -143,6 +151,13 @@
if(!has_reagents)
icon_state = initial(icon_state) +"_locked"
playsound(src.loc, 'sound/items/Screwdriver2.ogg', 50, 1)
+ spawn(0) //Otherwise det_time is erroneously set to 0 after this
+ if(istimer(detonator.a_left)) //Make sure description reflects that the timer has been reset
+ var/obj/item/device/assembly/timer/T = detonator.a_left
+ det_time = 10*T.time
+ if(istimer(detonator.a_right))
+ var/obj/item/device/assembly/timer/T = detonator.a_right
+ det_time = 10*T.time
return
playsound(src.loc, 'sound/effects/bamf.ogg', 50, 1)
diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm
index f501753807..1565d321b6 100644
--- a/code/game/objects/items/weapons/grenades/grenade.dm
+++ b/code/game/objects/items/weapons/grenades/grenade.dm
@@ -47,6 +47,8 @@
if(det_time > 1)
user << "The timer is set to [det_time/10] seconds."
return
+ if(det_time == null)
+ return
user << "\The [src] is set for instant detonation."
@@ -89,16 +91,16 @@
/obj/item/weapon/grenade/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(isscrewdriver(W))
switch(det_time)
- if ("1")
+ if (1)
det_time = 10
user << "You set the [name] for 1 second detonation time."
- if ("10")
+ if (10)
det_time = 30
user << "You set the [name] for 3 second detonation time."
- if ("30")
+ if (30)
det_time = 50
user << "You set the [name] for 5 second detonation time."
- if ("50")
+ if (50)
det_time = 1
user << "You set the [name] for instant detonation."
add_fingerprint(user)
diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm
index 1ff9a1d1cc..e84543e88f 100644
--- a/code/modules/admin/verbs/adminjump.dm
+++ b/code/modules/admin/verbs/adminjump.dm
@@ -8,8 +8,8 @@
set name = "Jump to Area"
set desc = "Area to jump to"
set category = "Admin"
- if(!check_rights(R_ADMIN, user = src))
- src << "Only administrators may use this command."
+ if(!check_rights(R_ADMIN))
+ usr << "Only administrators may use this command."
return
if(config.allow_admin_jump)
@@ -25,8 +25,8 @@
/client/proc/jumptoturf(var/turf/T in world)
set name = "Jump to Turf"
set category = "Admin"
- if(!check_rights(R_ADMIN, user = src))
- src << "Only administrators may use this command."
+ if(!check_rights(R_ADMIN))
+ usr << "Only administrators may use this command."
return
if(config.allow_admin_jump)
log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
@@ -42,8 +42,8 @@
set category = "Admin"
set name = "Jump to Mob"
- if(!check_rights(R_ADMIN, user = src))
- src << "Only administrators may use this command."
+ if(!check_rights(R_ADMIN))
+ usr << "Only administrators may use this command."
return
if(config.allow_admin_jump)
@@ -65,8 +65,8 @@
set category = "Admin"
set name = "Jump to Coordinate"
- if(!check_rights(R_ADMIN, user = src))
- src << "Only administrators may use this command."
+ if(!check_rights(R_ADMIN))
+ usr << "Only administrators may use this command."
return
if (config.allow_admin_jump)
@@ -86,8 +86,8 @@
set category = "Admin"
set name = "Jump to Key"
- if(!check_rights(R_ADMIN, user = src))
- src << "Only administrators may use this command."
+ if(!check_rights(R_ADMIN))
+ usr << "Only administrators may use this command."
return
if(config.allow_admin_jump)
@@ -111,8 +111,8 @@
set category = "Admin"
set name = "Get Mob"
set desc = "Mob to teleport"
- if(!check_rights(R_ADMIN, user = src))
- src << "Only administrators may use this command."
+ if(!check_rights(R_ADMIN))
+ usr << "Only administrators may use this command."
return
if(config.allow_admin_jump)
log_admin("[key_name(usr)] teleported [key_name(M)]")
@@ -128,8 +128,8 @@
set name = "Get Key"
set desc = "Key to teleport"
- if(!check_rights(R_ADMIN, user = src))
- src << "Only administrators may use this command."
+ if(!check_rights(R_ADMIN))
+ usr << "Only administrators may use this command."
return
if(config.allow_admin_jump)
@@ -155,8 +155,8 @@
/client/proc/sendmob(var/mob/M in sortmobs())
set category = "Admin"
set name = "Send Mob"
- if(!check_rights(R_ADMIN, user = src))
- src << "Only administrators may use this command."
+ if(!check_rights(R_ADMIN))
+ usr << "Only administrators may use this command."
return
var/area/A = input(usr, "Pick an area.", "Pick an area") in return_sorted_areas()
if(A)
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index ad191db257..f0bfac9e58 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -341,7 +341,7 @@
if (istype(item, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = item
- item = G.throw() //throw the person instead of the grab
+ item = G.throw_held() //throw the person instead of the grab
if(ismob(item))
var/turf/start_T = get_turf(loc) //Get the start and target tile for the descriptors
var/turf/end_T = get_turf(target)
diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm
index 9471a70545..60d2bf419b 100644
--- a/code/modules/mob/mob_grab.dm
+++ b/code/modules/mob/mob_grab.dm
@@ -51,7 +51,7 @@
adjust_position()
//Used by throw code to hand over the mob, instead of throwing the grab. The grab is then deleted by the throw code.
-/obj/item/weapon/grab/proc/throw()
+/obj/item/weapon/grab/proc/throw_held()
if(affecting)
if(affecting.buckled)
return null