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
-
-- Merged in basically everything from http://shadowlord13.googlepages.com/openss13_b12-index.html (the person who was working on that is on the openss13 dev team now. If you're curious, that's also the person writing this particular entry in the changelog).
-
- Made further changes to the map, starting with that map version: moved the air tunnel north, made a hall going north to it, moved the crew arrival shuttle so it connects to that hall, so meteors can hit the part of the station it was protecting before
-
- The air tunnel now connects to a gauntlet of turrets leading to the AI upload room, which is in the space between the air tunnel and the rest of the station south of it.
-
- Moved the AI's room itself into there as well. The weapons sat has returned to being what it originally was. To get to the AI now, you would either have to go through one or more rwalls and grilles (depending on where you try to break through), or go through the turret gauntlet, and through the AI upload room and out a door on the other side of it. (Of course a sufficiently powerful bomb could probably bust through the walls, if not kill the AI, even if you plant it in the air tunnel)
-
- The AI still has four SMES generators, but they are charged from SS13's main power now. So, if the station loses power, the AI will probably die as well (eventually).
-
- Fixed an exception coming from the AI clicking an engine computer.
-
- Fixed exceptions from clicking things which dropped the active held item while you had someone grabbed in your active hand. If you try to click a closet with someone grabbed, you stuff them in it now. If you try to click a table or rack, you don't do anything. Previously all of these caused you to lose the grip and caused an exception (because when it told the grip to be dropped, it deleted itself, and then it tried to move null).
-
- Many many things which could take someone from being 'dead' to being 'unconscious' have been fixed. These were all cases where stat was being set to 1 without being checked to see if it was 2. Mind you, it wasn't terribly easy to actually resurrect someone with this, since they always immediately died again due to all the damage they had taken, but it did cause them to get (Dead) (Dead) (Dead) (Dead) spammed at the end of their corpse's name if they were thwacked repeatedly. Also, related stuff that would say they were stunned, weakened, etc, should also not happen (unless I missed some).
-
- Syndicate mini-station is more rectangular-ish, and the forcefield around it is more circle-ish. The forcefield is also thicker and completely encases the mini-station, making it harder to teleport inside.
-
- Un-nerfed meteor chance in non-meteor modes a bit ... well, it was really at 0%, so this is technically still an un-nerfing. Now it's at 0.1% chance each second.
-
- Added an alternate_ai_laws config variable, which gives the AI some more reasonable laws. It also has some more law adjustments when it's the traitor.
-
- Merged in a number of changes from the goons' svn (but not all of them - I didn't take all of them, and I probably missed a bunch because I didn't try to compare any of the code which was moved in the openss13 code reorganizations). Changes that I merged in include:
-
- Anesthetic tanks have 700000 N2O and 1000000 oxygen in them now, instead of 1000 N2O and no oxygen
-
- Syndicate closets on the mini-station instead of stuff strewn everywhere
-
- Starting the syndicates in nuclear mode with a few bombs (the goons had given them four bombs and left the heater with the parts to make one or two more bombs, but I've reduced that to two bombs and removed the heater and the bomb-making parts)
-
- Blob dies in space and can't spread at all in the start zone or shuttles
-
- Map transitions west and east work properly
-
- A hardcoded supply station spawnpoint at 77,40,7 for Thief jack, Link43130, Hutchy2k1, Easty, and Exadv1 was removed.
-
- You spawn in /area/arrival/start now instead of sleep_area, and the rest of the arrival shuttle has its own area (/area/arrival/shuttle). The original sleep area is also actually in /area/sleep_area again now.
-
- Attacking someone with a taser gun at point-blank range uses charges and will thwack them instead of stunning if you have no charges.
-
- People who are disconnected have "a vacant look in their eyes" when checked with a medical analyzer.
-
- A fix to make the gasmask overlay not remain after death
-
- Stuttering is applied before HTMLizing text.
-
- Shuttle doors can be opened and closed by clicking them now.
-
- A fix for spawning without your ID
-
- Staff assistants have access level 3.
-
- Fixes to timers showing the wrong icon.
-
- Taser and laser gun have a maximum charges var (They have 10 each).
-
- I had missed the desc on the protect station module.
-
- Added this patch, which reduces turret firing rate and makes shots able to hit things other than the chest (which is another way of fixing the "the turret can't kill me" problem, but is probably better than the one I used). I didn't include the fix for shooting laying down people, since I think my fix for that was better than the one in this patch: http://code.google.com/p/ss13/issues/detail?id=91&colspec=ID%20Type%20Branch%20Status%20Priority%20Owner%20Summary
-
- - The steal-laser-pistol objective checks the charges against maximum_charges instead of 25 now.
-
- Prox bombs and timer bombs count for the traitor fully-heated-plasma-bomb objective now.
-
- In nuclear mode, there is now a 25% chance of the AI being loyal to the syndicate instead of SS13. (The SS13 personnel won't know it)
-
- There are now 24 solar panels at north solar, which is the same number that main solar (southwest) has (there were 12 at north solar before).
-
- Fixed several places (everywhere I did it) where I typo'd in an infinite loop in attack_ai calling itself when it should have been calling attack_hand instead.
-
- Fixed some more errors in the computers that crept in while I was merging them through the reorganizations.
-
- Fixed a bug which was causing the air tank dialog to not update when you switched gas flow off (so it still said 'stop gas flow' instead of 'restore gas flow').
-
- You shouldn't be able to knock out, stun, paralyze, etc, the AI anymore.
-
- Timer/igniters now actually ignite when the timer finishes.
-
- Added air_pressure_flow to config.txt, which, if enabled (it's disabled by default), makes a few changes to air stuff: Air pressure and temperature will affect how strongly things are pushed/pulled between tiles, and air and fire processing will occur on tiles which are adjacent to space. This is disabled by default because it would be slightly slower and the only really notable thing it does is letting tiles next to space burn.
-
- Added admin panel secret for making air ignite itself if it reaches a sufficient amount of oxygen (initially for testing purposes).
-
- Added a config var for the amount of gas needed for a fire in a tile to keep going, or for it to spread to another tile, with the config.txt variable named min_gas_for_fire. (If you're bored, change it from 900000 to 9000, start a game, and light an igniter to set the station on fire. Eventually it'll consume all the oxygen *without destroying the floors* because the temperature won't get hot enough (in most places) to harm them. Or use the air-ignites-self secret :P)
-
- Added a METEORCHANCE config.txt variable and fixed the meteor chance stuff. Previous attempts to put the chance below 1% per second were resulting in no meteors at all, due to BYOND's prob function not liking numbers like 0.5. (The config file's chance doesn't affect meteor mode or sandbox mode, which always have 100% and 0% respectively)
-
- The AI can no longer be: fed pills, handcuffed, injected with a syringe, shaken to wake up, have CPR applied, be knocked out or stunned by being struck by an air tank, eyedropped, treated with ointment, treated with a bruise pack, health-analyzed, sleepypenned, affected by flashes or flashbangs, or aggressively grabbed or strangled. Additionally, punching the AI will harm your active hand instead of harming the AI. You can still shoot it or whack it with actual objects.
-
- The AI has a HUD icon for power or loss thereof, a fire icon, and a damage icon. (There isn't a hud background under them, so they just float over a few tiles on the right side of the map)
-
- Fixed a bug: If you had flipped the main breaker off on the AI's APC, it was unable to find the APC to hack it. Now it can.
-
- The privs required to see links on the admin panel should match up now with the privs required to use those links. Previously it was possible - even likely for lower priv levels - that you could try to do something and the admin panel would simply ignore you (Of course, if I made a mistake and it's still broken, it will still ignore you. Er... I guess we don't want to give anyone trying to trick the system any hints or something like that).
-
- Deactivating cameras *should* cause anyone looking through it to get notified of the deactivation, and to then get kicked out of the camera. (This needs to be tested)
-
- Maintenance drones for the AI or station personnel to control (optional, see config.txt). It has the standard tools (wirecutters, crowbar, screwdriver, welder), and a gripper which is kind of like a robo-hand, for manipulating things, or picking up and carrying or using one other item, and drone control stations (for humans). There are three drones on SS13, one in a closet east of the EVA room, one in a closet attached to engine storage, and one in atmospherics in the room with all the gas tanks. There are currently two drone control stations, one in the engine room and one in southwest atmospherics (Security doesn't have one because (a) they're ridiculously easy to break into, and (b) these are maintenance drones).
-
- Electrician's toolboxes now have a pair of insulated gloves in them (replacing one of the coils of wires).
-
- You should no longer be able to open the take-off/put-on dialog on AIs (or drones).
-
-
-Version 40.93.2H9.6
-
-- Started pipelaying system, Pipe cutting/damage not yet complete.
-
- Added burning icon for labcoat
-
- Fixed a minor airsystem bug for /obj/moves
-
- Fixed admin toggle of mode-voting message (now reports state of allowvotemode correctly)
-
- Engine ejection now carries over firelevel of turfs
-
- Fixed bug with aux engine not working if started too quickly.
-
- Updated autolathe to make pipe fittings
-
- Lowererd maximum circulator rates to give a better range of working values.
-
- Fixed firealarm triggering when unpowered.
-
- Made a temporary fix to runtime errors when blob attacks pipes (until full pipe damage system implemented).
-
- Code reorganization of /obj/machinery continued.
-
-
-Version 40.93.2H9.5
-
-- Fixed a few bugs with reinforced windows.
-
- Adding turbine generator to aux. engine.
-
- Added Hikato's Sandbox mode.
-
- Fixed bug with repairing walls and cable visibility.
-
-Version 40.93.2H9.4
-
-- Initial version of new generator (not yet completly working). Redesigned and remapped engine and generator.
-
- T-scanners now have a chance to reveal cloakers when in range.
-
- Fire extinguishers and throwing object can be used to manoeuvre in space to a limited extent.
-
- SMESes now more user-friendly, will charge automatically if power available.
-
- Can now config so votes from dead players aren't counted.
-
- Can now config so player votes default to no vote.
-
- Players can now reply to Admin PMs.
-
-Version 40.93.2H9.3
-
-- Added main power storage devices (SMES). Reconfigured map power system to use them.
-
- Added backup solar power generators and added them to the map.
-
- Added custom job name assignments through the ID computer.
-
- Engine cannot be ejected now without sufficient ID access.
-
- Cable can now be directly connected from a turf to a power device (SMES, generator, etc.)
-
- Admins & above can now observe when not dead. (Now fixed).
-
- Solar panel controllers can now be set to rotate the panels at a given rate.
-
- Fixed a problem with client inactivity discounting votes much too soon.
-
-Version 40.93.2H9.2
-
-- Added some new admin options,
-
- Added 1st test version of engine power generator.
-
- Rewrote canister/pipework connection routines to fix a gas conservation bug.
-
- Valves don't require power to switch anymore.
-
- T-scanners can now be clipped on belts.
-
- Added a cell recharger.
-
- Some small map changes.
-
- Fixed crashes with admin Vars command.
-
- Fixed cable-cutting bug that sometimes did not update the power network.
-
- Fixed bugs when making reinforced glass.
-
- Destroyed canisters can now be disconnected from a pipe.
-
-Version 40.93.2H9.1
-
-- Cable item added. Cable cutting now works. Cable laying started.
-
- Fixed stacking bug with tiles, sheets etc.
-
- Newly laid cable now merges with existing powernets.
-
- Added power supply from a dummy generator object for testing. Power switching logic still buggy.
-
- Cables now affected by explosions & fire. Automatically rebuild power network when deleted.
-
- Improved power switching logic.
-
- Addeed high-capacity power cells to some key area APCs.
-
- Most machines now cannot be operated when unpowered.
-
- Made the station cable layout much more redundant. It's no long possible to disable the whole grid with a single cut.
-
- Added a monitoring computer to the engine.
-
- Canisters are now attached to a connector with a wrench (more logical than a screwdriver).
-
- It's now hazardous to cut or modify powered cable without proper protection.
-
- Grilles can now be electrified, and have a chance of shocking someone if attacked.
-
-Version 40.93.2H9
-
-- APC added, with test functionality. Started adding power requirements to machinery objects. (Wire system, power generators & cell charging not yet implemented.)
-
- Fixed bug with lightswitches that wouldn't turn back on.
-
- Power usage added for most machines. APCs currently running only on battery power, no way to recharge. Underfloor wire system placed but non-operational.
-
- Some background events added to Blob mode.
-
- Fixed some air propagation bugs and optimized some procedures.
-
- Power networks created, but not functional as yet.
-
- Added a scanner for underfloor wires and pipes.
-
- Modified underfloor hiding system to be more general.
-
-Version 40.93.2H8
-
-- Fixed bug with cryo freezer and flask changing.
-
- Fixed numerous runtime errors.
-
- Re-added nuclear mode to vote and config file.
-
- Char setup now autoloaded if your savefile exist
-
- Added reset button to char setup.
-
- Fixed move-to-top while dead.
-
- Fixed bug with voting before round begins.
-
- Fixed bug with engine ejection areas.
-
- Started work on power system. Lightswitches added to map. Area icon system updated.
-
- Fixed spawning on top of dense objects.
-
- Later enterers now get ID card access levels corresponding to their job.
-
-Version 40.93.2H7.1D
-
-- Total overhaul of pipework system. Circulators, manifolds, junctions, pipelines added.
-
- Heat exchange pipe added. Pipes now affect and are affected by turf temperature.
-
- Made connected canisters automatically anchored at startup.
-
- Removed redundant heat variable from turfs.
-
- Tweaked pipe-turf heat exchange to avoid thermal runaway.
-
- Added valves and vents to pipework system. Fixed gas loss problem with connectors.
-
- Added Captain specific closet and jumpsuite.
-
-Version 40.93.2H7.0D
-
-- Total overhaul of gas temperature system. Fixed temp. loss problem with scrubbers/vents
-
-Version 40.93.2H6.4D
-
-- Added player voting system for server reboot and game mode
-
- Added config options for voting system
-
- Made mode choice persistent across server reboots
-
- Removed vote delay after server reboot
-
- Tweaked pipework operation slightly
-
- Fixed bug with ID computer
-
- Added reinforced windows, reinf. glass sheets, etc.
-
- Fixed a win condition bug with location of stolen item in traitor mode
-
-Version 40.93.2H6.3D
-
-- Fixed firelarms so they can be sabotaged successfully
-
- "Random" mode added (like secret but actual mode is announced)
-
- Fixed more bugs with DNA-scanner
-
- Fixed cryocell bug with gas transfer
-
- Moved all testing verbs to admin-only
-
- Re-wrote damage icon system to fix standing mob image and skin tone change bugs
-
- Added external config file for logging options
-
- Enabled config of secret/random mode pick probabilities
-
-Version 40.93.2H6.2D
-
-- Fixed bug with floor tile stacking/use.
-
- Say/OOC now strips control characters.
-
- Fixed call error in rwall disassembly.
-
- Fixed pulling after item anchoring.
-
- Adjusted pipe/connector logic to enable pipework.
-
- Fixed background bug with certain procs.
-
- Fixed Engineer security levels in job info text.
-
-Version 40.93.2H6.1D
-
- Airflow system changed to use cached FindTurfs (2x faster).
-
- Cell, Flow and Clear test verbs added to check airflow changes.
-
- Added Vars verb for object state checking.
-
- Current XYZ added to statpanel (for testing).
-
- Fixed score report in blob mode.
-
- Start_now added to admin commands.
-
- Partially fixed bug with standing mob image after death.
-
- Default movement speed is now run.
-
-Version 40.93.2H6
-
-- Timer interface auto-closes on drop.
-
- Fixed welding doors with non-active welder.
-
- Fixed self-deletion bug with bombs.
-
- Added new Blob gameplay mode.
-
- Fixed shuttle & eject positioning logic for non-default maps.
-
- Mass drivers with same ID now all fire together.
-
- Server logging of logon, logoff & OOC added.
-
-Version 40.93.2H5
-
-- Added move-to-top verb to sort item stacks.
-
- Gasmask, firealarm, and eject alarm overlays changed to alpha-blend textures.
-
- Doors allow empty-handed click to open (if wearing correct ID).
-
- Dedicated remote door controller added for poddoors.
-
- Poddoor icon changed.
-
- Alarm icon changed. Now reports air stats on examine.
-
- Timer/Igniter & Timer/Igniter/Plasmatank assemblies added.
-
- Bombs act as firebombs if plasma tank hole isn't bored.
-
- Fixed airflow bug with interior doors.
-
- Security computers now have minimap of station.
-
- Arm verb added to proximity detectors/assemblies.
-
- Proximity detectors fire if they bump.
-
- Timer and Motion assemblies state icons added.
-
- Meteors can now explode (sometimes).
-
"}
+
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"