PDAs now show rank. To update your rank, just click on the PDA with your ID card. Note, the name needs to be the same as the one the PDA started with.

Spare PDAs readded to map.

Bugfix for shotguns. Once again, by Barhandar.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@633 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
crazyclonetheninja
2010-12-16 01:13:43 +00:00
parent da12856ecb
commit b0e5a3208b
3 changed files with 87 additions and 34 deletions
+23 -6
View File
@@ -10,6 +10,7 @@
flags = FPRINT | TABLEPASS | ONBELT
var/owner = null
var/rank = null
var/default_cartridge = 0 // Access level defined by cartridge
var/obj/item/weapon/cartridge/cartridge = null //current cartridge
var/mode = 0 //0-10, Main menu, Crew manifest, Engine monitor, Atmos scanner, med records, notes, sec records, messenger, mop locator, signaler, status display.
@@ -1422,12 +1423,28 @@ Code:
src.cartridge = C
src.updateUsrDialog()
else if (istype(C, /obj/item/weapon/card/id) && !src.owner && C:registered)
src.owner = C:registered
src.ownjob = C:assignment
src.name = "PDA-[src.owner]"
user << "\blue Card scanned."
src.updateUsrDialog()
else if (istype(C, /obj/item/weapon/card/id) && C:registered)
if(!src.owner)
src.owner = C:registered
src.rank = C:assignment
src.name = "PDA-[src.owner]([src.rank])"
user << "\blue Card scanned."
src.updateSelfDialog()
return
if(!(src.owner == C:registered))
user << "\blue Name on card does not match registered name. Please try again."
src.updateSelfDialog()
return
if((src.owner == C:registered) && (src.rank == C:assignment))
user << "\blue Rank is up to date."
src.updateSelfDialog()
return
if((src.owner == C:registered) && (src.rank != C:assignment))
src.rank = C:assignment
src.name = "PDA-[src.owner]([src.rank])"
user << "\blue Rank updated."
src.updateSelfDialog()
return
/obj/item/device/pda/attack(mob/C as mob, mob/user as mob)
+63 -27
View File
@@ -367,34 +367,70 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
spawn( 0 )
return
//following code definitely can be made in a more efficient way, I just don't know it -- Barhandar
else if (shellsunlimited == 1)
var/obj/bullet/A = new /obj/bullet/weakbullet( user.loc )
src.pumped = 0
A.current = U
A.yo = U.y - T.y
A.xo = U.x - T.x
user.next_move = world.time + 4
spawn( 0 )
A.process()
if (!istype(U, /turf))
del(A)
switch(shellsunlimited)
if (1)
var/obj/bullet/A = new /obj/bullet/weakbullet( user.loc )
src.pumped = 0
A.current = U
A.yo = U.y - T.y
A.xo = U.x - T.x
user.next_move = world.time + 4
spawn( 0 )
A.process()
if (!istype(U, /turf))
del(A)
return
if (2)
var/obj/bullet/A = new /obj/bullet( user.loc )
src.pumped = 0
A.current = U
A.yo = U.y - T.y
A.xo = U.x - T.x
user.next_move = world.time + 4
spawn( 0 )
A.process()
if (!istype(U, /turf))
del(A)
return
if (3) //I don't know why the fuck you'll need unlimited blank shells. Just to be sure. -- Barhandar
src.pumped = 0
spawn( 0 )
return
else if (shellsunlimited == 2)
var/obj/bullet/A = new /obj/bullet( user.loc )
src.pumped = 0
A.current = U
A.yo = U.y - T.y
A.xo = U.x - T.x
user.next_move = world.time + 4
spawn( 0 )
A.process()
if (!istype(U, /turf))
del(A)
return
else if (shellsunlimited == 3) //I don't know why the fuck you'll need unlimited blank shells. Just to be sure. -- Barhandar
src.pumped = 0
spawn( 0 )
return
else switch(src.shells[index])
if (1)
var/obj/bullet/A = new /obj/bullet/weakbullet( user.loc )
src.pumped = 0
src.shells[index] = 0
index--
A.current = U
A.yo = U.y - T.y
A.xo = U.x - T.x
user.next_move = world.time + 4
spawn( 0 )
A.process()
if (!istype(U, /turf))
del(A)
return
if (2)
var/obj/bullet/A = new /obj/bullet( user.loc )
src.pumped = 0
src.shells[index] = 0
index--
A.current = U
A.yo = U.y - T.y
A.xo = U.x - T.x
user.next_move = world.time + 4
spawn( 0 )
A.process()
if (!istype(U, /turf))
del(A)
return
if (3)
src.pumped = 0
src.shells[index] = 0
index--
spawn( 0 )
return