Some tweaks and fixes for UL and any while loops I find, as well as removing generally bad procs.

This commit is contained in:
SkyMarshal
2012-06-22 12:49:54 -07:00
parent f4ba1a40c3
commit 668f81c329
15 changed files with 29 additions and 39 deletions

View File

@@ -46,11 +46,11 @@
proc/check_all_steps(atom/used_atom,mob/user as mob) //check all steps, remove matching one.
for(var/i=1;i<=steps.len;i++)
var/list/L = steps[i];
var/list/L = steps[i]
if(istype(used_atom, L["key"]))
if(custom_action(i, used_atom, user))
steps[i]=null;//stupid byond list from list removal...
listclearnulls(steps);
steps[i]=null//stupid byond list from list removal...
steps.Remove(null)
if(!steps.len)
spawn_result()
return 1

View File

@@ -172,7 +172,8 @@
if(istype(teleatom, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks get teleported --NeoFite
teleatom.visible_message("\red <B>The [teleatom] bounces off of the portal!</B>")
return 0
if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/disk/nuclear)))
var/list/temp = teleatom.search_contents_for(/obj/item/weapon/disk/nuclear)
if(temp.len)
if(istype(teleatom, /mob/living))
var/mob/living/MM = teleatom
MM.visible_message("\red <B>The [MM] bounces off of the portal!</B>","\red Something you are carrying seems to be unable to pass through the portal. Better drop it if you want to go through.")