mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
- Fixes issue 812.
- Adds logging for throwing. Pulling and grabbing does not need to be logged in detail, since kill-intent grabbing is logged already. - Something broke throwing, which made it runtime. This also fixes that. - Fixes the problem of applying wires to a stack of glass, which only contains one piece of glass using wires, deleting the glass piece and not spawning a light tile. A call of the glass' use(1) was misplaced, which had the chance of deleting the object, thus stopping the proc, before it spawned the light tile. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4478 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -19,15 +19,9 @@ SHARDS
|
||||
user << "\b There is not enough wire in this coil. You need 5 lengths."
|
||||
return
|
||||
CC.use(5)
|
||||
src.use(1)
|
||||
user << "\blue You attach wire to the [name]."
|
||||
new /obj/item/stack/light_w(user.loc)
|
||||
if(CC && CC.amount <= 0) //CC may have already been deleted by 'CC.use(5)' a few lines up.
|
||||
user.u_equip(CC)
|
||||
del(CC)
|
||||
if(src.amount <= 0)
|
||||
user.u_equip(src)
|
||||
del(src)
|
||||
src.use(1)
|
||||
else if( istype(W, /obj/item/stack/rods) )
|
||||
var/obj/item/stack/rods/V = W
|
||||
var/obj/item/stack/sheet/rglass/RG = new (user.loc)
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
|
||||
/mob/living/carbon/proc/throw_item(atom/target)
|
||||
src.throw_mode_off()
|
||||
|
||||
if(usr.stat || !target)
|
||||
return
|
||||
if(target.type == /obj/screen) return
|
||||
@@ -36,14 +35,28 @@
|
||||
|
||||
if(!item) return
|
||||
|
||||
if (istype(item, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = item
|
||||
item = G.throw() //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)
|
||||
if(start_T && end_T)
|
||||
var/mob/M = item
|
||||
var/start_T_descriptor = "<font color='#6b5d00'>tile at [start_T.x], [start_T.y], [start_T.z] in area [get_area(start_T)]</font>"
|
||||
var/end_T_descriptor = "<font color='#6b4400'>tile at [end_T.x], [end_T.y], [end_T.z] in area [get_area(end_T)]</font>"
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been thrown by [usr.name] ([usr.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]</font>")
|
||||
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]</font>")
|
||||
|
||||
if(!item) return //Grab processing has a chance of returning null
|
||||
|
||||
u_equip(item)
|
||||
update_icons()
|
||||
if(src.client)
|
||||
src.client.screen -= item
|
||||
item.loc = src.loc
|
||||
|
||||
if (istype(item, /obj/item/weapon/grab))
|
||||
item = item:throw() //throw the person instead of the grab
|
||||
item.loc = src.loc
|
||||
|
||||
if(istype(item, /obj/item))
|
||||
item:dropped(src) // let it know it's been dropped
|
||||
|
||||
@@ -21,17 +21,17 @@
|
||||
if(affecting)
|
||||
if(state >= 2)
|
||||
var/grabee = affecting
|
||||
spawn(0)
|
||||
spawn(1)
|
||||
del(src)
|
||||
return grabee
|
||||
else
|
||||
spawn(0)
|
||||
spawn(1)
|
||||
del(src)
|
||||
return null
|
||||
|
||||
else if(structure)
|
||||
var/grabee = structure
|
||||
spawn(0)
|
||||
spawn(1)
|
||||
del(src)
|
||||
return grabee
|
||||
|
||||
|
||||
Reference in New Issue
Block a user