diff --git a/Code/!atoms.dm b/Code/!atoms.dm index cef079b..994041f 100644 --- a/Code/!atoms.dm +++ b/Code/!atoms.dm @@ -2187,16 +2187,7 @@ Total SMES charging rate should not exceed total power generation rate, or an ov flags = 322.0 w_class = 2.0 s_istate = "electronic" -/obj/item/weapon/weldingtool - name = "weldingtool" - icon_state = "welder" - var/welding = 0.0 - var/weldfuel = 20.0 - flags = 322.0 - force = 3.0 - throwforce = 5.0 - throwspeed = 5.0 - w_class = 2.0 + /obj/item/weapon/wire desc = "This is just a simple piece of regular insulated wire." name = "wire" diff --git a/Code/Machinery/Computer/atmosphere.dm b/Code/Machinery/Computer/atmosphere.dm index 3d806ee..895e9d4 100644 --- a/Code/Machinery/Computer/atmosphere.dm +++ b/Code/Machinery/Computer/atmosphere.dm @@ -57,12 +57,11 @@ obj/machinery/computer/atmosphere verb/siphon_all() set src in oview(1) if(stat & NOPOWER) return - var/result = src.canReach(usr, null, 1) - if (result==0) - usr.client_mob() << "You can't reach [src]." + if (usr.restrained()) return - - usr.client_mob() << "Starting all siphon systems." + if (usr.stat) + return + usr << "Starting all siphon systems." for(var/obj/machinery/atmoalter/siphs/S in src.returnarea()) S.reset(1, 0) src.add_fingerprint(usr) @@ -73,11 +72,11 @@ obj/machinery/computer/atmosphere verb/stop_all() set src in oview(1) if(stat & NOPOWER) return - var/result = src.canReach(usr, null, 1) - if (result==0) - usr.client_mob() << "You can't reach [src]." + if (usr.stat) return - usr.client_mob() << "Stopping all siphon systems." + if (usr.restrained()) + return + usr << "Stopping all siphon systems." for(var/obj/machinery/atmoalter/siphs/S in src.returnarea()) S.reset(0, 0) src.add_fingerprint(usr) @@ -88,11 +87,11 @@ obj/machinery/computer/atmosphere verb/auto_on() set src in oview(1) if(stat & NOPOWER) return - var/result = src.canReach(usr, null, 1) - if (result==0) - usr.client_mob() << "You can't reach [src]." + if (usr.restrained()) return - usr.client_mob() << "Starting automatic air control systems." + if (usr.stat) + return + usr << "Starting automatic air control systems." for(var/obj/machinery/atmoalter/siphs/S in src.returnarea()) S.reset(0, 1) src.add_fingerprint(usr) @@ -102,13 +101,12 @@ obj/machinery/computer/atmosphere verb/release_scrubbers() set src in oview(1) - - if(stat & NOPOWER) return - var/result = src.canReach(usr, null, 1) - if (result==0) - usr.client_mob() << "You can't reach [src]." + if (usr.restrained()) return - usr.client_mob() << "Releasing all scrubber toxins." + if(stat & NOPOWER) return + if (usr.stat) + return + usr << "Releasing all scrubber toxins." for(var/obj/machinery/atmoalter/siphs/scrubbers/S in src.returnarea()) S.reset(-1.0, 0) src.add_fingerprint(usr) @@ -119,11 +117,11 @@ obj/machinery/computer/atmosphere verb/release_all() set src in oview(1) if(stat & NOPOWER) return - var/result = src.canReach(usr, null, 1) - if (result==0) - usr.client_mob() << "You can't reach [src]." + if (usr.stat) return - usr.client_mob() << "Releasing all stored air." + if (usr.restrained()) + return + usr << "Releasing all stored air." for(var/obj/machinery/atmoalter/siphs/S in src.returnarea()) S.reset(-1.0, 0) src.add_fingerprint(usr) diff --git a/Code/Machinery/Power/apc.dm b/Code/Machinery/Power/apc.dm index 4dbcb10..6c1d662 100644 --- a/Code/Machinery/Power/apc.dm +++ b/Code/Machinery/Power/apc.dm @@ -146,7 +146,7 @@ obj/machinery/power/apc attackby(obj/item/weapon/W, mob/user) if(stat & BROKEN) return - + if (istype(user, /mob/ai)) return src.attack_hand(user) @@ -201,10 +201,10 @@ obj/machinery/power/apc // Attack with hand - remove cell (if present and cover open) or interact with the APC - + attack_ai(mob/user) return src.attack_hand(user) - + attack_hand(mob/user) add_fingerprint(user) @@ -215,16 +215,19 @@ obj/machinery/power/apc if(cell) cell.loc = usr cell.layer = 20 + //Added User.equipped() because apparently there is some bug where attach_hand gets called after attack_by(). --Zjm7891 if (user.hand ) - user.l_hand = cell + if(!user.equipped()) + user.l_hand = cell else - user.r_hand = cell + if(!user.equipped()) + user.r_hand = cell cell.add_fingerprint(user) cell.updateicon() src.cell = null - user.client_mob() << "You remove the power cell." + user << "You remove the power cell." charging = 0 src.updateicon() @@ -267,7 +270,7 @@ obj/machinery/power/apc t += "
Cover lock: [coverlocked ? "Engaged" : "Disengaged"]" else // If interface is unlocked, show status and control links - if (!istype(user, /mob/ai)) + if (!istype(user, /mob/ai)) t += "(Swipe ID card to lock interface.)
" t += "Main breaker: [operating ? "On Off" : "On Off" ]
" t += "External power : [ main_status ? (main_status ==2 ? "Good" : "Low") : "None"]
" @@ -365,7 +368,7 @@ obj/machinery/power/apc if (usr.stat || usr.restrained() ) return if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey")))) - if (!istype(usr, /mob/ai)) + if (!istype(usr, /mob/ai)) usr.client_mob() << "\red You don't have the dexterity to do this!" return diff --git a/Code/Machinery/pod.dm b/Code/Machinery/pod.dm index 60302ef..d7c937f 100644 --- a/Code/Machinery/pod.dm +++ b/Code/Machinery/pod.dm @@ -83,10 +83,9 @@ obj/machinery/pod verb/eject() set src = usr.loc - - var/result = src.canReach(usr, null, 1) - if (result==0) - usr << "You can't reach [src]." + if (!(usr in src) || usr.restrained()) + return + if (usr.stat) return var/mob/M = usr M.loc = src.loc diff --git a/Code/Machinery/sec_lock.dm b/Code/Machinery/sec_lock.dm index c27ba31..2b3a977 100644 --- a/Code/Machinery/sec_lock.dm +++ b/Code/Machinery/sec_lock.dm @@ -138,8 +138,9 @@ Keycard: [src.scan ? "[src.scan.name]" : "Capture the Flag Mode activated!" @@ -157,7 +161,7 @@ del(M.primary) for(var/obj/item/weapon/I in M) //M = null - del(M) + del(I) M.start = 0 world << "All players have been pushed back!" return diff --git a/Code/computer.dm b/Code/computer.dm index 69ba69c..b0a2218 100644 --- a/Code/computer.dm +++ b/Code/computer.dm @@ -6,7 +6,7 @@ /obj/machinery/computer/security/attack_ai(var/mob/user as mob) return src.attack_hand(user) return - + /obj/machinery/computer/security/attack_paw(var/mob/user as mob) return src.attack_hand(user) @@ -21,7 +21,7 @@ var/i = 0 for (i=1, i<=A.len, i++) B[A[i]] = A[A[i]] - + var/j = 0 var/temp = null var/size = A.len @@ -30,34 +30,34 @@ for (i = increment, i < size, i+=increment) j = i temp = A[1+i] - + var/other = A[1+j-increment] var/sortval = -sorttext(other, temp) //The - is because sorttext(A,B) returns -1 if A > B, rather than 1, and I'd consider having A > B = 1 to be more natural (since you can then check if sortval > 0, using the same comparison operator that you would have if you were directly comparing A and B (If we think that (0 > sortval) isn't also acceptable)). -Trafalgar - + while ((j >= increment) && (sortval > 0)) A[1+j] = A[1+j - increment] j = j - increment; if (j>=increment) other = A[1+j-increment] sortval = sorttext(temp, other) - + A[1+j] = temp - - + + if (increment == 2) increment = 1 else increment = round(increment / 2.2) - + //Now we go through and assign names to cameras in a new list, but we do it in the order in which we had sorted the strings to //The presumable un-speediness of this kind of defeats the point of doing the sorting the way we did it, though. var/list/C = list() for (i=1, i<=A.len, i++) C[A[i]] = B[A[i]] - - + + return C - + /obj/machinery/computer/security/attack_hand(var/mob/user as mob) if(stat & (NOPOWER|BROKEN) ) return @@ -67,7 +67,7 @@ for(var/obj/machinery/camera/C in world) if (C.network == src.network) L[text("[][]", C.c_tag, (C.status ? null : " (Deactivated)"))] = C - + L = sortList(L) L["Cancel"] = "Cancel" var/t = input(user, "Which camera should you change to?") as null|anything in L @@ -183,15 +183,15 @@ return /turf/space/updatecell() - if (config.air_pressure_flow) - if ((src.linkN && src.linkN.firelevel && src.linkN.firelevel > 0) || (src.linkS && src.linkS.firelevel && src.linkS.firelevel > 0) || (src.linkE && src.linkE.firelevel && src.linkE.firelevel > 0) || (src.linkW && src.linkW.firelevel && src.linkW.firelevel > 0)) + if (config.air_pressure_flow) + if ((src.linkN && src.linkN.firelevel && src.linkN.firelevel > 0) || (src.linkS && src.linkS.firelevel && src.linkS.firelevel > 0) || (src.linkE && src.linkE.firelevel && src.linkE.firelevel > 0) || (src.linkW && src.linkW.firelevel && src.linkW.firelevel > 0)) ..() return /turf/space/conduction() - if (config.air_pressure_flow) - if ((src.linkN && src.linkN.firelevel && src.linkN.firelevel > 0) || (src.linkS && src.linkS.firelevel && src.linkS.firelevel > 0) || (src.linkE && src.linkE.firelevel && src.linkE.firelevel > 0) || (src.linkW && src.linkW.firelevel && src.linkW.firelevel > 0)) - ..() + if (config.air_pressure_flow) + if ((src.linkN && src.linkN.firelevel && src.linkN.firelevel > 0) || (src.linkS && src.linkS.firelevel && src.linkS.firelevel > 0) || (src.linkE && src.linkE.firelevel && src.linkE.firelevel > 0) || (src.linkW && src.linkW.firelevel && src.linkW.firelevel > 0)) + ..() return /turf/space/Entered(atom/movable/A as mob|obj) @@ -218,7 +218,29 @@ else if (M.r_hand.w_class <= 2) t1 -= 1 - else if (locate(/obj/move/wall, oview(1, M))) //characters 'grab' shuttle walls like regular walls now -shadowlord13 + else if (locate(/obj/move/, oview(1, M))) //characters 'grab' shuttle walls like regular walls now -shadowlord13 + if (!( M.l_hand )) + t1 -= 1 + else + if (M.l_hand.w_class <= 2) + t1 -= 0.5 + if (!( M.r_hand )) + t1 -= 1 + else + if (M.r_hand.w_class <= 2) + t1 -= 0.5 + else if (locate(/obj/machinery/, oview(1, M))) //characters 'grab' objects in space like a grille now -zjm7891 Thanks Shadowlord + if (!( M.l_hand )) + t1 -= 2 + else + if (M.l_hand.w_class <= 2) + t1 -= 1 + if (!( M.r_hand )) + t1 -= 2 + else + if (M.r_hand.w_class <= 2) + t1 -= 1 + else if (locate(/turf/station, oview(1, M))) if (!( M.l_hand )) t1 -= 1 else @@ -244,15 +266,15 @@ t1 = round(t1) if (t1 < 5) if (prob(t1)) - M.client_mob() << "\blue You slipped!" + M << "\blue You slipped!" else spawn( 5 ) if (src == A.loc) spawn( 0 ) src.Entered(A) - return - return - return 0 + return 1 + return 1 + return 1 if (src.x <= 2 && src.z < world.maxz) A.z++ @@ -272,29 +294,29 @@ if (step(A, A.last_move)) else spawn( 0 ) - src.Entered(A) - -/proc/call_shuttle_proc(var/mob/user) - if ((!( ticker ) || ticker.shuttle_location == 1)) - return - - if( ticker.mode == "blob" ) - user.client_mob() << "Under directive 7-10, SS13 is quarantined until further notice." - return - - world << "\blue Alert: The emergency shuttle has been called. It will arrive in T-10:00 minutes." - if (!( ticker.timeleft )) - ticker.timeleft = 6000 - ticker.timing = 1 - return - -/proc/cancel_call_proc(var/mob/user) - if ((!( ticker ) || ticker.shuttle_location == 1 || ticker.timing == 0 || ticker.timeleft < 300)) - return - if( ticker.mode == "blob" ) - return - - world << "\blue Alert: The shuttle is going back!" - ticker.timing = -1.0 - - return + src.Entered(A) + +/proc/call_shuttle_proc(var/mob/user) + if ((!( ticker ) || ticker.shuttle_location == 1)) + return + + if( ticker.mode == "blob" ) + user.client_mob() << "Under directive 7-10, SS13 is quarantined until further notice." + return + + world << "\blue Alert: The emergency shuttle has been called. It will arrive in T-10:00 minutes." + if (!( ticker.timeleft )) + ticker.timeleft = 6000 + ticker.timing = 1 + return + +/proc/cancel_call_proc(var/mob/user) + if ((!( ticker ) || ticker.shuttle_location == 1 || ticker.timing == 0 || ticker.timeleft < 300)) + return + if( ticker.mode == "blob" ) + return + + world << "\blue Alert: The shuttle is going back!" + ticker.timing = -1.0 + + return diff --git a/Code/demo.dm b/Code/demo.dm index 631914a..88be00c 100644 --- a/Code/demo.dm +++ b/Code/demo.dm @@ -357,7 +357,7 @@ /obj/item/weapon/tank/plasmatank/attackby(obj/item/weapon/W as obj, mob/user as mob) - var/mob/CM = user.client_mob() + var/mob/CM = user.client_mob() var/client/CL = CM.client if (istype(W, /obj/item/weapon/assembly/rad_ignite)) var/obj/item/weapon/assembly/rad_ignite/S = W @@ -370,15 +370,15 @@ R.part2 = S.part2 S.part2.loc = R S.part2.master = R - S.layer = initial(S.layer) + S.layer = initial(S.layer) if (CL) CL.screenOrBackupRemove(S) - CL.screen -= S - if (istype(user, /mob/drone)) - if (user.equipped() == S) - user.u_equip(S) - user:grip(R) - else + CL.screen -= S + if (istype(user, /mob/drone)) + if (user.equipped() == S) + user.u_equip(S) + user:grip(R) + else if (user.r_hand == S) user.u_equip(S) user.r_hand = R @@ -388,9 +388,9 @@ src.master = R src.layer = initial(src.layer) user.u_equip(src) - if (CL) + if (CL) CL.screenOrBackupRemove(src) - CL.screen -= src + CL.screen -= src src.loc = R R.part3 = src R.layer = 20 @@ -411,14 +411,14 @@ S.part2.loc = R S.part2.master = R S.layer = initial(S.layer) - if (CL) - CL.screenOrBackupRemove(S) - CL.screen -= S - if (istype(user, /mob/drone)) - if (user.equipped() == S) - user.u_equip(S) - user:grip(R) - else + if (CL) + CL.screenOrBackupRemove(S) + CL.screen -= S + if (istype(user, /mob/drone)) + if (user.equipped() == S) + user.u_equip(S) + user:grip(R) + else if (user.r_hand == S) user.u_equip(S) user.r_hand = R @@ -428,9 +428,9 @@ src.master = R src.layer = initial(src.layer) user.u_equip(src) - if (CL) - CL.screenOrBackupRemove(src) - CL.screen -= src + if (CL) + CL.screenOrBackupRemove(src) + CL.screen -= src src.loc = R R.part3 = src R.layer = 20 @@ -452,14 +452,14 @@ S.part2.loc = R S.part2.master = R S.layer = initial(S.layer) - if (CL) - CL.screenOrBackupRemove(S) - CL.screen -= S - if (istype(user, /mob/drone)) - if (user.equipped() == S) - user.u_equip(S) - user:grip(R) - else + if (CL) + CL.screenOrBackupRemove(S) + CL.screen -= S + if (istype(user, /mob/drone)) + if (user.equipped() == S) + user.u_equip(S) + user:grip(R) + else if (user.r_hand == S) user.u_equip(S) user.r_hand = R @@ -469,9 +469,9 @@ src.master = R src.layer = initial(src.layer) user.u_equip(src) - if (CL) - CL.screenOrBackupRemove(src) - CL.screen -= src + if (CL) + CL.screenOrBackupRemove(src) + CL.screen -= src src.loc = R R.part3 = src R.layer = 20 @@ -777,10 +777,10 @@ I.loc = src.loc for(var/mob/M in src) M.loc = src.loc - var/client/client = M.alwaysClient() - if (client) - if (client.eye == src) - client.eye = client.mob + var/client/client = M.alwaysClient() + if (client) + if (client.eye == src) + client.eye = client.mob client.perspective = MOB_PERSPECTIVE src.icon_state = "secloset1" del(src) @@ -821,10 +821,10 @@ I.loc = src.loc for(var/mob/M in src) M.loc = src.loc - var/client/client = M.alwaysClient() - if (client) - if (client.eye == src) - client.eye = client.mob + var/client/client = M.alwaysClient() + if (client) + if (client.eye == src) + client.eye = client.mob client.perspective = MOB_PERSPECTIVE src.icon_state = "secloset1" src.opened = 1 @@ -863,10 +863,10 @@ I.loc = src.loc for(var/mob/M in src) M.loc = src.loc - var/client/client = M.alwaysClient() - if (client) - if (client.eye == src) - client.eye = client.mob + var/client/client = M.alwaysClient() + if (client) + if (client.eye == src) + client.eye = client.mob client.perspective = MOB_PERSPECTIVE src.icon_state = "secloset1" src.opened = 1 @@ -877,8 +877,8 @@ if (!( I.anchored )) I.loc = src for(var/mob/M in src.loc) - if (M.client) - M.client.eye = src + if (M.client) + M.client.eye = src M.client.perspective = EYE_PERSPECTIVE M.loc = src src.icon_state = "secloset0" @@ -1256,11 +1256,11 @@ for(var/obj/item/I in src) I.loc = src.loc for(var/mob/M in src) - M.loc = src.loc - var/client/client = M.alwaysClient() - if (client) - if (client.eye == src) - client.eye = client.mob + M.loc = src.loc + var/client/client = M.alwaysClient() + if (client) + if (client.eye == src) + client.eye = client.mob client.perspective = MOB_PERSPECTIVE src.icon_state = "emcloset1" del(src) @@ -1268,6 +1268,9 @@ return /obj/closet/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W, /obj/item/weapon/card/id)) + src.attack_hand(user) + return if ((src.opened || W.damtype != "fire" || !( istype(W, /obj/item/weapon/weldingtool) ))) if (istype(W, /obj/item/weapon/grab)) src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet @@ -1291,10 +1294,10 @@ I.loc = src.loc for(var/mob/M in src) M.loc = src.loc - var/client/client = M.alwaysClient() - if (client) - if (client.eye == src) - client.eye = client.mob + var/client/client = M.alwaysClient() + if (client) + if (client.eye == src) + client.eye = client.mob client.perspective = MOB_PERSPECTIVE src.icon_state = "emcloset1" src.opened = 1 @@ -1343,10 +1346,10 @@ for(var/mob/M in src) if (!( M.buckled )) M.loc = src.loc - var/client/client = M.alwaysClient() - if (client) - if (client.eye == src) - client.eye = client.mob + var/client/client = M.alwaysClient() + if (client) + if (client.eye == src) + client.eye = client.mob client.perspective = MOB_PERSPECTIVE src.icon_state = "emcloset1" src.opened = 1 @@ -1357,8 +1360,8 @@ if (!( I.anchored )) I.loc = src for(var/mob/M in src.loc) - if (M.client) - M.client.eye = src + if (M.client) + M.client.eye = src M.client.perspective = EYE_PERSPECTIVE M.loc = src src.icon_state = src.original @@ -1454,11 +1457,11 @@ /obj/stool/chair/e_chair/verb/toggle_power() set src in oview(1) - var/result = src.canReach(usr, null, 1) - if (result==0) - usr.client_mob() << "You can't reach [src]." - return - + var/result = src.canReach(usr, null, 1) + if (result==0) + usr.client_mob() << "You can't reach [src]." + return + if ((usr.stat || usr.restrained() || !( usr.canmove ) || usr.lying)) return src.on = !( src.on ) @@ -1556,11 +1559,11 @@ /obj/stool/chair/verb/rotate() set src in oview(1) - var/result = src.canReach(usr, null, 1) - if (result==0) - usr.client_mob() << "You can't reach [src]." - return - + var/result = src.canReach(usr, null, 1) + if (result==0) + usr.client_mob() << "You can't reach [src]." + return + src.dir = turn(src.dir, 90) if (src.dir == NORTH) src.layer = FLY_LAYER @@ -1681,10 +1684,11 @@ if (istype(W, /obj/item/weapon/wirecutters)) if(!shock(user, 100)) src.health = 0 - else if ((istype(W, /obj/item/weapon/screwdriver) && (istype(src.loc, /turf/station) || src.anchored))) + else if ((istype(W, /obj/item/weapon/screwdriver) && ( (istype(src.loc, /turf/station) || locate(src.loc, /obj/move) || locate(src.loc, /obj/machinery) || src.anchored)) ) ) if(!shock(user, 50)) src.anchored = !( src.anchored ) - user.client_mob() << src.anchored ? "You have fastened the grille to the floor." : "You have unfastened the grill." + user << (src.anchored ? "You have fastened the grille to the floor." : "You have unfastened the grill.") + return else if(istype(W, /obj/item/weapon/shard)) // can't get a shock by attacking with glass shard src.health -= W.force * 0.1 @@ -1884,11 +1888,11 @@ /obj/window/verb/rotate() set src in oview(1) - var/result = src.canReach(usr, null, 1) - if (result==0) - usr.client_mob() << "You can't reach [src]." - return - + var/result = src.canReach(usr, null, 1) + if (result==0) + usr.client_mob() << "You can't reach [src]." + return + if (src.anchored) usr.client_mob() << "It is fastened to the floor; therefore, you can't rotate it!" return 0 diff --git a/Code/globals.dm b/Code/globals.dm index 8a06360..36f1565 100644 --- a/Code/globals.dm +++ b/Code/globals.dm @@ -137,252 +137,13 @@ var world_message = "Welcome to OpenSS13!" savefile_ver = "4" - SS13_version = "1.0 \[Development Version] - 6/21/2008" - changes = {"

Version: [SS13_version]

Changes from base version 40.93.2

+ SS13_version = "1.0 \[Development Version] - 8/17/2008" + changes = {"

Version: [SS13_version]

Changes from base version 1


- - -

Version 40.93.2H9.7 -

- -

Version 40.93.2H9.6 -

- -

Version 40.93.2H9.5 -

-

Version 40.93.2H9.4 -

-

Version 40.93.2H9.3 -

-

Version 40.93.2H9.2 -

-

Version 40.93.2H9.1 -

-

Version 40.93.2H9 -

-

Version 40.93.2H8 -

-

Version 40.93.2H7.1D -

-

Version 40.93.2H7.0D -

-

Version 40.93.2H6.4D -

-

Version 40.93.2H6.3D -

-

Version 40.93.2H6.2D -

-

Version 40.93.2H6.1D -

-

Version 40.93.2H6 -

-

Version 40.93.2H5 -

"} + datum/air_tunnel/air_tunnel1/SS13_airtunnel = null datum/control/cellular/cellcontrol = null datum/control/gameticker/ticker = null diff --git a/Code/items.dm b/Code/items.dm index e9b2a97..a671c9b 100644 --- a/Code/items.dm +++ b/Code/items.dm @@ -855,7 +855,7 @@ if (!( safety )) M.weakened = 10 if (M.hasClient()) - var/mob/CM = M.client_mob() + var/mob/CM = M.client_mob() if (!( safety )) if ((M.eye_stat > 15 && prob(M.eye_stat + 50))) flick("e_flash", CM.flash) @@ -898,7 +898,7 @@ S.active = 0 S.icon_state = "shield0" if (M.hasClient()) - var/mob/CM = M.client_mob() + var/mob/CM = M.client_mob() var/safety = null if (istype(M, /mob/human)) var/mob/human/H = M @@ -3013,8 +3013,8 @@ // Not checked: r_epil, r_ch_cou, r_tourette if (!M.hasClient()) - user.show_message("\blue [M] has a vacant look in \his eyes.", 1) - else if (M.currentDrone!=null) + user.show_message("\blue [M] has a vacant look in \his eyes.", 1) + else if (M.currentDrone!=null) user.show_message("\blue [M] does not appear to notice you.", 1) else user.client_mob() << "You can't get any meaningful results about [M] from the analyzer." @@ -3090,38 +3090,38 @@ return /obj/item/weapon/storage/proc/show_to(mob/user) - var/screen - if (user.client) - screen = user.client.screen - else if (user.currentDrone!=null) - var/client/client = user.alwaysClient() - if (client) + var/screen + if (user.client) + screen = user.client.screen + else if (user.currentDrone!=null) + var/client/client = user.alwaysClient() + if (client) screen = client.screenOrBackup() - else - return - else - return + else + return + else + return screen -= src.boxes screen -= src.closer screen -= src.contents screen += src.boxes screen += src.closer - screen += src.contents - + screen += src.contents + user.s_active = src return /obj/item/weapon/storage/proc/hide_from(mob/user) - var/screen - if (user.client) - screen = user.client.screen - else if (user.currentDrone!=null) - var/client/client = user.alwaysClient() - if (client) - screen = client.screenOrBackup() - else - return - else + var/screen + if (user.client) + screen = user.client.screen + else if (user.currentDrone!=null) + var/client/client = user.alwaysClient() + if (client) + screen = client.screenOrBackup() + else + return + else return screen -= src.boxes screen -= src.closer @@ -3603,7 +3603,7 @@ /obj/item/weapon/igniter/attackby(obj/item/weapon/W, mob/user) - var/client/client = user.alwaysClient() + var/client/client = user.alwaysClient() if ((istype(W, /obj/item/weapon/radio/signaler) && !( src.status ))) var/obj/item/weapon/radio/signaler/S = W if (!( S.b_stat )) @@ -3611,14 +3611,14 @@ var/obj/item/weapon/assembly/rad_ignite/R = new /obj/item/weapon/assembly/rad_ignite( user ) S.loc = R R.part1 = S - S.layer = initial(S.layer) - if (client) - client.screenOrBackupRemove(S) - client.screen -= S - if (istype(user, /mob/drone)) - if (user.equipped() == S) - user.u_equip(S) - user:grip(R) + S.layer = initial(S.layer) + if (client) + client.screenOrBackupRemove(S) + client.screen -= S + if (istype(user, /mob/drone)) + if (user.equipped() == S) + user.u_equip(S) + user:grip(R) else if (user.r_hand == S) user.u_equip(S) user.r_hand = R @@ -3629,9 +3629,9 @@ src.master = R src.layer = initial(src.layer) user.u_equip(src) - if (client) - client.screenOrBackupRemove(src) - client.screen -= src + if (client) + client.screenOrBackupRemove(src) + client.screen -= src src.loc = R R.part2 = src R.layer = 20 @@ -3644,13 +3644,13 @@ W.loc = R R.part1 = W W.layer = initial(W.layer) - if (client) - client.screenOrBackupRemove(W) - client.screen -= W - if (istype(user, /mob/drone)) - if (user.equipped() == W) - user.u_equip(W) - user:grip(R) + if (client) + client.screenOrBackupRemove(W) + client.screen -= W + if (istype(user, /mob/drone)) + if (user.equipped() == W) + user.u_equip(W) + user:grip(R) else if (user.r_hand == W) user.u_equip(W) user.r_hand = R @@ -3661,9 +3661,9 @@ src.master = R src.layer = initial(src.layer) user.u_equip(src) - if (client) - client.screenOrBackupRemove(src) - client.screen -= src + if (client) + client.screenOrBackupRemove(src) + client.screen -= src src.loc = R R.part2 = src R.layer = 20 @@ -3676,13 +3676,13 @@ W.loc = R R.part1 = W W.layer = initial(W.layer) - if (client) - client.screenOrBackupRemove(W) - client.screen -= W - if (istype(user, /mob/drone)) - if (user.equipped() == W) - user.u_equip(W) - user:grip(R) + if (client) + client.screenOrBackupRemove(W) + client.screen -= W + if (istype(user, /mob/drone)) + if (user.equipped() == W) + user.u_equip(W) + user:grip(R) else if (user.r_hand == W) user.u_equip(W) user.r_hand = R @@ -3693,9 +3693,9 @@ src.master = R src.layer = initial(src.layer) user.u_equip(src) - if (client) - client.screenOrBackupRemove(src) - client.screen -= src + if (client) + client.screenOrBackupRemove(src) + client.screen -= src src.loc = R R.part2 = src R.layer = 20 @@ -3776,7 +3776,7 @@ /obj/item/weapon/radio/electropack/attackby(obj/item/weapon/W, mob/user) - var/client/client = user.alwaysClient() + var/client/client = user.alwaysClient() if (istype(W, /obj/item/weapon/screwdriver)) src.e_pads = !( src.e_pads ) if (src.e_pads) @@ -3790,13 +3790,13 @@ W.loc = A A.part1 = W W.layer = initial(W.layer) - if (client) - client.screenOrBackupRemove(W) - client.screen -= W - if (istype(user, /mob/drone)) - if (user.equipped() == W) - user.u_equip(W) - user:grip(A) + if (client) + client.screenOrBackupRemove(W) + client.screen -= W + if (istype(user, /mob/drone)) + if (user.equipped() == W) + user.u_equip(W) + user:grip(A) else if (user.r_hand == W) user.u_equip(W) user.r_hand = A @@ -3807,9 +3807,9 @@ src.master = A src.layer = initial(src.layer) user.u_equip(src) - if (client) - client.screenOrBackupRemove(src) - client.screen -= src + if (client) + client.screenOrBackupRemove(src) + client.screen -= src src.loc = A A.part2 = src A.layer = 20 @@ -4254,37 +4254,37 @@ var/speakerType = M.type if (istype(M, /mob/human) || (istype(M, /mob/ai))) for(var/mob/O in receive) - var/mobType = O.type - if (istype(O, /mob/drone)) - var/mob/drone/Mdrone = O - var/mob/Mowner = Mdrone.controlledBy - if (Mowner!=null) - mobType = Mowner.type - if (istype(O, /mob/human) || (istype(O, /mob/ai)) || (istype(O, /mob/drone) && mobType==speakerType)) + var/mobType = O.type + if (istype(O, /mob/drone)) + var/mob/drone/Mdrone = O + var/mob/Mowner = Mdrone.controlledBy + if (Mowner!=null) + mobType = Mowner.type + if (istype(O, /mob/human) || (istype(O, /mob/ai)) || (istype(O, /mob/drone) && mobType==speakerType)) O.show_message(text("[]-\icon[]\[[]\]-broadcasts: []", M.rname, src, src.freq, msg), 2) else O.show_message(text("[]-\icon[]\[[]\]-broadcasts: []", M.rname, src, src.freq, stars(msg)), 2) if (src.freq == 5) for(var/mob/O in receive) - var/mobType = O.type - if (istype(O, /mob/drone)) - var/mob/drone/Mdrone = O - var/mob/Mowner = Mdrone.controlledBy - if (Mowner!=null) - mobType = Mowner.type - if (istype(O, /mob/human) || (istype(O, /mob/ai)) || (istype(O, /mob/drone) && istype(mobType, speakerType))) + var/mobType = O.type + if (istype(O, /mob/drone)) + var/mob/drone/Mdrone = O + var/mob/Mowner = Mdrone.controlledBy + if (Mowner!=null) + mobType = Mowner.type + if (istype(O, /mob/human) || (istype(O, /mob/ai)) || (istype(O, /mob/drone) && istype(mobType, speakerType))) O.show_message(text("[]-\icon[]\[[]\]-broadcasts (over PA): []", M.rname, src, src.freq, msg), 2) else O.show_message(text("[]-\icon[]\[[]\]-broadcasts (over PA): []", M.rname, src, src.freq, stars(msg)), 2) else for(var/mob/O in receive) - var/mobType = O.type - if (istype(O, /mob/drone)) - var/mob/drone/Mdrone = O - var/mob/Mowner = Mdrone.controlledBy - if (Mowner!=null) - mobType = Mowner.type - if (istype(O, M) || (istype(O, /mob/drone) && istype(mobType, speakerType))) + var/mobType = O.type + if (istype(O, /mob/drone)) + var/mob/drone/Mdrone = O + var/mob/Mowner = Mdrone.controlledBy + if (Mowner!=null) + mobType = Mowner.type + if (istype(O, M) || (istype(O, /mob/drone) && istype(mobType, speakerType))) O.show_message(text("The monkey-\icon[]\[[]\]-broadcasts: []", src, src.freq, msg), 2) else O.show_message(text("The monkey-\icon[]\[[]\]-broadcasts: chimpering", src, src.freq), 2) @@ -5062,46 +5062,6 @@ src.pixel_x = rand(-8.0, 8) return -/obj/item/weapon/weldingtool/examine() - set src in usr - - usr.client_mob() << text("\icon[] [] contains [] units of fuel left!", src, src.name, src.weldfuel) - return - -/obj/item/weapon/weldingtool/afterattack(obj/O, mob/user) - - if (src.welding) - src.weldfuel-- - if (src.weldfuel <= 0) - usr.client_mob() << "\blue Need more fuel!" - src.welding = 0 - src.force = 3 - src.damtype = "brute" - src.icon_state = "welder" - var/turf/location = user.loc - if (!( istype(location, /turf) )) - return - location.firelevel = location.poison + 1 - return - -/obj/item/weapon/weldingtool/attack_self(mob/user) - - src.welding = !( src.welding ) - if (src.welding) - if (src.weldfuel <= 0) - user.client_mob() << "\blue Need more fuel!" - src.welding = 0 - return 0 - user.client_mob() << "\blue You will now weld when you attack." - src.force = 15 - src.damtype = "fire" - src.icon_state = "welder1" - else - user.client_mob() << "\blue Not welding anymore." - src.force = 3 - src.damtype = "brute" - src.icon_state = "welder" - return /obj/manifest/New() @@ -5469,183 +5429,183 @@ return ..() return - -/* - Proc name: canReach - Purpose: To indicate whether something - a turf, a mob, an object, whatever - can be reached from the user's location. - Parameters: - user - the mob who will be doing the attempted touching - usingWeapon - the weapon the mob is using to reach src. This is important if they're actually trying to *shoot* someone. - ignoreNextMoveTime - Normally this would be 0, and if world.time wasn't < next_time, the proc would return 0. If it was < next_time, prev_time and next_time would be changed (next_time being set to world.time + 10). - If, instead, ignoreNextMoveTime is 1, next_time, world.time, and prev_time will not be examined or changed. - - Return value: - This returns 0 if, for some reason, the user can't reach src. If not, the return value is a set of 3 bitflags: - 1: CANREACH_USINGWEAPON: If set, user is using a "weapon" (passed in as usingWeapon) on src. (This is kind of semi-useless to check, since the only case currently where this would be 0 when you had passed in a weapon would be if the user was a drone, and the weapon was the AI interface, and the drone was controlled by the AI player, in which case if you cared you would already be checking for it anyways because you would need to be changing the user and setting the weapon to null yourself.) - 2: CANREACH_CANTOUCH: If set, src can be touched by user (which was called t5 in DblClick). This is set if (get_dist(src, user) <= 1 || src.loc == user), or if the user is the AI, or if the user is a drone controlled by an AI using the AI interface tool. - 4: CANREACH_ALLOWED: If set, src is reachable by user, or the attempt is allowed for another reason. This is always set if the return value is valid. This differs from cantouch because this will be set if the user is using a gun on someone distant, whereas cantouch will not be set in that case. It's also theoretically possible to have a return value which contains only 4 for some /obj/screen objects, if the code in /atom/DblClick wasn't just overly paranoid. - - Valid combinations of those are: 0, 4, 5, 6, or 7. (You won't ever have 1 or 2 set if 4 isn't set) - - Detail on what's checked: - The user has to be able to move unless they are an AI, and their stat has to be 0 (alive and awake). - If the src is not in user's inventory, we MIGHT return 0: - If src is not a turf, and it is not on a turf, and it is inside something else which is not in a turf: - We return 0, it cannot be reached. - If not, if the user is inside some item instead of on a turf, and src is not in the same place as the user, and src is not a screen object, and src is not inside an item in user's inventory: - We return 0, it cannot be reached. - (Otherwise we continue) - And some other difficult to explain stuff is done here. - - Either CANREACH_CANTOUCH will be true, or the user must be using a weapon which has flag 16 set, or src is an /obj/screen. - Checks to determine if there are obstacles in the way (windows, etc) are done unless src is an /obj/screen. -*/ - -#define CANREACH_USINGWEAPON 1 -#define CANREACH_CANTOUCH 2 -#define CANREACH_ALLOWED 4 - -/* Note: CANREACH_USINGWEAPON and CANREACH_CANTOUCH are not referenced in canReach because those are set by just a something&1 and a (something&1)<<1 */ - -/atom/proc/canReach(mob/user, obj/item/weapon/usingWeapon, ignoreNextMoveTime) - if (((!user.canmove) && (!istype(user, /mob/ai))) || user.stat != 0) - return 0 - /* This line broke my mental parser. --Stephen001 */ - if ((!(src in user.contents) && (((!(isturf(src)) && (!(isturf(src.loc)) && (src.loc && !(isturf(src.loc.loc))))) || !(isturf(user.loc))) && (src.loc != user.loc && (!(istype(src, /obj/screen)) && !(user.contents.Find(src.loc))))))) - return 0 - /* Breaks double-clicking on an equipment slot to place an item there, unfortunately. */ - /* - //If the dclicked item is not in our inventory - if (!(src in user.contents)) - //If the item is not a turf, and it is not on a turf, and it is inside something else which is not in a turf - if (!(isturf(src)) && (!(isturf(src.loc)) && (src.loc && !(isturf(src.loc.loc))))) - return - //If not, if we are inside some item instead of on a turf, and the dclicked item is not in the same place as us, and the dclicked item is not a screen object, and the dclicked item is not inside an item in our inventory. - else if ((!(isturf(user.loc))) && (src.loc != user.loc && (!(istype(src, /obj/screen)) && !(user.contents.Find(src.loc))))) - return - */ - - /* That's checking to see if it's being held/worn or something like that, methinks */ - var/t5 = (get_dist(src, user) <= 1 || src.loc == user) - if (istype(user, /mob/ai)) - t5 = 1 - else if (istype(user, /mob/drone)) - if (user:selectedTool == user:aiInterface) - if (istype(user:controlledBy, /mob/ai)) - t5 = 1 - user = user:controlledBy - usingWeapon = null - - if ((istype(src, /obj/item/weapon/organ) && src in user.contents)) - var/mob/human/H = user - if (istype(user, /mob/human)) - if (!(src == H.l_store || src == H.r_store)) - return 0 - else - return 0 - /* Suggested fix by shadowlord13 for Bug #1952091. --Stephen001 */ - var/turf/turfLoc = (istype(src, /turf) ? src : src.loc) - - /* Seems like a pretty important expression. Dare I fathom what it checks? --Stephen001 */ - /* flag 16 in this case apparently disables the distance check and the alternate 'is in contents' check in the var/t5 line. - It's used on guns, for instance. --shadowlord13 */ - if (((t5 || (usingWeapon && (usingWeapon.flags & 16))) && !(istype(src, /obj/screen)))) - if (ignoreNextMoveTime==0) - if (user.next_move < world.time) - user.prev_move = user.next_move - user.next_move = world.time + 10 - else - return 0 - if ((turfLoc && (get_dist(src, user) < 2 || turfLoc == user.loc))) - var/direct = get_dir(user, src) - var/obj/item/weapon/dummy/D = new /obj/item/weapon/dummy(user.loc) - var/ok = 0 - if ((direct - 1) & direct) - var/turf/T - switch(direct) - if(5.0) - T = get_step(user, NORTH) - if (T.Enter(D, src)) - D.loc = T - T = turfLoc - if (T.Enter(D, src)) - ok = 1 - else - T = get_step(user, EAST) - if (T.Enter(D, src)) - D.loc = T - T = turfLoc - if (T.Enter(D, src)) - ok = 1 - if(6.0) - T = get_step(user, SOUTH) - if (T.Enter(D, src)) - D.loc = T - T = turfLoc - if (T.Enter(D, src)) - ok = 1 - else - T = get_step(user, EAST) - if (T.Enter(D, src)) - D.loc = T - T = turfLoc - if (T.Enter(D, src)) - ok = 1 - if(9.0) - T = get_step(user, NORTH) - if (T.Enter(D, src)) - D.loc = T - T = turfLoc - if (T.Enter(D, src)) - ok = 1 - else - T = get_step(user, WEST) - if (T.Enter(D, src)) - D.loc = T - T = turfLoc - if (T.Enter(D, src)) - ok = 1 - if(10.0) - T = get_step(user, SOUTH) - if (T.Enter(D, src)) - D.loc = T - T = turfLoc - if (T.Enter(D, src)) - ok = 1 - else - T = get_step(user, WEST) - if (T.Enter(D, src)) - D.loc = T - T = turfLoc - if (T.Enter(D, src)) - ok = 1 - else - else - if (turfLoc.Enter(D, src)) - ok = 1 - else - if ((src.flags & 512 && get_dir(src, user) & src.dir)) - ok = 1 - if (user.loc != turfLoc) - for(var/atom/A in user.loc) - if ((!A.CheckExit(user, src.loc)) && A != user) - ok = 0 - del(D) - if (!(ok)) - return 0 - //user << "Debug message: usingWeapon [usingWeapon] t5 [t5] src [src] user [user]" - - return (((t5!=0)&1)<<1) | ((usingWeapon!=0)&1) | CANREACH_ALLOWED - else - if (istype(src, /obj/screen)) - if (ignoreNextMoveTime==0) - if (user.next_move < world.time) - user.prev_move = user.next_move - user.next_move = world.time + 10 - else - return 0 - return (((t5!=0)&1)<<1) | ((usingWeapon!=0)&1) | CANREACH_ALLOWED - return 0 + +/* + Proc name: canReach + Purpose: To indicate whether something - a turf, a mob, an object, whatever - can be reached from the user's location. + Parameters: + user - the mob who will be doing the attempted touching + usingWeapon - the weapon the mob is using to reach src. This is important if they're actually trying to *shoot* someone. + ignoreNextMoveTime - Normally this would be 0, and if world.time wasn't < next_time, the proc would return 0. If it was < next_time, prev_time and next_time would be changed (next_time being set to world.time + 10). + If, instead, ignoreNextMoveTime is 1, next_time, world.time, and prev_time will not be examined or changed. + + Return value: + This returns 0 if, for some reason, the user can't reach src. If not, the return value is a set of 3 bitflags: + 1: CANREACH_USINGWEAPON: If set, user is using a "weapon" (passed in as usingWeapon) on src. (This is kind of semi-useless to check, since the only case currently where this would be 0 when you had passed in a weapon would be if the user was a drone, and the weapon was the AI interface, and the drone was controlled by the AI player, in which case if you cared you would already be checking for it anyways because you would need to be changing the user and setting the weapon to null yourself.) + 2: CANREACH_CANTOUCH: If set, src can be touched by user (which was called t5 in DblClick). This is set if (get_dist(src, user) <= 1 || src.loc == user), or if the user is the AI, or if the user is a drone controlled by an AI using the AI interface tool. + 4: CANREACH_ALLOWED: If set, src is reachable by user, or the attempt is allowed for another reason. This is always set if the return value is valid. This differs from cantouch because this will be set if the user is using a gun on someone distant, whereas cantouch will not be set in that case. It's also theoretically possible to have a return value which contains only 4 for some /obj/screen objects, if the code in /atom/DblClick wasn't just overly paranoid. + + Valid combinations of those are: 0, 4, 5, 6, or 7. (You won't ever have 1 or 2 set if 4 isn't set) + + Detail on what's checked: + The user has to be able to move unless they are an AI, and their stat has to be 0 (alive and awake). + If the src is not in user's inventory, we MIGHT return 0: + If src is not a turf, and it is not on a turf, and it is inside something else which is not in a turf: + We return 0, it cannot be reached. + If not, if the user is inside some item instead of on a turf, and src is not in the same place as the user, and src is not a screen object, and src is not inside an item in user's inventory: + We return 0, it cannot be reached. + (Otherwise we continue) + And some other difficult to explain stuff is done here. + + Either CANREACH_CANTOUCH will be true, or the user must be using a weapon which has flag 16 set, or src is an /obj/screen. + Checks to determine if there are obstacles in the way (windows, etc) are done unless src is an /obj/screen. +*/ + +#define CANREACH_USINGWEAPON 1 +#define CANREACH_CANTOUCH 2 +#define CANREACH_ALLOWED 4 + +/* Note: CANREACH_USINGWEAPON and CANREACH_CANTOUCH are not referenced in canReach because those are set by just a something&1 and a (something&1)<<1 */ + +/atom/proc/canReach(mob/user, obj/item/weapon/usingWeapon, ignoreNextMoveTime) + if (((!user.canmove) && (!istype(user, /mob/ai))) || user.stat != 0) + return 0 + /* This line broke my mental parser. --Stephen001 */ + if ((!(src in user.contents) && (((!(isturf(src)) && (!(isturf(src.loc)) && (src.loc && !(isturf(src.loc.loc))))) || !(isturf(user.loc))) && (src.loc != user.loc && (!(istype(src, /obj/screen)) && !(user.contents.Find(src.loc))))))) + return 0 + /* Breaks double-clicking on an equipment slot to place an item there, unfortunately. */ + /* + //If the dclicked item is not in our inventory + if (!(src in user.contents)) + //If the item is not a turf, and it is not on a turf, and it is inside something else which is not in a turf + if (!(isturf(src)) && (!(isturf(src.loc)) && (src.loc && !(isturf(src.loc.loc))))) + return + //If not, if we are inside some item instead of on a turf, and the dclicked item is not in the same place as us, and the dclicked item is not a screen object, and the dclicked item is not inside an item in our inventory. + else if ((!(isturf(user.loc))) && (src.loc != user.loc && (!(istype(src, /obj/screen)) && !(user.contents.Find(src.loc))))) + return + */ + + /* That's checking to see if it's being held/worn or something like that, methinks */ + var/t5 = (get_dist(src, user) <= 1 || src.loc == user) + if (istype(user, /mob/ai)) + t5 = 1 + else if (istype(user, /mob/drone)) + if (user:selectedTool == user:aiInterface) + if (istype(user:controlledBy, /mob/ai)) + t5 = 1 + user = user:controlledBy + usingWeapon = null + + if ((istype(src, /obj/item/weapon/organ) && src in user.contents)) + var/mob/human/H = user + if (istype(user, /mob/human)) + if (!(src == H.l_store || src == H.r_store)) + return 0 + else + return 0 + /* Suggested fix by shadowlord13 for Bug #1952091. --Stephen001 */ + var/turf/turfLoc = (istype(src, /turf) ? src : src.loc) + + /* Seems like a pretty important expression. Dare I fathom what it checks? --Stephen001 */ + /* flag 16 in this case apparently disables the distance check and the alternate 'is in contents' check in the var/t5 line. + It's used on guns, for instance. --shadowlord13 */ + if (((t5 || (usingWeapon && (usingWeapon.flags & 16))) && !(istype(src, /obj/screen)))) + if (ignoreNextMoveTime==0) + if (user.next_move < world.time) + user.prev_move = user.next_move + user.next_move = world.time + 10 + else + return 0 + if ((turfLoc && (get_dist(src, user) < 2 || turfLoc == user.loc))) + var/direct = get_dir(user, src) + var/obj/item/weapon/dummy/D = new /obj/item/weapon/dummy(user.loc) + var/ok = 0 + if ((direct - 1) & direct) + var/turf/T + switch(direct) + if(5.0) + T = get_step(user, NORTH) + if (T.Enter(D, src)) + D.loc = T + T = turfLoc + if (T.Enter(D, src)) + ok = 1 + else + T = get_step(user, EAST) + if (T.Enter(D, src)) + D.loc = T + T = turfLoc + if (T.Enter(D, src)) + ok = 1 + if(6.0) + T = get_step(user, SOUTH) + if (T.Enter(D, src)) + D.loc = T + T = turfLoc + if (T.Enter(D, src)) + ok = 1 + else + T = get_step(user, EAST) + if (T.Enter(D, src)) + D.loc = T + T = turfLoc + if (T.Enter(D, src)) + ok = 1 + if(9.0) + T = get_step(user, NORTH) + if (T.Enter(D, src)) + D.loc = T + T = turfLoc + if (T.Enter(D, src)) + ok = 1 + else + T = get_step(user, WEST) + if (T.Enter(D, src)) + D.loc = T + T = turfLoc + if (T.Enter(D, src)) + ok = 1 + if(10.0) + T = get_step(user, SOUTH) + if (T.Enter(D, src)) + D.loc = T + T = turfLoc + if (T.Enter(D, src)) + ok = 1 + else + T = get_step(user, WEST) + if (T.Enter(D, src)) + D.loc = T + T = turfLoc + if (T.Enter(D, src)) + ok = 1 + else + else + if (turfLoc.Enter(D, src)) + ok = 1 + else + if ((src.flags & 512 && get_dir(src, user) & src.dir)) + ok = 1 + if (user.loc != turfLoc) + for(var/atom/A in user.loc) + if ((!A.CheckExit(user, src.loc)) && A != user) + ok = 0 + del(D) + if (!(ok)) + return 0 + //user << "Debug message: usingWeapon [usingWeapon] t5 [t5] src [src] user [user]" + + return (((t5!=0)&1)<<1) | ((usingWeapon!=0)&1) | CANREACH_ALLOWED + else + if (istype(src, /obj/screen)) + if (ignoreNextMoveTime==0) + if (user.next_move < world.time) + user.prev_move = user.next_move + user.next_move = world.time + 10 + else + return 0 + return (((t5!=0)&1)<<1) | ((usingWeapon!=0)&1) | CANREACH_ALLOWED + return 0 /atom/Click() if (!usr.disable_one_click) @@ -5656,7 +5616,7 @@ return else usr:lastDblClick = world.time - + ..() // I changed everything in this function from using usr to user before I found out that you can actually change the value of usr. var/mob/user = usr @@ -5665,7 +5625,7 @@ usr = user var/obj/item/weapon/W = user.equipped() - if (user.stat == 0) + if (user.stat == 0) if (istype(user, /mob/drone)) //check to see if it's one of our tools or the boxes they're in var/obj/item/weapon/tool = user:checkIsOurTool(src) @@ -5686,56 +5646,65 @@ if (W == src) //user.client_mob() << "Debug message: user clicked their active item." spawn(0) W.attack_self(user) - return + return + + var/retval = src.canReach(user, W, 0) + + if (retval==0) + return - var/retval = src.canReach(user, W, 0) - - if (retval==0) - return - if (istype(user, /mob/drone)) if (user:selectedTool == user:aiInterface) if (istype(user:controlledBy, /mob/ai)) user = user:controlledBy W = null - - if (!(retval & CANREACH_USINGWEAPON)) - W = null - - //if (((t5 || (usingWeapon && (usingWeapon.flags & 16))) && !(istype(src, /obj/screen)))) - - if (retval & CANREACH_ALLOWED) - if (!( user.restrained() )) - if ((W && !( istype(src, /obj/screen) ))) - src.attackby(W, user) - if (W) - W.afterattack(src, user) - else - if (istype(user, /mob/human)) - src.attack_hand(user, user.hand) - else - if (istype(user, /mob/monkey)) - src.attack_paw(user, user.hand) - else - if (istype(user, /mob/human)) - src.hand_h(user, user.hand) - else - if (istype(user, /mob/monkey)) - src.hand_p(user, user.hand) - + + if (!(retval & CANREACH_USINGWEAPON)) + W = null + + //if (((t5 || (usingWeapon && (usingWeapon.flags & 16))) && !(istype(src, /obj/screen)))) + + if (retval & CANREACH_ALLOWED) + if (!( usr.restrained() )) + if ((W && !( istype(src, /obj/screen)))) + if (retval & CANREACH_CANTOUCH) + src.attackby(W, usr) + if ((retval & CANREACH_USINGWEAPON) && !(retval & CANREACH_CANTOUCH)) + W.afterattack(src, usr) + else + if (istype(usr, /mob/ai)) /*The AI couldn't activate computers, this should fix that problem*/ + //The AI was also able to control objects when the AI didn't have power.. BAD + if(usr:aiRestorePowerRoutine == 0) + src.attack_ai(usr, usr.hand) + else + usr << "You currently do not have the power to preform this task" + else + if (istype(usr, /mob/human)) + src.attack_hand(usr, usr.hand) + else + if (istype(usr, /mob/monkey)) + src.attack_paw(usr, usr.hand) + else + if (istype(usr, /mob/human)) + src.hand_h(usr, usr.hand) + else + if (istype(usr, /mob/monkey)) + src.hand_p(usr, usr.hand) + + /obj/proc/updateDialog() - var/list/nearby = viewers(1, src) + var/list/nearby = viewers(1, src) var/skipAI = 0 for(var/mob/M in nearby) if ((M.client && M.machine == src)) src.attack_hand(M) else if (istype(M, /mob/drone) && M.machine==src) - if (M:controlledBy!=null) - if ((!istype(M:controlledBy, /mob/ai)) || (!istype(M:equipped(), /obj/item/weapon/drone/aiInterface))) - src.attack_hand(M) - if (istype(M:controlledBy, /mob/ai)) - skipAI = 1 + if (M:controlledBy!=null) + if ((!istype(M:controlledBy, /mob/ai)) || (!istype(M:equipped(), /obj/item/weapon/drone/aiInterface))) + src.attack_hand(M) + if (istype(M:controlledBy, /mob/ai)) + skipAI = 1 if (!skipAI) AutoUpdateAI(src, 0) @@ -5745,10 +5714,10 @@ for(var/mob/M in nearby) if ((M.client && M.machine == src)) src:attack_self(M) - -//Used for infra_sensor, etc -/obj/proc/updateSelfDialog(atom/origin) - var/list/nearby = viewers(1, origin) - for(var/mob/M in nearby) - if (M.client) - src:attack_self(M) + +//Used for infra_sensor, etc +/obj/proc/updateSelfDialog(atom/origin) + var/list/nearby = viewers(1, origin) + for(var/mob/M in nearby) + if (M.client) + src:attack_self(M) diff --git a/Code/mob.dm b/Code/mob.dm index 2888458..2ca0728 100644 --- a/Code/mob.dm +++ b/Code/mob.dm @@ -1016,28 +1016,72 @@ return if (src.item) - for(var/mob/O in viewers(src.target, null)) - if ((O.hasClient() && !( O.blinded ))) - O.show_message(text("\red [] is trying to put a [] on []", src.source, src.item, src.target), 1) - else - var/message = null + src.item.add_fingerprint(src.source) + if (!( src.item )) switch(src.place) + if("head") + if (!( src.target.wear_mask )) + //SN src = null + del(src) + return if("l_hand") - message = text("\red [] is trying to take off a [] from []'s left hand!", src.source, src.target.l_hand, src.target) + if (!( src.target.l_hand )) + //SN src = null + del(src) + return if("r_hand") - message = text("\red [] is trying to take off a [] from []'s right hand!", src.source, src.target.r_hand, src.target) + if (!( src.target.r_hand )) + //SN src = null + del(src) + return if("back") - message = text("\red [] is trying to take off a [] from []'s back!", src.source, src.target.back, src.target) + if (!( src.target.back )) + //SN src = null + del(src) + return if("handcuff") - message = text("\red [] is trying to unhandcuff []!", src.source, src.target) + if (!( src.target.handcuffed )) + //SN src = null + del(src) + return if("internal") - if (src.target.internal) - message = text("\red [] is trying to remove []'s internals", src.source, src.target) - else - message = text("\red [] is trying to set on []'s internals.", src.source, src.target) + if ((!( (istype(src.target.wear_mask, /obj/item/weapon/clothing/mask) && istype(src.target.back, /obj/item/weapon/tank) && !( src.target.internal )) ) && !( src.target.internal ))) + //SN src = null + del(src) + return + + var/message = null + switch(src.place) + if("l_hand") + if(src.target.l_hand) + message = text("\red [] is trying to take off a [] from []'s left hand!", src.source, src.target.l_hand, src.target) else - for(var/mob/M in viewers(src.target, null)) - M.show_message(message, 1) + message = text("\red [] is trying to put a [] on []", src.source, src.item, src.target) + if("r_hand") + if(src.target.r_hand) + message = text("\red [] is trying to take off a [] from []'s right hand!", src.source, src.target.r_hand, src.target) + else + message = text("\red [] is trying to put a [] on []", src.source, src.item, src.target) + if("back") + if(src.target.r_hand) + message = text("\red [] is trying to take off a [] from []'s back!", src.source, src.target.back, src.target) + else + message = text("\red [] is trying to put a [] on []", src.source, src.item, src.target) + + if("handcuff") + if(src.target.handcuffed) + message = text("\red [] is trying to unhandcuff []!", src.source, src.target) + else + message = text("\red [] is trying to put a [] on []", src.source, src.item, src.target) + if("internal") + if (src.target.internal) + message = text("\red [] is trying to remove []'s internals", src.source, src.target) + else + message = text("\red [] is trying to set on []'s internals.", src.source, src.target) + else + for(var/mob/M in viewers(src.target, null)) + M.show_message(message, 1) + spawn( 30 ) src.done() return @@ -1170,36 +1214,44 @@ /obj/equip_e/human/process() + if (src.item) src.item.add_fingerprint(src.source) if (!( src.item )) switch(src.place) if("mask") if (!( src.target.wear_mask )) + //SN src = null del(src) return if("headset") if (!( src.target.w_radio )) + //SN src = null del(src) return if("l_hand") if (!( src.target.l_hand )) + //SN src = null del(src) return if("r_hand") if (!( src.target.r_hand )) + //SN src = null del(src) return if("suit") if (!( src.target.wear_suit )) + //SN src = null del(src) return if("uniform") if (!( src.target.w_uniform )) + //SN src = null del(src) return if("back") if (!( src.target.back )) + //SN src = null del(src) return if("syringe") @@ -1208,77 +1260,126 @@ return if("handcuff") if (!( src.target.handcuffed )) + //SN src = null del(src) return if("id") if ((!( src.target.wear_id ) || !( src.target.w_uniform ))) + //SN src = null del(src) return if("internal") if ((!( (istype(src.target.wear_mask, /obj/item/weapon/clothing/mask) && istype(src.target.back, /obj/item/weapon/tank) && !( src.target.internal )) ) && !( src.target.internal ))) + //SN src = null del(src) return var/list/L = list( "syringe", "pill" ) - if ((src.item && !( L.Find(src.place) ))) - for(var/mob/O in viewers(src.target, null)) - O.show_message(text("\red [] is trying to put \a [] on []", src.source, src.item, src.target), 1) + if (!( L.Find(src.place) )) + var/message = null + switch(src.place) + if("mask") + if(src.target.wear_mask) + message = text("\red [] is trying to take off \a [] from []'s head!", src.source, src.target.wear_mask, src.target) + else + message = text("\red [] is trying to put a [] on []", src.source, src.item, src.target) + if("headset") + if(src.target.w_radio) + message = text("\red [] is trying to take off \a [] from []'s face!", src.source, src.target.w_radio, src.target) + else + message = text("\red [] is trying to put a [] on []", src.source, src.item, src.target) + if("l_hand") + if(src.target.l_hand) + message = text("\red [] is trying to take off \a [] from []'s left hand!", src.source, src.target.l_hand, src.target) + else + message = text("\red [] is trying to put a [] on []", src.source, src.item, src.target) + if("r_hand") + if(src.target.r_hand) + message = text("\red [] is trying to take off \a [] from []'s right hand!", src.source, src.target.r_hand, src.target) + else + message = text("\red [] is trying to put a [] on []", src.source, src.item, src.target) + if("gloves") + if(src.target.gloves) + message = text("\red [] is trying to take off the [] from []'s hands!", src.source, src.target.gloves, src.target) + else + message = text("\red [] is trying to put a [] on []", src.source, src.item, src.target) + if("eyes") + if(src.target.glasses) + message = text("\red [] is trying to take off the [] from []'s eyes!", src.source, src.target.glasses, src.target) + else + message = text("\red [] is trying to put a [] on []", src.source, src.item, src.target) + if("ears") + if(src.target.ears) + message = text("\red [] is trying to take off the [] from []'s ears!", src.source, src.target.ears, src.target) + else + message = text("\red [] is trying to put a [] on []", src.source, src.item, src.target) + if("head") + if(src.target.head) + message = text("\red [] is trying to take off the [] from []'s head!", src.source, src.target.head, src.target) + else + message = text("\red [] is trying to put a [] on []", src.source, src.item, src.target) + if("shoes") + if(src.target.shoes) + message = text("\red [] is trying to take off the [] from []'s feet!", src.source, src.target.shoes, src.target) + else + message = text("\red [] is trying to put a [] on []", src.source, src.item, src.target) + if("belt") + if(src.target.belt) + message = text("\red [] is trying to take off the [] from []'s belt!", src.source, src.target.belt, src.target) + else + message = text("\red [] is trying to put a [] on []", src.source, src.item, src.target) + if("suit") + if(src.target.wear_suit) + message = text("\red [] is trying to take off \a [] from []'s body!", src.source, src.target.wear_suit, src.target) + else + message = text("\red [] is trying to put a [] on []", src.source, src.item, src.target) + if("back") + if(src.target.back) + message = text("\red [] is trying to take off \a [] from []'s back!", src.source, src.target.back, src.target) + else + message = text("\red [] is trying to put a [] on []", src.source, src.item, src.target) + if("handcuff") + if(src.target.handcuffed) + message = text("\red [] is trying to unhandcuff []!", src.source, src.target) + else + message = text("\red [] is trying to put a [] on []", src.source, src.item, src.target) + if("uniform") + if(src.target.w_uniform) + message = text("\red [] is trying to take off \a [] from []'s body!", src.source, src.target.w_uniform, src.target) + else + message = text("\red [] is trying to put a [] on []", src.source, src.item, src.target) + if("pockets") + message = text("\red [] is trying to empty []'s pockets!!", src.source, src.target) + if("CPR") + if (src.target.cpr_time >= world.time + 3) + //SN src = null + del(src) + return + message = text("\red [] is trying perform CPR on []!", src.source, src.target) + if("id") + if(src.target.wear_id) + message = text("\red [] is trying to take off [] from []'s uniform!", src.source, src.target.wear_id, src.target) + else + message = text("\red [] is trying to put a [] on []", src.source, src.item, src.target) + if("internal") + if (src.target.internal) + message = text("\red [] is trying to remove []'s internals", src.source, src.target) + else + message = text("\red [] is trying to set on []'s internals.", src.source, src.target) + else + for(var/mob/M in viewers(src.target, null)) + M.show_message(message, 1) + else if (src.place == "syringe") for(var/mob/O in viewers(src.target, null)) O.show_message(text("\red [] is trying to inject []!", src.source, src.target), 1) + //Foreach goto(466) else if (src.place == "pill") for(var/mob/O in viewers(src.target, null)) O.show_message(text("\red [] is trying to force [] to swallow []!", src.source, src.target, src.item), 1) - else - var/message = null - switch(src.place) - if("mask") - message = text("\red [] is trying to take off \a [] from []'s head!", src.source, src.target.wear_mask, src.target) - if("headset") - message = text("\red [] is trying to take off \a [] from []'s face!", src.source, src.target.w_radio, src.target) - if("l_hand") - message = text("\red [] is trying to take off \a [] from []'s left hand!", src.source, src.target.l_hand, src.target) - if("r_hand") - message = text("\red [] is trying to take off \a [] from []'s right hand!", src.source, src.target.r_hand, src.target) - if("gloves") - message = text("\red [] is trying to take off the [] from []'s hands!", src.source, src.target.gloves, src.target) - if("eyes") - message = text("\red [] is trying to take off the [] from []'s eyes!", src.source, src.target.glasses, src.target) - if("ears") - message = text("\red [] is trying to take off the [] from []'s ears!", src.source, src.target.ears, src.target) - if("head") - message = text("\red [] is trying to take off the [] from []'s head!", src.source, src.target.head, src.target) - if("shoes") - message = text("\red [] is trying to take off the [] from []'s feet!", src.source, src.target.shoes, src.target) - if("belt") - message = text("\red [] is trying to take off the [] from []'s belt!", src.source, src.target.belt, src.target) - if("suit") - message = text("\red [] is trying to take off \a [] from []'s body!", src.source, src.target.wear_suit, src.target) - if("back") - message = text("\red [] is trying to take off \a [] from []'s back!", src.source, src.target.back, src.target) - if("handcuff") - message = text("\red [] is trying to unhandcuff []!", src.source, src.target) - if("uniform") - message = text("\red [] is trying to take off \a [] from []'s body!", src.source, src.target.w_uniform, src.target) - if("pockets") - message = text("\red [] is trying to empty []'s pockets!!", src.source, src.target) - if("CPR") - if (src.target.cpr_time >= world.time + 3) - del(src) - return - message = text("\red [] is trying perform CPR on []!", src.source, src.target) - if("id") - message = text("\red [] is trying to take off [] from []'s uniform!", src.source, src.target.wear_id, src.target) - if("internal") - if (src.target.internal) - message = text("\red [] is trying to remove []'s internals", src.source, src.target) - else - message = text("\red [] is trying to set on []'s internals.", src.source, src.target) - else - for(var/mob/M in viewers(src.target, null)) - M.show_message(message, 1) + //Foreach goto(527) spawn( 30 ) src.done() return @@ -2648,6 +2749,8 @@ /* IMPORTANT NOTE: Both humans and drones have a copy of this code. If the code is modified to fix a bug or whatever, it will need to be modified in BOTH of them. Monkeys also have some of this code, but not all of it. (Moving the code into a shared method or two wasn't feasible because of where the ..() calls are and such) --shadowlord13 */ /mob/human/Move(a, b, flag) + if ((!( src.buckled ) || src.buckled.loc != src.loc)) + src.buckled = null if (src.buckled) return if (src.restrained()) diff --git a/Code/ss13_algorithm2.dm b/Code/ss13_algorithm2.dm index a62d46d..f201451 100644 --- a/Code/ss13_algorithm2.dm +++ b/Code/ss13_algorithm2.dm @@ -31,16 +31,16 @@ for(var/mob/human/M in world) if ((!( M.client ) || !( M.start ) || M.already_placed)) else - unassigned_mobs += M - //If someone picked AI before it was disabled, or has a saved profile with it on a game that now lacks it, this will make sure they don't become the AI, by changing that choice to Captain. - if (!config.allowai) - if (M.occupation1 == "AI") - M.occupation1 = "Captain" - if (M.occupation2 == "AI") - M.occupation2 = "Captain" - if (M.occupation3 == "AI") - M.occupation3 = "Captain" - + unassigned_mobs += M + //If someone picked AI before it was disabled, or has a saved profile with it on a game that now lacks it, this will make sure they don't become the AI, by changing that choice to Captain. + if (!config.allowai) + if (M.occupation1 == "AI") + M.occupation1 = "Captain" + if (M.occupation2 == "AI") + M.occupation2 = "Captain" + if (M.occupation3 == "AI") + M.occupation3 = "Captain" + if (M.occupation1 != "No Preference") occupations1[M.occupation1] += M if (M.occupation2 != "No Preference") @@ -58,28 +58,28 @@ if (captain_choice.len>0) final_occupations["Captain"] += captain_choice[1] occupation_choices -= "Captain" - unassigned_mobs -= captain_choice[1] - var/list/captain = final_occupations["Captain"] + unassigned_mobs -= captain_choice[1] + var/list/captain = final_occupations["Captain"] if (captain.len==0) captain_choice = occupations2["Captain"] if (captain_choice.len) final_occupations["Captain"] += captain_choice[1] occupation_choices -= "Captain" - unassigned_mobs -= captain_choice[1] - + unassigned_mobs -= captain_choice[1] + captain = final_occupations["Captain"] if (captain.len==0) captain_choice = occupations3["Captain"] if (captain_choice.len) final_occupations["Captain"] += captain_choice[1] occupation_choices -= "Captain" - unassigned_mobs -= captain_choice[1] - + unassigned_mobs -= captain_choice[1] + captain = final_occupations["Captain"] if (captain.len==0) var/list/contenders = list( ) for(var/mob/human/M in world) - if (M.client) + if (M.client) if (M.start) contenders += M if (contenders.len>1) @@ -87,14 +87,14 @@ final_occupations["Captain"] += M occupation_choices -= "Captain" unassigned_mobs -= M - if (M.occupation1 != "No Preference") - occupations1[text("[]", M.occupation1)] -= M - if (M.occupation2 != "No Preference") - occupations2[text("[]", M.occupation2)] -= M - if (M.occupation3 != "No Preference") - occupations3[text("[]", M.occupation3)] -= M - else - world << text("Captainship not forced on someone since this is a one-player game.") + if (M.occupation1 != "No Preference") + occupations1[text("[]", M.occupation1)] -= M + if (M.occupation2 != "No Preference") + occupations2[text("[]", M.occupation2)] -= M + if (M.occupation3 != "No Preference") + occupations3[text("[]", M.occupation3)] -= M + else + world << text("Captainship not forced on someone since this is a one-player game.") for(var/mob/human/M in unassigned_mobs) if (assistant_occupations.Find(M.occupation1)) M.Assign_Rank(M.occupation1) @@ -199,18 +199,18 @@ E.Assign_Rank(occupation) for(var/mob/human/M in unassigned_mobs) M.Assign_Rank(pick("Research Assistant", "Technical Assistant", "Medical Assistant", "Staff Assistant")) - for (var/mob/ai/aiPlayer in world) - spawn(0) - var/newname = input(aiPlayer, "You are the AI. Would you like to change your name to something else?", "Name change", aiPlayer.rname) - if (newname) - if (length(newname) >= 26) - newname = copytext(newname, 1, 26) - newname = dd_replacetext(newname, ">", "'") - aiPlayer.rname = newname - aiPlayer.name = newname - - world << text("[] is the AI!", aiPlayer.rname) - + spawn(0) + for(var/mob/ai/aiPlayer in world) + var/newname = input(aiPlayer, "You are the AI. Would you like to change your name to something else?", "Name change", aiPlayer.rname) + if (newname) + if (length(newname) >= 26) + newname = copytext(newname, 1, 26) + newname = dd_replacetext(newname, ">", "'") + aiPlayer.rname = newname + aiPlayer.name = newname + + world << text("[] is the AI!", aiPlayer.rname) + return /proc/shuffle(var/list/shufflelist) @@ -311,7 +311,7 @@ if(3.0) HTML += "Which occupation would you like if you couldn't have the others?

" else - for(var/job in uniquelist(occupations + assistant_occupations) ) + for(var/job in uniquelist(occupations + assistant_occupations) ) if (job!="AI" || config.allowai) HTML += text("
[]
", src, occ, job, job) HTML += text("Captain
", src, occ) @@ -338,8 +338,8 @@ if (job == null) job = "Captain" if ((!( occupations.Find(job) ) && !( assistant_occupations.Find(job) ) && job != "Captain")) - return - if (job=="AI" && (!config.allowai)) + return + if (job=="AI" && (!config.allowai)) return switch(occ) if(1.0) @@ -596,13 +596,13 @@ src << "\blue You have been teleported to your new starting location!" src.loc = S.loc return - -/proc/AutoUpdateAI(obj/subject, isSelf) - if (subject!=null) - for(var/mob/ai/M in world) - if ((M.client && M.machine == subject)) - if (isSelf==0) - subject.attack_ai(M) - else - subject:attack_self(M) - + +/proc/AutoUpdateAI(obj/subject, isSelf) + if (subject!=null) + for(var/mob/ai/M in world) + if ((M.client && M.machine == subject)) + if (isSelf==0) + subject.attack_ai(M) + else + subject:attack_self(M) + diff --git a/spacestation13.dme b/spacestation13.dme index eb2972e..677a298 100644 --- a/spacestation13.dme +++ b/spacestation13.dme @@ -4,8 +4,8 @@ // BEGIN_INTERNALS /* -FILE: Code\globals.dm -DIR: Code Code\Machinery Code\Machinery\Computer Code\Machinery\Power +FILE: Code\Machinery\Door\airlock.dm +DIR: Code Code\CTF Code\Effects Code\Item Code\Item\Weapon Code\Machinery Code\Machinery\Atmoalter Code\Machinery\Computer Code\Machinery\Door Code\Machinery\Power Code\mob MAP_ICON_TYPE: 0 AUTO_FILE_DIR: ON */ @@ -25,6 +25,8 @@ AUTO_FILE_DIR: ON #define FILE_DIR "Code/mob" #define FILE_DIR "Icons" #define FILE_DIR "Interface" +#define FILE_DIR "players" +#define FILE_DIR "supporting-docs" // END_FILE_DIR // BEGIN_PREFERENCES @@ -33,7 +35,6 @@ AUTO_FILE_DIR: ON // BEGIN_INCLUDE #include "ss13h_new.dmp" #include "Code\!atoms.dm" -#include "Code\_debug.dm" #include "Code\aaaDefines.dm" #include "Code\ai_area_selection.dm" #include "Code\airtunnel.dm" @@ -75,6 +76,7 @@ AUTO_FILE_DIR: ON #include "Code\Effects\water.dm" #include "Code\Item\Weapon\aimodules.dm" #include "Code\Item\Weapon\multitool.dm" +#include "Code\Item\Weapon\weldingtool.dm" #include "Code\Machinery\_machinery.dm" #include "Code\Machinery\_pipe_misc.dm" #include "Code\Machinery\alarm.dm"