Skip to content

Commit

Permalink
Merge pull request tgstation#9817 from xxalpha/dropfixes
Browse files Browse the repository at this point in the history
Fixed hacking from inside machines.
  • Loading branch information
Cheridan committed Jun 9, 2015
2 parents 389007d + 9cb1061 commit d7e3363
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
3 changes: 1 addition & 2 deletions code/datums/wires/wires.dm
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown",

/datum/wires/Topic(href, href_list)
..()
if(in_range(holder, usr) && isliving(usr))

if(usr.Adjacent(holder) && isliving(usr))
var/mob/living/L = usr
if(CanUse(L) && href_list["action"])
var/obj/item/I = L.get_active_hand()
Expand Down
12 changes: 6 additions & 6 deletions code/game/objects/items/devices/PDA/PDA.dm
Original file line number Diff line number Diff line change
Expand Up @@ -904,16 +904,16 @@ var/global/list/obj/item/device/pda/PDAs = list()
else
var/obj/item/I = user.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
if(!user.drop_item())
if(!user.unEquip(I))
return 0
I.loc = src
id = I
else
var/obj/item/weapon/card/I = user.get_active_hand()
if (istype(I, /obj/item/weapon/card/id) && I:registered_name)
var/obj/old_id = id
if(!user.drop_item())
if(!user.unEquip(I))
return 0
var/obj/old_id = id
I.loc = src
id = I
user.put_in_hands(old_id)
Expand All @@ -924,7 +924,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
..()
if(istype(C, /obj/item/weapon/cartridge) && !cartridge)
cartridge = C
if(!user.drop_item())
if(!user.unEquip(C))
return
cartridge.loc = src
user << "<span class='notice'>You insert [cartridge] into [src].</span>"
Expand Down Expand Up @@ -952,7 +952,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
return //Return in case of failed check or when successful.
updateSelfDialog()//For the non-input related code.
else if(istype(C, /obj/item/device/paicard) && !src.pai)
if(!user.drop_item())
if(!user.unEquip(C))
return
C.loc = src
pai = C
Expand All @@ -963,7 +963,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(O)
user << "<span class='warning'>There is already a pen in \the [src]!</span>"
else
if(!user.drop_item())
if(!user.unEquip(C))
return
C.loc = src
user << "<span class='notice'>You slide \the [C] into \the [src].</span>"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/recycling/disposal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@
return

/obj/structure/disposalholder/allow_drop()
return 0
return 1

// Disposal pipes

Expand Down

0 comments on commit d7e3363

Please sign in to comment.