diff --git a/main-src/Code/demo.dm b/main-src/Code/demo.dm index e5e68fc..c900314 100644 --- a/main-src/Code/demo.dm +++ b/main-src/Code/demo.dm @@ -1,33 +1,20 @@ - - - - /obj/item/weapon/clothing/burn(fi_amount) - if (fi_amount > src.s_fire) - spawn( 0 ) - var/t = src.icon_state - src.icon_state = "" - src.icon = 'b_items.dmi' - flick(text("[]", t), src) - spawn( 14 ) - //SN src = null - del(src) - return - return - return + spawn(0) + var/t = src.icon_state + src.icon_state = "" + src.icon = 'b_items.dmi' + flick("[t]", src) + spawn(14) del(src) return 0 return 1 - return /obj/item/weapon/clothing/gloves/examine() set src in usr - ..() return /obj/item/weapon/clothing/shoes/orange/attack_self(mob/user as mob) - if (src.chained) src.chained = null new /obj/item/weapon/handcuffs( user.loc ) @@ -35,9 +22,7 @@ return /obj/item/weapon/clothing/shoes/orange/attackby(H as obj, loc) - if ((istype(H, /obj/item/weapon/handcuffs) && !( src.chained ))) - //H = null del(H) src.chained = 1 src.icon_state = "o_shoes1" @@ -2573,12 +2558,9 @@ return /turf/station/floor/attack_paw(mob/user as mob) - return src.attack_hand(user) - return /turf/station/floor/attack_hand(mob/user as mob) - if ((!( user.canmove ) || user.restrained() || !( user.pulling ))) return if (user.pulling.anchored) @@ -2596,14 +2578,13 @@ return /turf/station/floor/attackby(obj/item/weapon/C as obj, mob/user as mob) - if (istype(C, /obj/item/weapon/crowbar)) if (src.health > 100) src.health = 100 src.burnt = 1 src.intact = 0 levelupdate() - new /obj/item/weapon/tile( src ) + new /obj/item/weapon/tile(src) src.icon_state = text("Floor[]", (src.burnt ? "1" : "")) else if (istype(C, /obj/item/weapon/tile)) if (src.health <= 100) @@ -2618,14 +2599,10 @@ var/obj/item/weapon/tile/T = C T.amount-- if (T.amount < 1) - //T = null del(T) else if (istype(C, /obj/item/weapon/cable_coil) ) var/obj/item/weapon/cable_coil/coil = C coil.turf_place(src, user) - - //else if (istype(C, /obj/item/weapon/sheet/r_metal)) - return /turf/station/floor/unburn() diff --git a/main-src/Code/items.dm b/main-src/Code/items.dm index eb7db80..5e54de5 100644 --- a/main-src/Code/items.dm +++ b/main-src/Code/items.dm @@ -5591,48 +5591,36 @@ return /atom/DblClick() - - - //world << "[src].DblClick() : [src.type]" - - ..() var/obj/item/weapon/W = usr.equipped() if ((W == src && usr.stat == 0)) - spawn( 0 ) - W.attack_self(usr) - //world << "[W].attack_self([usr])" - return + spawn(0) W.attack_self(usr) return - //world << "1" - if ((!( usr.canmove ) || usr.stat != 0)) + if (!(usr.canmove) || usr.stat != 0) return - - - if ((!( src in usr.contents ) && (((!( isturf(src) ) && (!( isturf(src.loc) ) && (src.loc && !( isturf(src.loc.loc) )))) || !( isturf(usr.loc) )) && (src.loc != usr.loc && (!( istype(src, /obj/screen) ) && !( usr.contents.Find(src.loc) )))))) + /* This line broke my mental parser. --Stephen001 */ + if ((!(src in usr.contents) && (((!(isturf(src)) && (!(isturf(src.loc)) && (src.loc && !(isturf(src.loc.loc))))) || !(isturf(usr.loc))) && (src.loc != usr.loc && (!(istype(src, /obj/screen)) && !(usr.contents.Find(src.loc))))))) return - //world << "2" + /* Surely src.loc == usr is redundant? --Stephen001 */ var/t5 = (get_dist(src, usr) <= 1 || src.loc == usr) if ((istype(src, /obj/item/weapon/organ) && src in usr.contents)) - var/mob/human/H = usr usr << "Betchya think you're really smart trying to remove your own body parts aren't ya!" - if (istype(H, /mob/human)) - if (!( (src == H.l_store || src == H.r_store) )) + if (istype(usr, /mob/human)) + if (!(src == usr.l_store || src == usr.r_store)) return else return - - //world << "3" - if (((t5 || (W && (W.flags & 16))) && !( istype(src, /obj/screen) ))) + /* Seems like a pretty important expression. Dare I fathom what it checks? --Stephen001 */ + if (((t5 || (W && (W.flags & 16))) && !(istype(src, /obj/screen)))) if (usr.next_move < world.time) usr.next_move = world.time + 10 else return if ((src.loc && (get_dist(src, usr) < 2 || src.loc == usr.loc))) var/direct = get_dir(usr, src) - var/obj/item/weapon/dummy/D = new /obj/item/weapon/dummy( usr.loc ) + var/obj/item/weapon/dummy/D = new /obj/item/weapon/dummy(usr.loc) var/ok = 0 - if ( (direct - 1) & direct) + if ((direct - 1) & direct) var/turf/T switch(direct) if(5.0) @@ -5700,15 +5688,14 @@ ok = 1 if (usr.loc != src.loc) for(var/atom/A as mob|obj|turf|area in usr.loc) - if ((!( A.CheckExit(usr, src.loc) ) && A != usr)) + /* Bug #1937196 might be inside CheckExit --Stephen001 */ + if ((!A.CheckExit(usr, src.loc)) && A != usr) ok = 0 - //Foreach goto(1111) - //D = null del(D) - if (!( ok )) + if (!(ok)) return 0 - if (!( usr.restrained() )) + if (!usr.restrained()) if (W) if (t5) src.attackby(W, usr) @@ -5740,7 +5727,6 @@ W.afterattack(src, usr) else if (istype(usr, /mob/human)) - //world << "[src].attack_hand([usr.hand])" src.attack_hand(usr, usr.hand) else if (istype(usr, /mob/monkey))