mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 02:16:05 +00:00
More bugfixes!
-Fixes an issue with protolathes being able to be loaded forever -Adds 3 pairs of Mesons to the EngiVend to compensate for all the missing engineering lockers -Changed the spawn order for lasertag closets (So you can actually click the different items) -Makes lasertag turrets and ED-209's much more efficient, prevents them from shooting at downed people, they don't target 'criminals', they cannot be used by the opposing team, most options are auto-magically set on creation and the buttons to change them are disabled (Everything but the on/off and the patrol for ED's, for now), and when emagged, they fire 'omnitag' bolts (Stuns everyone with a vest) -Gave blue lasertag bolts their own sprite to match the style of the red tags -Nerfed the amount of radiation from the radium and uranium reagents git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3866 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -262,8 +262,8 @@
|
|||||||
icon_state = "engivend"
|
icon_state = "engivend"
|
||||||
icon_deny = "engivend-deny"
|
icon_deny = "engivend-deny"
|
||||||
req_access_txt = "10" //Engineering access
|
req_access_txt = "10" //Engineering access
|
||||||
product_paths = "/obj/item/weapon/cable_coil/random;/obj/item/weapon/crowbar;/obj/item/weapon/weldingtool;/obj/item/weapon/wirecutters;/obj/item/weapon/wrench;/obj/item/device/t_scanner;/obj/item/device/multitool;/obj/item/weapon/airlock_electronics;/obj/item/weapon/module/power_control"
|
product_paths = "/obj/item/weapon/cable_coil/random;/obj/item/clothing/glasses/meson;/obj/item/weapon/crowbar;/obj/item/weapon/weldingtool;/obj/item/weapon/wirecutters;/obj/item/weapon/wrench;/obj/item/device/t_scanner;/obj/item/device/multitool;/obj/item/weapon/airlock_electronics;/obj/item/weapon/module/power_control"
|
||||||
product_amounts = "5;5;3;5;5;5;2;3;3"
|
product_amounts = "5;3;5;3;5;5;5;2;3;3"
|
||||||
product_hidden = "/obj/item/weapon/weldingtool/hugetank;/obj/item/clothing/gloves/fyellow"
|
product_hidden = "/obj/item/weapon/weldingtool/hugetank;/obj/item/clothing/gloves/fyellow"
|
||||||
product_hideamt = "2;2"
|
product_hideamt = "2;2"
|
||||||
product_coin = "/obj/item/weapon/storage/belt/utility"
|
product_coin = "/obj/item/weapon/storage/belt/utility"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/obj/machinery/bot/ed209
|
/obj/machinery/bot/ed209
|
||||||
name = "ED-209"
|
name = "ED-209 Security Robot"
|
||||||
desc = "A security robot. He looks less than thrilled."
|
desc = "A security robot. He looks less than thrilled."
|
||||||
icon = 'aibots.dmi'
|
icon = 'aibots.dmi'
|
||||||
icon_state = "ed2090"
|
icon_state = "ed2090"
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
var/lastfired = 0
|
var/lastfired = 0
|
||||||
var/shot_delay = 3 //.3 seconds between shots
|
var/shot_delay = 3 //.3 seconds between shots
|
||||||
var/lasercolor = ""
|
var/lasercolor = ""
|
||||||
var/disabled = 0
|
var/disabled = 0//A holder for if it needs to be disabled, if true it will not seach for targets, shoot at targets, or move, currently only used for lasertag
|
||||||
|
|
||||||
//var/lasers = 0
|
//var/lasers = 0
|
||||||
|
|
||||||
@@ -31,6 +31,7 @@
|
|||||||
var/idcheck = 1 //If false, all station IDs are authorized for weapons.
|
var/idcheck = 1 //If false, all station IDs are authorized for weapons.
|
||||||
var/check_records = 1 //Does it check security records?
|
var/check_records = 1 //Does it check security records?
|
||||||
var/arrest_type = 0 //If true, don't handcuff
|
var/arrest_type = 0 //If true, don't handcuff
|
||||||
|
var/projectile = null//Holder for projectile type, to avoid so many else if chains
|
||||||
|
|
||||||
var/mode = 0
|
var/mode = 0
|
||||||
#define SECBOT_IDLE 0 // idle
|
#define SECBOT_IDLE 0 // idle
|
||||||
@@ -86,11 +87,14 @@
|
|||||||
radio_controller.add_object(src, control_freq, filter = RADIO_SECBOT)
|
radio_controller.add_object(src, control_freq, filter = RADIO_SECBOT)
|
||||||
radio_controller.add_object(src, beacon_freq, filter = RADIO_NAVBEACONS)
|
radio_controller.add_object(src, beacon_freq, filter = RADIO_NAVBEACONS)
|
||||||
if(lasercolor)
|
if(lasercolor)
|
||||||
|
shot_delay = 6//Longer shot delay because JESUS CHRIST
|
||||||
|
check_records = 0//Don't actively target people set to arrest
|
||||||
|
arrest_type = 1//Don't even try to cuff
|
||||||
req_access = list(access_maint_tunnels,access_clown,access_mime)
|
req_access = list(access_maint_tunnels,access_clown,access_mime)
|
||||||
arrest_type = 1
|
arrest_type = 1
|
||||||
if(lasercolor == "b")
|
if((lasercolor == "b") && (name == "ED-209 Security Robot"))//Picks a name if there isn't already a custome one
|
||||||
name = pick("BLUE BALLER","SANIC","BLUE KILLDEATH MURDERBOT")
|
name = pick("BLUE BALLER","SANIC","BLUE KILLDEATH MURDERBOT")
|
||||||
if(lasercolor == "r")
|
if((lasercolor == "r") && (name == "ED-209 Security Robot"))
|
||||||
name = pick("RED RAMPAGE","RED ROVER","RED KILLDEATH MURDERBOT")
|
name = pick("RED RAMPAGE","RED ROVER","RED KILLDEATH MURDERBOT")
|
||||||
|
|
||||||
/obj/machinery/bot/ed209/turn_on()
|
/obj/machinery/bot/ed209/turn_on()
|
||||||
@@ -123,7 +127,8 @@ Behaviour controls are [src.locked ? "locked" : "unlocked"]"},
|
|||||||
"<A href='?src=\ref[src];power=1'>[src.on ? "On" : "Off"]</A>" )
|
"<A href='?src=\ref[src];power=1'>[src.on ? "On" : "Off"]</A>" )
|
||||||
|
|
||||||
if(!src.locked)
|
if(!src.locked)
|
||||||
dat += text({"<BR>
|
if(!lasercolor)
|
||||||
|
dat += text({"<BR>
|
||||||
Check for Weapon Authorization: []<BR>
|
Check for Weapon Authorization: []<BR>
|
||||||
Check Security Records: []<BR>
|
Check Security Records: []<BR>
|
||||||
Operating Mode: []<BR>
|
Operating Mode: []<BR>
|
||||||
@@ -132,6 +137,11 @@ Auto Patrol: []"},
|
|||||||
"<A href='?src=\ref[src];operation=idcheck'>[src.idcheck ? "Yes" : "No"]</A>",
|
"<A href='?src=\ref[src];operation=idcheck'>[src.idcheck ? "Yes" : "No"]</A>",
|
||||||
"<A href='?src=\ref[src];operation=ignorerec'>[src.check_records ? "Yes" : "No"]</A>",
|
"<A href='?src=\ref[src];operation=ignorerec'>[src.check_records ? "Yes" : "No"]</A>",
|
||||||
"<A href='?src=\ref[src];operation=switchmode'>[src.arrest_type ? "Detain" : "Arrest"]</A>",
|
"<A href='?src=\ref[src];operation=switchmode'>[src.arrest_type ? "Detain" : "Arrest"]</A>",
|
||||||
|
"<A href='?src=\ref[src];operation=patrol'>[auto_patrol ? "On" : "Off"]</A>" )
|
||||||
|
else
|
||||||
|
dat += text({"<BR>
|
||||||
|
Auto Patrol: []"},
|
||||||
|
|
||||||
"<A href='?src=\ref[src];operation=patrol'>[auto_patrol ? "On" : "Off"]</A>" )
|
"<A href='?src=\ref[src];operation=patrol'>[auto_patrol ? "On" : "Off"]</A>" )
|
||||||
|
|
||||||
|
|
||||||
@@ -144,6 +154,12 @@ Auto Patrol: []"},
|
|||||||
return
|
return
|
||||||
usr.machine = src
|
usr.machine = src
|
||||||
src.add_fingerprint(usr)
|
src.add_fingerprint(usr)
|
||||||
|
if(lasercolor && (istype(usr,/mob/living/carbon/human)))
|
||||||
|
var/mob/living/carbon/human/H = usr
|
||||||
|
if((lasercolor == "b") && (istype(H.wear_suit, /obj/item/clothing/suit/redtag)))//Opposing team cannot operate it
|
||||||
|
return
|
||||||
|
else if((lasercolor == "r") && (istype(H.wear_suit, /obj/item/clothing/suit/bluetag)))
|
||||||
|
return
|
||||||
if ((href_list["power"]) && (src.allowed(usr)))
|
if ((href_list["power"]) && (src.allowed(usr)))
|
||||||
if (src.on)
|
if (src.on)
|
||||||
turn_off()
|
turn_off()
|
||||||
@@ -177,6 +193,8 @@ Auto Patrol: []"},
|
|||||||
..()
|
..()
|
||||||
if (!istype(W, /obj/item/weapon/screwdriver) && (W.force) && (!src.target))
|
if (!istype(W, /obj/item/weapon/screwdriver) && (W.force) && (!src.target))
|
||||||
src.target = user
|
src.target = user
|
||||||
|
if(lasercolor)//To make up for the fact that lasertag bots don't hunt
|
||||||
|
src.shootAt(user)
|
||||||
src.mode = SECBOT_HUNT
|
src.mode = SECBOT_HUNT
|
||||||
|
|
||||||
/obj/machinery/bot/ed209/Emag(mob/user as mob)
|
/obj/machinery/bot/ed209/Emag(mob/user as mob)
|
||||||
@@ -192,6 +210,7 @@ Auto Patrol: []"},
|
|||||||
src.emagged = 1
|
src.emagged = 1
|
||||||
src.on = 1
|
src.on = 1
|
||||||
src.icon_state = "[lasercolor]ed209[src.on]"
|
src.icon_state = "[lasercolor]ed209[src.on]"
|
||||||
|
src.projectile = null
|
||||||
mode = SECBOT_IDLE
|
mode = SECBOT_IDLE
|
||||||
|
|
||||||
/obj/machinery/bot/ed209/process()
|
/obj/machinery/bot/ed209/process()
|
||||||
@@ -233,6 +252,7 @@ Auto Patrol: []"},
|
|||||||
|
|
||||||
if(SECBOT_HUNT) // hunting for perp
|
if(SECBOT_HUNT) // hunting for perp
|
||||||
if(src.lasercolor)//Lasertag bots do not tase or arrest anyone, just patrol and shoot and whatnot
|
if(src.lasercolor)//Lasertag bots do not tase or arrest anyone, just patrol and shoot and whatnot
|
||||||
|
mode = SECBOT_IDLE
|
||||||
return
|
return
|
||||||
// if can't reach perp for long enough, go idle
|
// if can't reach perp for long enough, go idle
|
||||||
if (src.frustration >= 8)
|
if (src.frustration >= 8)
|
||||||
@@ -282,6 +302,7 @@ Auto Patrol: []"},
|
|||||||
|
|
||||||
if(SECBOT_PREP_ARREST) // preparing to arrest target
|
if(SECBOT_PREP_ARREST) // preparing to arrest target
|
||||||
if(src.lasercolor)
|
if(src.lasercolor)
|
||||||
|
mode = SECBOT_IDLE
|
||||||
return
|
return
|
||||||
if (!target)
|
if (!target)
|
||||||
mode = SECBOT_IDLE
|
mode = SECBOT_IDLE
|
||||||
@@ -319,6 +340,7 @@ Auto Patrol: []"},
|
|||||||
|
|
||||||
if(SECBOT_ARREST) // arresting
|
if(SECBOT_ARREST) // arresting
|
||||||
if(src.lasercolor)
|
if(src.lasercolor)
|
||||||
|
mode = SECBOT_IDLE
|
||||||
return
|
return
|
||||||
if (!target || src.target.handcuffed)
|
if (!target || src.target.handcuffed)
|
||||||
src.anchored = 0
|
src.anchored = 0
|
||||||
@@ -387,6 +409,8 @@ Auto Patrol: []"},
|
|||||||
path -= loc
|
path -= loc
|
||||||
|
|
||||||
look_for_perp()
|
look_for_perp()
|
||||||
|
if(lasercolor)
|
||||||
|
sleep(20)
|
||||||
else // failed to move
|
else // failed to move
|
||||||
|
|
||||||
blockcount++
|
blockcount++
|
||||||
@@ -585,12 +609,17 @@ Auto Patrol: []"},
|
|||||||
// look for a criminal in view of the bot
|
// look for a criminal in view of the bot
|
||||||
|
|
||||||
/obj/machinery/bot/ed209/proc/look_for_perp()
|
/obj/machinery/bot/ed209/proc/look_for_perp()
|
||||||
|
if(src.disabled)
|
||||||
|
return
|
||||||
src.anchored = 0
|
src.anchored = 0
|
||||||
src.threatlevel = 0
|
src.threatlevel = 0
|
||||||
for (var/mob/living/carbon/C in view(12,src)) //Let's find us a criminal
|
for (var/mob/living/carbon/C in view(12,src)) //Let's find us a criminal
|
||||||
if ((C.stat) || (C.handcuffed))
|
if ((C.stat) || (C.handcuffed))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if((src.lasercolor) && (C.lying))
|
||||||
|
continue//Does not shoot at people lyind down when in lasertag mode, because it's just annoying, and they can fire once they get up.
|
||||||
|
|
||||||
if ((C.name == src.oldtarget_name) && (world.time < src.last_found + 100))
|
if ((C.name == src.oldtarget_name) && (world.time < src.last_found + 100))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@@ -606,7 +635,8 @@ Auto Patrol: []"},
|
|||||||
src.target = C
|
src.target = C
|
||||||
src.oldtarget_name = C.name
|
src.oldtarget_name = C.name
|
||||||
src.speak("Level [src.threatlevel] infraction alert!")
|
src.speak("Level [src.threatlevel] infraction alert!")
|
||||||
playsound(src.loc, pick('ed209_20sec.ogg', 'EDPlaceholder.ogg'), 50, 0)
|
if(!src.lasercolor)
|
||||||
|
playsound(src.loc, pick('ed209_20sec.ogg', 'EDPlaceholder.ogg'), 50, 0)
|
||||||
src.visible_message("<b>[src]</b> points at [C.name]!")
|
src.visible_message("<b>[src]</b> points at [C.name]!")
|
||||||
mode = SECBOT_HUNT
|
mode = SECBOT_HUNT
|
||||||
spawn(0)
|
spawn(0)
|
||||||
@@ -624,8 +654,6 @@ Auto Patrol: []"},
|
|||||||
if(src.emagged) return 10 //Everyone is a criminal!
|
if(src.emagged) return 10 //Everyone is a criminal!
|
||||||
|
|
||||||
if((src.idcheck) || (isnull(perp:wear_id)) || (istype(perp:wear_id, /obj/item/weapon/card/id/syndicate)))
|
if((src.idcheck) || (isnull(perp:wear_id)) || (istype(perp:wear_id, /obj/item/weapon/card/id/syndicate)))
|
||||||
if(src.allowed(perp)) //Corrupt cops cannot exist beep boop
|
|
||||||
return 0
|
|
||||||
|
|
||||||
if((istype(perp.l_hand, /obj/item/weapon/gun) && !istype(perp.l_hand, /obj/item/weapon/gun/projectile/shotgun)) || istype(perp.l_hand, /obj/item/weapon/melee/baton))
|
if((istype(perp.l_hand, /obj/item/weapon/gun) && !istype(perp.l_hand, /obj/item/weapon/gun/projectile/shotgun)) || istype(perp.l_hand, /obj/item/weapon/melee/baton))
|
||||||
if(!istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/bluetag) \
|
if(!istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/bluetag) \
|
||||||
@@ -656,6 +684,7 @@ Auto Patrol: []"},
|
|||||||
threatcount -= 2
|
threatcount -= 2
|
||||||
|
|
||||||
if(src.lasercolor == "b")//Lasertag turrets target the opposing team, how great is that? -Sieve
|
if(src.lasercolor == "b")//Lasertag turrets target the opposing team, how great is that? -Sieve
|
||||||
|
threatcount = 0//They will not, however shoot at people who have guns, because it gets really fucking annoying
|
||||||
if(istype(perp.wear_suit, /obj/item/clothing/suit/redtag))
|
if(istype(perp.wear_suit, /obj/item/clothing/suit/redtag))
|
||||||
threatcount += 4
|
threatcount += 4
|
||||||
if((istype(perp:r_hand,/obj/item/weapon/gun/energy/laser/redtag)) || (istype(perp:l_hand,/obj/item/weapon/gun/energy/laser/redtag)))
|
if((istype(perp:r_hand,/obj/item/weapon/gun/energy/laser/redtag)) || (istype(perp:l_hand,/obj/item/weapon/gun/energy/laser/redtag)))
|
||||||
@@ -664,6 +693,7 @@ Auto Patrol: []"},
|
|||||||
threatcount += 2
|
threatcount += 2
|
||||||
|
|
||||||
if(src.lasercolor == "r")
|
if(src.lasercolor == "r")
|
||||||
|
threatcount = 0
|
||||||
if(istype(perp.wear_suit, /obj/item/clothing/suit/bluetag))
|
if(istype(perp.wear_suit, /obj/item/clothing/suit/bluetag))
|
||||||
threatcount += 4
|
threatcount += 4
|
||||||
if((istype(perp:r_hand,/obj/item/weapon/gun/energy/laser/bluetag)) || (istype(perp:l_hand,/obj/item/weapon/gun/energy/laser/bluetag)))
|
if((istype(perp:r_hand,/obj/item/weapon/gun/energy/laser/bluetag)) || (istype(perp:l_hand,/obj/item/weapon/gun/energy/laser/bluetag)))
|
||||||
@@ -690,6 +720,9 @@ Auto Patrol: []"},
|
|||||||
threatcount = 4
|
threatcount = 4
|
||||||
break
|
break
|
||||||
|
|
||||||
|
if((src.idcheck) && (src.allowed(perp)) && !(src.lasercolor))
|
||||||
|
threatcount = 0//Corrupt cops cannot exist beep boop
|
||||||
|
|
||||||
return threatcount
|
return threatcount
|
||||||
|
|
||||||
/obj/machinery/bot/ed209/Bump(M as mob|obj) //Leave no door unopened!
|
/obj/machinery/bot/ed209/Bump(M as mob|obj) //Leave no door unopened!
|
||||||
@@ -739,7 +772,19 @@ Auto Patrol: []"},
|
|||||||
G.power_supply.charge = 0
|
G.power_supply.charge = 0
|
||||||
|
|
||||||
if (prob(50))
|
if (prob(50))
|
||||||
new /obj/item/robot_parts/l_arm(Tsec)
|
new /obj/item/robot_parts/l_leg(Tsec)
|
||||||
|
if (prob(25))
|
||||||
|
new /obj/item/robot_parts/r_leg(Tsec)
|
||||||
|
if (prob(25))//50% chance for a helmet OR vest
|
||||||
|
if (prob(50))
|
||||||
|
new /obj/item/clothing/head/helmet(Tsec)
|
||||||
|
else
|
||||||
|
if(!lasercolor)
|
||||||
|
new /obj/item/clothing/suit/armor/vest(Tsec)
|
||||||
|
if(lasercolor == "b")
|
||||||
|
new /obj/item/clothing/suit/bluetag(Tsec)
|
||||||
|
if(lasercolor == "r")
|
||||||
|
new /obj/item/clothing/suit/redtag(Tsec)
|
||||||
|
|
||||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||||
s.set_up(3, 1, src)
|
s.set_up(3, 1, src)
|
||||||
@@ -765,27 +810,26 @@ Auto Patrol: []"},
|
|||||||
//if(lastfired && world.time - lastfired < 100)
|
//if(lastfired && world.time - lastfired < 100)
|
||||||
// playsound(src.loc, 'ed209_shoot.ogg', 50, 0)
|
// playsound(src.loc, 'ed209_shoot.ogg', 50, 0)
|
||||||
|
|
||||||
var/obj/item/projectile/A
|
if(!projectile)
|
||||||
if(!lasercolor)
|
if(!lasercolor)
|
||||||
if (src.emagged)
|
if (src.emagged)
|
||||||
A = new /obj/item/projectile/beam( loc )
|
projectile = /obj/item/projectile/beam
|
||||||
else
|
else
|
||||||
A = new /obj/item/projectile/energy/electrode( loc )
|
projectile = /obj/item/projectile/energy/electrode
|
||||||
else if(lasercolor == "b")
|
else if(lasercolor == "b")
|
||||||
if (src.emagged)
|
if (src.emagged)
|
||||||
A = new /obj/item/projectile/energy/electrode( loc )
|
projectile = /obj/item/projectile/omnitag
|
||||||
else
|
else
|
||||||
A = new /obj/item/projectile/bluetag( loc )
|
projectile = /obj/item/projectile/bluetag
|
||||||
else if(lasercolor == "r")
|
else if(lasercolor == "r")
|
||||||
if (src.emagged)
|
if (src.emagged)
|
||||||
A = new /obj/item/projectile/energy/electrode( loc )
|
projectile = /obj/item/projectile/omnitag
|
||||||
else
|
else
|
||||||
A = new /obj/item/projectile/redtag( loc )
|
projectile = /obj/item/projectile/redtag
|
||||||
|
|
||||||
if (!( istype(U, /turf) ))
|
if (!( istype(U, /turf) ))
|
||||||
//A = null
|
|
||||||
del(A)
|
|
||||||
return
|
return
|
||||||
|
var/obj/item/projectile/A = new projectile (loc)
|
||||||
A.current = U
|
A.current = U
|
||||||
A.yo = U.y - T.y
|
A.yo = U.y - T.y
|
||||||
A.xo = U.x - T.x
|
A.xo = U.x - T.x
|
||||||
@@ -963,11 +1007,33 @@ Auto Patrol: []"},
|
|||||||
if((src.lasercolor == "b") && (src.disabled == 0))
|
if((src.lasercolor == "b") && (src.disabled == 0))
|
||||||
if(istype(Proj, /obj/item/projectile/redtag))
|
if(istype(Proj, /obj/item/projectile/redtag))
|
||||||
src.disabled = 1
|
src.disabled = 1
|
||||||
|
del (Proj)
|
||||||
sleep(100)
|
sleep(100)
|
||||||
src.disabled = 0
|
src.disabled = 0
|
||||||
if((src.lasercolor == "r") && (src.disabled == 0))
|
else
|
||||||
|
..()
|
||||||
|
else if((src.lasercolor == "r") && (src.disabled == 0))
|
||||||
if(istype(Proj, /obj/item/projectile/bluetag))
|
if(istype(Proj, /obj/item/projectile/bluetag))
|
||||||
src.disabled = 1
|
src.disabled = 1
|
||||||
|
del (Proj)
|
||||||
sleep(100)
|
sleep(100)
|
||||||
src.disabled = 0
|
src.disabled = 0
|
||||||
..()
|
else
|
||||||
|
..()
|
||||||
|
else
|
||||||
|
..()
|
||||||
|
|
||||||
|
/obj/machinery/bot/ed209/bluetag/New()//If desired, you spawn red and bluetag bots easily
|
||||||
|
var/obj/machinery/bot/ed209/S = new /obj/machinery/bot/ed209
|
||||||
|
S.loc = get_turf(src)
|
||||||
|
S.lasercolor = "b"
|
||||||
|
S.New()
|
||||||
|
del(src)
|
||||||
|
|
||||||
|
|
||||||
|
/obj/machinery/bot/ed209/redtag/New()
|
||||||
|
var/obj/machinery/bot/ed209/S = new /obj/machinery/bot/ed209
|
||||||
|
S.loc = get_turf(src)
|
||||||
|
S.lasercolor = "r"
|
||||||
|
S.New()
|
||||||
|
del(src)
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
var/installation // the type of weapon installed
|
var/installation // the type of weapon installed
|
||||||
var/gun_charge = 0 // the charge of the gun inserted
|
var/gun_charge = 0 // the charge of the gun inserted
|
||||||
var/projectile = null //holder for bullettype
|
var/projectile = null //holder for bullettype
|
||||||
|
var/eprojectile = null//holder for the shot when emagged
|
||||||
var/reqpower = 0 //holder for power needed
|
var/reqpower = 0 //holder for power needed
|
||||||
var/sound = null//So the taser can have sound
|
var/sound = null//So the taser can have sound
|
||||||
var/iconholder = null//holder for the icon_state
|
var/iconholder = null//holder for the icon_state
|
||||||
@@ -63,6 +64,112 @@
|
|||||||
spark_system = new /datum/effect/effect/system/spark_spread
|
spark_system = new /datum/effect/effect/system/spark_spread
|
||||||
spark_system.set_up(5, 0, src)
|
spark_system.set_up(5, 0, src)
|
||||||
spark_system.attach(src)
|
spark_system.attach(src)
|
||||||
|
sleep(10)
|
||||||
|
if(!installation)// if for some reason the turret has no gun (ie, admin spawned) it resorts to basic taser shots
|
||||||
|
projectile = /obj/item/projectile/energy/electrode//holder for the projectile, here it is being set
|
||||||
|
eprojectile = /obj/item/projectile/beam//holder for the projectile when emagged, if it is different
|
||||||
|
reqpower = 200
|
||||||
|
sound = 1
|
||||||
|
iconholder = 1
|
||||||
|
else
|
||||||
|
var/obj/item/weapon/gun/energy/E=new installation
|
||||||
|
// All energy-based weapons are applicable
|
||||||
|
switch(E.type)
|
||||||
|
if(/obj/item/weapon/gun/energy/laser/bluetag)
|
||||||
|
projectile = /obj/item/projectile/bluetag
|
||||||
|
eprojectile = /obj/item/projectile/omnitag//This bolt will stun ERRYONE with a vest
|
||||||
|
iconholder = null
|
||||||
|
reqpower = 100
|
||||||
|
lasercolor = "b"
|
||||||
|
req_access = list(access_maint_tunnels,access_clown,access_mime)
|
||||||
|
check_records = 0
|
||||||
|
criminals = 0
|
||||||
|
auth_weapons = 1
|
||||||
|
stun_all = 0
|
||||||
|
check_anomalies = 0
|
||||||
|
shot_delay = 30
|
||||||
|
|
||||||
|
if(/obj/item/weapon/gun/energy/laser/redtag)
|
||||||
|
projectile = /obj/item/projectile/redtag
|
||||||
|
eprojectile = /obj/item/projectile/omnitag
|
||||||
|
iconholder = null
|
||||||
|
reqpower = 100
|
||||||
|
lasercolor = "r"
|
||||||
|
req_access = list(access_maint_tunnels,access_clown,access_mime)
|
||||||
|
check_records = 0
|
||||||
|
criminals = 0
|
||||||
|
auth_weapons = 1
|
||||||
|
stun_all = 0
|
||||||
|
check_anomalies = 0
|
||||||
|
shot_delay = 30
|
||||||
|
|
||||||
|
if(/obj/item/weapon/gun/energy/pulse_rifle)
|
||||||
|
projectile = /obj/item/projectile/beam/pulse
|
||||||
|
eprojectile = projectile
|
||||||
|
iconholder = null
|
||||||
|
reqpower = 700
|
||||||
|
|
||||||
|
if(/obj/item/weapon/gun/energy/staff)
|
||||||
|
projectile = /obj/item/projectile/change
|
||||||
|
eprojectile = projectile
|
||||||
|
iconholder = 1
|
||||||
|
reqpower = 700
|
||||||
|
|
||||||
|
if(/obj/item/weapon/gun/energy/ionrifle)
|
||||||
|
projectile = /obj/item/projectile/ion
|
||||||
|
eprojectile = projectile
|
||||||
|
iconholder = 1
|
||||||
|
reqpower = 700
|
||||||
|
|
||||||
|
if(/obj/item/weapon/gun/energy/taser)
|
||||||
|
projectile = /obj/item/projectile/energy/electrode
|
||||||
|
eprojectile = projectile
|
||||||
|
iconholder = 1
|
||||||
|
reqpower = 200
|
||||||
|
|
||||||
|
if(/obj/item/weapon/gun/energy/stunrevolver)
|
||||||
|
projectile = /obj/item/projectile/energy/electrode
|
||||||
|
eprojectile = projectile
|
||||||
|
iconholder = 1
|
||||||
|
reqpower = 200
|
||||||
|
|
||||||
|
if(/obj/item/weapon/gun/energy/lasercannon)
|
||||||
|
projectile = /obj/item/projectile/beam/heavylaser
|
||||||
|
eprojectile = projectile
|
||||||
|
iconholder = null
|
||||||
|
reqpower = 600
|
||||||
|
|
||||||
|
if(/obj/item/weapon/gun/energy/decloner)
|
||||||
|
projectile = /obj/item/projectile/energy/declone
|
||||||
|
eprojectile = projectile
|
||||||
|
iconholder = null
|
||||||
|
reqpower = 600
|
||||||
|
|
||||||
|
if(/obj/item/weapon/gun/energy/crossbow/largecrossbow)
|
||||||
|
projectile = /obj/item/projectile/energy/bolt/large
|
||||||
|
eprojectile = projectile
|
||||||
|
iconholder = null
|
||||||
|
reqpower = 125
|
||||||
|
|
||||||
|
if(/obj/item/weapon/gun/energy/crossbow)
|
||||||
|
projectile = /obj/item/projectile/energy/bolt
|
||||||
|
eprojectile = projectile
|
||||||
|
iconholder = null
|
||||||
|
reqpower = 50
|
||||||
|
|
||||||
|
if(/obj/item/weapon/gun/energy/laser)
|
||||||
|
projectile = /obj/item/projectile/beam
|
||||||
|
eprojectile = projectile
|
||||||
|
iconholder = null
|
||||||
|
reqpower = 500
|
||||||
|
|
||||||
|
else // Energy gun shots
|
||||||
|
projectile = /obj/item/projectile/energy/electrode// if it hasn't been emagged, it uses normal taser shots
|
||||||
|
eprojectile = /obj/item/projectile/beam//If it has, going to kill mode
|
||||||
|
iconholder = 1
|
||||||
|
egun = 1
|
||||||
|
reqpower = 200
|
||||||
|
|
||||||
Del()
|
Del()
|
||||||
// deletes its own cover with it
|
// deletes its own cover with it
|
||||||
del(cover)
|
del(cover)
|
||||||
@@ -79,15 +186,16 @@
|
|||||||
var/dat
|
var/dat
|
||||||
|
|
||||||
// The browse() text, similar to ED-209s and beepskies.
|
// The browse() text, similar to ED-209s and beepskies.
|
||||||
dat += text({"
|
if(!(src.lasercolor))//Lasertag turrets have less options
|
||||||
|
dat += text({"
|
||||||
<TT><B>Automatic Portable Turret Installation</B></TT><BR><BR>
|
<TT><B>Automatic Portable Turret Installation</B></TT><BR><BR>
|
||||||
Status: []<BR>
|
Status: []<BR>
|
||||||
Behaviour controls are [src.locked ? "locked" : "unlocked"]"},
|
Behaviour controls are [src.locked ? "locked" : "unlocked"]"},
|
||||||
|
|
||||||
"<A href='?src=\ref[src];power=1'>[src.on ? "On" : "Off"]</A>" )
|
"<A href='?src=\ref[src];power=1'>[src.on ? "On" : "Off"]</A>" )
|
||||||
|
|
||||||
if(!src.locked)
|
if(!src.locked)
|
||||||
dat += text({"<BR>
|
dat += text({"<BR>
|
||||||
Check for Weapon Authorization: []<BR>
|
Check for Weapon Authorization: []<BR>
|
||||||
Check Security Records: []<BR>
|
Check Security Records: []<BR>
|
||||||
Neutralize Identified Criminals: []<BR>
|
Neutralize Identified Criminals: []<BR>
|
||||||
@@ -99,6 +207,18 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
|||||||
"<A href='?src=\ref[src];operation=shootcrooks'>[src.criminals ? "Yes" : "No"]</A>",
|
"<A href='?src=\ref[src];operation=shootcrooks'>[src.criminals ? "Yes" : "No"]</A>",
|
||||||
"<A href='?src=\ref[src];operation=shootall'>[stun_all ? "Yes" : "No"]</A>",
|
"<A href='?src=\ref[src];operation=shootall'>[stun_all ? "Yes" : "No"]</A>",
|
||||||
"<A href='?src=\ref[src];operation=checkxenos'>[check_anomalies ? "Yes" : "No"]</A>" )
|
"<A href='?src=\ref[src];operation=checkxenos'>[check_anomalies ? "Yes" : "No"]</A>" )
|
||||||
|
else
|
||||||
|
if(istype(user,/mob/living/carbon/human))
|
||||||
|
var/mob/living/carbon/human/H = user
|
||||||
|
if(((src.lasercolor) == "b") && (istype(H.wear_suit, /obj/item/clothing/suit/redtag)))
|
||||||
|
return
|
||||||
|
if(((src.lasercolor) == "r") && (istype(H.wear_suit, /obj/item/clothing/suit/bluetag)))
|
||||||
|
return
|
||||||
|
dat += text({"
|
||||||
|
<TT><B>Automatic Portable Turret Installation</B></TT><BR><BR>
|
||||||
|
Status: []<BR>"},
|
||||||
|
|
||||||
|
"<A href='?src=\ref[src];power=1'>[src.on ? "On" : "Off"]</A>" )
|
||||||
|
|
||||||
|
|
||||||
user << browse("<HEAD><TITLE>Automatic Portable Turret Installation</TITLE></HEAD>[dat]", "window=autosec")
|
user << browse("<HEAD><TITLE>Automatic Portable Turret Installation</TITLE></HEAD>[dat]", "window=autosec")
|
||||||
@@ -251,11 +371,13 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
|||||||
if((src.lasercolor == "b") && (src.disabled == 0))
|
if((src.lasercolor == "b") && (src.disabled == 0))
|
||||||
if(istype(Proj, /obj/item/projectile/redtag))
|
if(istype(Proj, /obj/item/projectile/redtag))
|
||||||
src.disabled = 1
|
src.disabled = 1
|
||||||
|
del (Proj)
|
||||||
sleep(100)
|
sleep(100)
|
||||||
src.disabled = 0
|
src.disabled = 0
|
||||||
if((src.lasercolor == "r") && (src.disabled == 0))
|
if((src.lasercolor == "r") && (src.disabled == 0))
|
||||||
if(istype(Proj, /obj/item/projectile/bluetag))
|
if(istype(Proj, /obj/item/projectile/bluetag))
|
||||||
src.disabled = 1
|
src.disabled = 1
|
||||||
|
del (Proj)
|
||||||
sleep(100)
|
sleep(100)
|
||||||
src.disabled = 0
|
src.disabled = 0
|
||||||
return
|
return
|
||||||
@@ -286,7 +408,7 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
|||||||
src.health = 0
|
src.health = 0
|
||||||
src.density = 0
|
src.density = 0
|
||||||
src.stat |= BROKEN // enables the BROKEN bit
|
src.stat |= BROKEN // enables the BROKEN bit
|
||||||
src.icon_state = "destroyed_target_prism"
|
src.icon_state = "[lasercolor]destroyed_target_prism"
|
||||||
invisibility=0
|
invisibility=0
|
||||||
src.spark_system.start() // creates some sparks because they look cool
|
src.spark_system.start() // creates some sparks because they look cool
|
||||||
src.density=1
|
src.density=1
|
||||||
@@ -396,6 +518,8 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
|||||||
|
|
||||||
/obj/machinery/porta_turret/proc
|
/obj/machinery/porta_turret/proc
|
||||||
popUp() // pops the turret up
|
popUp() // pops the turret up
|
||||||
|
if(disabled)
|
||||||
|
return
|
||||||
if(raising || raised) return
|
if(raising || raised) return
|
||||||
if(stat & BROKEN) return
|
if(stat & BROKEN) return
|
||||||
invisibility=0
|
invisibility=0
|
||||||
@@ -409,6 +533,8 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
|||||||
layer=4
|
layer=4
|
||||||
|
|
||||||
popDown() // pops the turret down
|
popDown() // pops the turret down
|
||||||
|
if(disabled)
|
||||||
|
return
|
||||||
if(raising || !raised) return
|
if(raising || !raised) return
|
||||||
if(stat & BROKEN) return
|
if(stat & BROKEN) return
|
||||||
layer=3
|
layer=3
|
||||||
@@ -435,7 +561,7 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
|||||||
if(auth_weapons) // check for weapon authorization
|
if(auth_weapons) // check for weapon authorization
|
||||||
if((isnull(perp:wear_id)) || (istype(perp:wear_id, /obj/item/weapon/card/id/syndicate)))
|
if((isnull(perp:wear_id)) || (istype(perp:wear_id, /obj/item/weapon/card/id/syndicate)))
|
||||||
|
|
||||||
if((src.allowed(perp)) && (!lasercolor)) // if the perp has security access, return 0
|
if((src.allowed(perp)) && !(src.lasercolor)) // if the perp has security access, return 0
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
if((istype(perp.l_hand, /obj/item/weapon/gun) && !istype(perp.l_hand, /obj/item/weapon/gun/projectile/shotgun)) || istype(perp.l_hand, /obj/item/weapon/melee/baton))
|
if((istype(perp.l_hand, /obj/item/weapon/gun) && !istype(perp.l_hand, /obj/item/weapon/gun/projectile/shotgun)) || istype(perp.l_hand, /obj/item/weapon/melee/baton))
|
||||||
@@ -447,7 +573,8 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
|||||||
if(istype(perp:belt, /obj/item/weapon/gun) || istype(perp:belt, /obj/item/weapon/melee/baton))
|
if(istype(perp:belt, /obj/item/weapon/gun) || istype(perp:belt, /obj/item/weapon/melee/baton))
|
||||||
threatcount += 2
|
threatcount += 2
|
||||||
|
|
||||||
if(src.lasercolor == "b")//Lasertag turrets target the opposing team, how great is that? -Sieve
|
if((src.lasercolor) == "b")//Lasertag turrets target the opposing team, how great is that? -Sieve
|
||||||
|
threatcount = 0//But does not target anyone else
|
||||||
if(istype(perp.wear_suit, /obj/item/clothing/suit/redtag))
|
if(istype(perp.wear_suit, /obj/item/clothing/suit/redtag))
|
||||||
threatcount += 4
|
threatcount += 4
|
||||||
if((istype(perp:r_hand,/obj/item/weapon/gun/energy/laser/redtag)) || (istype(perp:l_hand,/obj/item/weapon/gun/energy/laser/redtag)))
|
if((istype(perp:r_hand,/obj/item/weapon/gun/energy/laser/redtag)) || (istype(perp:l_hand,/obj/item/weapon/gun/energy/laser/redtag)))
|
||||||
@@ -455,7 +582,8 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
|||||||
if(istype(perp:belt, /obj/item/weapon/gun/energy/laser/redtag))
|
if(istype(perp:belt, /obj/item/weapon/gun/energy/laser/redtag))
|
||||||
threatcount += 2
|
threatcount += 2
|
||||||
|
|
||||||
if(src.lasercolor == "r")
|
if((src.lasercolor) == "r")
|
||||||
|
threatcount = 0
|
||||||
if(istype(perp.wear_suit, /obj/item/clothing/suit/bluetag))
|
if(istype(perp.wear_suit, /obj/item/clothing/suit/bluetag))
|
||||||
threatcount += 4
|
threatcount += 4
|
||||||
if((istype(perp:r_hand,/obj/item/weapon/gun/energy/laser/bluetag)) || (istype(perp:l_hand,/obj/item/weapon/gun/energy/laser/bluetag)))
|
if((istype(perp:r_hand,/obj/item/weapon/gun/energy/laser/bluetag)) || (istype(perp:l_hand,/obj/item/weapon/gun/energy/laser/bluetag)))
|
||||||
@@ -483,6 +611,7 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
|||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return threatcount
|
return threatcount
|
||||||
|
|
||||||
|
|
||||||
@@ -490,6 +619,13 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
|||||||
|
|
||||||
|
|
||||||
/obj/machinery/porta_turret/proc/shootAt(var/atom/movable/target) // shoots at a target
|
/obj/machinery/porta_turret/proc/shootAt(var/atom/movable/target) // shoots at a target
|
||||||
|
if(disabled)
|
||||||
|
return
|
||||||
|
|
||||||
|
if(lasercolor && (istype(target,/mob/living/carbon/human)))
|
||||||
|
var/mob/living/carbon/human/H = target
|
||||||
|
if(H.lying)
|
||||||
|
return
|
||||||
|
|
||||||
if(!emagged) // if it hasn't been emagged, it has to obey a cooldown rate
|
if(!emagged) // if it hasn't been emagged, it has to obey a cooldown rate
|
||||||
if(last_fired || !raised) return // prevents rapid-fire shooting, unless it's been emagged
|
if(last_fired || !raised) return // prevents rapid-fire shooting, unless it's been emagged
|
||||||
@@ -509,110 +645,23 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
|||||||
|
|
||||||
// any emagged turrets will shoot extremely fast! This not only is deadly, but drains a lot power!
|
// any emagged turrets will shoot extremely fast! This not only is deadly, but drains a lot power!
|
||||||
|
|
||||||
|
|
||||||
if(!projectile)
|
|
||||||
lasercolor = ""
|
|
||||||
req_access = list(access_security)
|
|
||||||
if(!installation)// if for some reason the turret has no gun (ie, admin spawned) it resorts to basic taser shots
|
|
||||||
projectile = /obj/item/projectile/energy/electrode
|
|
||||||
reqpower = 200
|
|
||||||
sound = 1
|
|
||||||
iconholder = 1
|
|
||||||
else
|
|
||||||
var/obj/item/weapon/gun/energy/E=new installation
|
|
||||||
// All energy-based weapons are applicable
|
|
||||||
if(istype(E, /obj/item/weapon/gun/energy/laser/bluetag))
|
|
||||||
projectile = /obj/item/projectile/bluetag
|
|
||||||
iconholder = null
|
|
||||||
reqpower = 100
|
|
||||||
lasercolor = "b"
|
|
||||||
req_access = list(access_maint_tunnels,access_clown,access_mime)
|
|
||||||
|
|
||||||
else if(istype(E, /obj/item/weapon/gun/energy/laser/redtag))
|
|
||||||
projectile = /obj/item/projectile/redtag
|
|
||||||
iconholder = null
|
|
||||||
reqpower = 100
|
|
||||||
lasercolor = "r"
|
|
||||||
req_access = list(access_maint_tunnels,access_clown,access_mime)
|
|
||||||
|
|
||||||
else if(istype(E, /obj/item/weapon/gun/energy/pulse_rifle))
|
|
||||||
projectile = /obj/item/projectile/beam/pulse
|
|
||||||
iconholder = null
|
|
||||||
reqpower = 700
|
|
||||||
|
|
||||||
else if(istype(E, /obj/item/weapon/gun/energy/staff))
|
|
||||||
projectile = /obj/item/projectile/change
|
|
||||||
iconholder = 1
|
|
||||||
reqpower = 700
|
|
||||||
|
|
||||||
else if(istype(E, /obj/item/weapon/gun/energy/ionrifle))
|
|
||||||
projectile = /obj/item/projectile/ion
|
|
||||||
iconholder = 1
|
|
||||||
reqpower = 700
|
|
||||||
|
|
||||||
else if(istype(E, /obj/item/weapon/gun/energy/taser) || istype(E, /obj/item/weapon/gun/energy/stunrevolver))
|
|
||||||
projectile = /obj/item/projectile/energy/electrode
|
|
||||||
iconholder = 1
|
|
||||||
reqpower = 200
|
|
||||||
|
|
||||||
else if(istype(E, /obj/item/weapon/gun/energy/lasercannon))
|
|
||||||
projectile = /obj/item/projectile/beam/heavylaser
|
|
||||||
iconholder = null
|
|
||||||
reqpower = 600
|
|
||||||
|
|
||||||
else if(istype(E, /obj/item/weapon/gun/energy/decloner))
|
|
||||||
projectile = /obj/item/projectile/energy/declone
|
|
||||||
iconholder = null
|
|
||||||
reqpower = 600
|
|
||||||
|
|
||||||
else if(istype(E, /obj/item/weapon/gun/energy/crossbow/largecrossbow))
|
|
||||||
projectile = /obj/item/projectile/energy/bolt/large
|
|
||||||
iconholder = null
|
|
||||||
reqpower = 125
|
|
||||||
|
|
||||||
else if(istype(E, /obj/item/weapon/gun/energy/crossbow))
|
|
||||||
projectile = /obj/item/projectile/energy/bolt
|
|
||||||
iconholder = null
|
|
||||||
reqpower = 50
|
|
||||||
|
|
||||||
else if(istype(E, /obj/item/weapon/gun/energy/laser))
|
|
||||||
projectile = /obj/item/projectile/beam
|
|
||||||
iconholder = null
|
|
||||||
reqpower = 500
|
|
||||||
|
|
||||||
else // Energy gun shots
|
|
||||||
projectile = /obj/item/projectile/energy/electrode// if it hasn't been emagged, it uses normal taser shots
|
|
||||||
iconholder = 1
|
|
||||||
egun = 1
|
|
||||||
reqpower = 200
|
|
||||||
|
|
||||||
var/obj/item/projectile/A = projectile
|
|
||||||
var/obj/item/weapon/gun/energy/E=new installation
|
|
||||||
if(iconholder)
|
if(iconholder)
|
||||||
icon_state = "[lasercolor]target_prism"
|
icon_state = "[lasercolor]target_prism"
|
||||||
else
|
else
|
||||||
icon_state = "[lasercolor]orange_target_prism"
|
icon_state = "[lasercolor]orange_target_prism"
|
||||||
if(sound)
|
if(sound)
|
||||||
playsound(src.loc, 'Taser.ogg', 75, 1)
|
playsound(src.loc, 'Taser.ogg', 75, 1)
|
||||||
A = new projectile( loc )
|
var/obj/item/projectile/A
|
||||||
|
if(emagged)
|
||||||
|
A = new eprojectile( loc )
|
||||||
|
else
|
||||||
|
A = new projectile( loc )
|
||||||
A.original = target.loc
|
A.original = target.loc
|
||||||
if(!emagged)
|
if(!emagged)
|
||||||
use_power(reqpower)
|
use_power(reqpower)
|
||||||
else
|
else
|
||||||
use_power((reqpower*2))
|
use_power((reqpower*2))
|
||||||
if(egun)// if it has been emagged, use laser shots
|
|
||||||
projectile = /obj/item/projectile/beam
|
|
||||||
iconholder = null
|
|
||||||
reqpower = 500
|
|
||||||
|
|
||||||
// Shooting Code:
|
// Shooting Code:
|
||||||
|
|
||||||
if(!E.silenced)
|
|
||||||
playsound(src.loc, E.fire_sound, 75, 1)
|
|
||||||
else
|
|
||||||
playsound(src.loc, E.fire_sound, 10, 1)
|
|
||||||
|
|
||||||
del(E)
|
|
||||||
A.current = T
|
A.current = T
|
||||||
A.yo = U.y - T.y
|
A.yo = U.y - T.y
|
||||||
A.xo = U.x - T.x
|
A.xo = U.x - T.x
|
||||||
@@ -773,9 +822,10 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
|||||||
Turret.installation = src.installation
|
Turret.installation = src.installation
|
||||||
Turret.gun_charge = src.gun_charge
|
Turret.gun_charge = src.gun_charge
|
||||||
|
|
||||||
Turret.cover=new/obj/machinery/porta_turret_cover(src.loc)
|
// Turret.cover=new/obj/machinery/porta_turret_cover(src.loc)
|
||||||
Turret.cover.Parent_Turret=Turret
|
// Turret.cover.Parent_Turret=Turret
|
||||||
Turret.cover.name = finish_name
|
// Turret.cover.name = finish_name
|
||||||
|
Turret.New()
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
else if(istype(W, /obj/item/weapon/crowbar))
|
else if(istype(W, /obj/item/weapon/crowbar))
|
||||||
@@ -846,8 +896,8 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
|||||||
if (.)
|
if (.)
|
||||||
return
|
return
|
||||||
var/dat
|
var/dat
|
||||||
|
if(!(Parent_Turret.lasercolor))
|
||||||
dat += text({"
|
dat += text({"
|
||||||
<TT><B>Automatic Portable Turret Installation</B></TT><BR><BR>
|
<TT><B>Automatic Portable Turret Installation</B></TT><BR><BR>
|
||||||
Status: []<BR>
|
Status: []<BR>
|
||||||
Behaviour controls are [Parent_Turret.locked ? "locked" : "unlocked"]"},
|
Behaviour controls are [Parent_Turret.locked ? "locked" : "unlocked"]"},
|
||||||
@@ -855,38 +905,6 @@ Behaviour controls are [Parent_Turret.locked ? "locked" : "unlocked"]"},
|
|||||||
"<A href='?src=\ref[src];power=1'>[Parent_Turret.on ? "On" : "Off"]</A>" )
|
"<A href='?src=\ref[src];power=1'>[Parent_Turret.on ? "On" : "Off"]</A>" )
|
||||||
|
|
||||||
|
|
||||||
dat += text({"<BR>
|
|
||||||
Check for Weapon Authorization: []<BR>
|
|
||||||
Check Security Records: []<BR>
|
|
||||||
Neutralize Identified Criminals: []<BR>
|
|
||||||
Neutralize All Non-Security and Non-Command Personnel: []<BR>
|
|
||||||
Neutralize All Unidentified Life Signs: []<BR>"},
|
|
||||||
|
|
||||||
"<A href='?src=\ref[src];operation=authweapon'>[Parent_Turret.auth_weapons ? "Yes" : "No"]</A>",
|
|
||||||
"<A href='?src=\ref[src];operation=checkrecords'>[Parent_Turret.check_records ? "Yes" : "No"]</A>",
|
|
||||||
"<A href='?src=\ref[src];operation=shootcrooks'>[Parent_Turret.criminals ? "Yes" : "No"]</A>",
|
|
||||||
"<A href='?src=\ref[src];operation=shootall'>[Parent_Turret.stun_all ? "Yes" : "No"]</A>" ,
|
|
||||||
"<A href='?src=\ref[src];operation=checkxenos'>[Parent_Turret.check_anomalies ? "Yes" : "No"]</A>" )
|
|
||||||
|
|
||||||
|
|
||||||
user << browse("<HEAD><TITLE>Automatic Portable Turret Installation</TITLE></HEAD>[dat]", "window=autosec")
|
|
||||||
onclose(user, "autosec")
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/machinery/porta_turret_cover/attack_hand(mob/user as mob)
|
|
||||||
. = ..()
|
|
||||||
if (.)
|
|
||||||
return
|
|
||||||
var/dat
|
|
||||||
|
|
||||||
dat += text({"
|
|
||||||
<TT><B>Automatic Portable Turret Installation</B></TT><BR><BR>
|
|
||||||
Status: []<BR>
|
|
||||||
Behaviour controls are [Parent_Turret.locked ? "locked" : "unlocked"]"},
|
|
||||||
|
|
||||||
"<A href='?src=\ref[src];power=1'>[Parent_Turret.on ? "On" : "Off"]</A>" )
|
|
||||||
|
|
||||||
if(!Parent_Turret.locked)
|
|
||||||
dat += text({"<BR>
|
dat += text({"<BR>
|
||||||
Check for Weapon Authorization: []<BR>
|
Check for Weapon Authorization: []<BR>
|
||||||
Check Security Records: []<BR>
|
Check Security Records: []<BR>
|
||||||
@@ -899,6 +917,56 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
|||||||
"<A href='?src=\ref[src];operation=shootcrooks'>[Parent_Turret.criminals ? "Yes" : "No"]</A>",
|
"<A href='?src=\ref[src];operation=shootcrooks'>[Parent_Turret.criminals ? "Yes" : "No"]</A>",
|
||||||
"<A href='?src=\ref[src];operation=shootall'>[Parent_Turret.stun_all ? "Yes" : "No"]</A>" ,
|
"<A href='?src=\ref[src];operation=shootall'>[Parent_Turret.stun_all ? "Yes" : "No"]</A>" ,
|
||||||
"<A href='?src=\ref[src];operation=checkxenos'>[Parent_Turret.check_anomalies ? "Yes" : "No"]</A>" )
|
"<A href='?src=\ref[src];operation=checkxenos'>[Parent_Turret.check_anomalies ? "Yes" : "No"]</A>" )
|
||||||
|
else
|
||||||
|
dat += text({"
|
||||||
|
<TT><B>Automatic Portable Turret Installation</B></TT><BR><BR>
|
||||||
|
Status: []<BR>"},
|
||||||
|
|
||||||
|
"<A href='?src=\ref[src];power=1'>[Parent_Turret.on ? "On" : "Off"]</A>" )
|
||||||
|
|
||||||
|
user << browse("<HEAD><TITLE>Automatic Portable Turret Installation</TITLE></HEAD>[dat]", "window=autosec")
|
||||||
|
onclose(user, "autosec")
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/machinery/porta_turret_cover/attack_hand(mob/user as mob)
|
||||||
|
. = ..()
|
||||||
|
if (.)
|
||||||
|
return
|
||||||
|
var/dat
|
||||||
|
if(!(Parent_Turret.lasercolor))
|
||||||
|
dat += text({"
|
||||||
|
<TT><B>Automatic Portable Turret Installation</B></TT><BR><BR>
|
||||||
|
Status: []<BR>
|
||||||
|
Behaviour controls are [Parent_Turret.locked ? "locked" : "unlocked"]"},
|
||||||
|
|
||||||
|
"<A href='?src=\ref[src];power=1'>[Parent_Turret.on ? "On" : "Off"]</A>" )
|
||||||
|
|
||||||
|
if(!Parent_Turret.locked)
|
||||||
|
dat += text({"<BR>
|
||||||
|
Check for Weapon Authorization: []<BR>
|
||||||
|
Check Security Records: []<BR>
|
||||||
|
Neutralize Identified Criminals: []<BR>
|
||||||
|
Neutralize All Non-Security and Non-Command Personnel: []<BR>
|
||||||
|
Neutralize All Unidentified Life Signs: []<BR>"},
|
||||||
|
|
||||||
|
"<A href='?src=\ref[src];operation=authweapon'>[Parent_Turret.auth_weapons ? "Yes" : "No"]</A>",
|
||||||
|
"<A href='?src=\ref[src];operation=checkrecords'>[Parent_Turret.check_records ? "Yes" : "No"]</A>",
|
||||||
|
"<A href='?src=\ref[src];operation=shootcrooks'>[Parent_Turret.criminals ? "Yes" : "No"]</A>",
|
||||||
|
"<A href='?src=\ref[src];operation=shootall'>[Parent_Turret.stun_all ? "Yes" : "No"]</A>" ,
|
||||||
|
"<A href='?src=\ref[src];operation=checkxenos'>[Parent_Turret.check_anomalies ? "Yes" : "No"]</A>" )
|
||||||
|
else
|
||||||
|
if(istype(user,/mob/living/carbon/human))
|
||||||
|
var/mob/living/carbon/human/H = user
|
||||||
|
if(((Parent_Turret.lasercolor) == "b") && (istype(H.wear_suit, /obj/item/clothing/suit/redtag)))
|
||||||
|
return
|
||||||
|
if(((Parent_Turret.lasercolor) == "r") && (istype(H.wear_suit, /obj/item/clothing/suit/bluetag)))
|
||||||
|
return
|
||||||
|
dat += text({"
|
||||||
|
<TT><B>Automatic Portable Turret Installation</B></TT><BR><BR>
|
||||||
|
Status: []<BR>"},
|
||||||
|
|
||||||
|
"<A href='?src=\ref[src];power=1'>[Parent_Turret.on ? "On" : "Off"]</A>" )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
user << browse("<HEAD><TITLE>Automatic Portable Turret Installation</TITLE></HEAD>[dat]", "window=autosec")
|
user << browse("<HEAD><TITLE>Automatic Portable Turret Installation</TITLE></HEAD>[dat]", "window=autosec")
|
||||||
|
|||||||
@@ -25,15 +25,15 @@
|
|||||||
/obj/structure/closet/lasertag/red/New()
|
/obj/structure/closet/lasertag/red/New()
|
||||||
..()
|
..()
|
||||||
sleep(2)
|
sleep(2)
|
||||||
new /obj/item/clothing/suit/redtag(src)
|
|
||||||
new /obj/item/clothing/suit/redtag(src)
|
|
||||||
new /obj/item/weapon/gun/energy/laser/redtag(src)
|
new /obj/item/weapon/gun/energy/laser/redtag(src)
|
||||||
new /obj/item/weapon/gun/energy/laser/redtag(src)
|
new /obj/item/weapon/gun/energy/laser/redtag(src)
|
||||||
|
new /obj/item/clothing/suit/redtag(src)
|
||||||
|
new /obj/item/clothing/suit/redtag(src)
|
||||||
|
|
||||||
/obj/structure/closet/lasertag/blue/New()
|
/obj/structure/closet/lasertag/blue/New()
|
||||||
..()
|
..()
|
||||||
sleep(2)
|
sleep(2)
|
||||||
new /obj/item/clothing/suit/bluetag(src)
|
|
||||||
new /obj/item/clothing/suit/bluetag(src)
|
|
||||||
new /obj/item/weapon/gun/energy/laser/bluetag(src)
|
new /obj/item/weapon/gun/energy/laser/bluetag(src)
|
||||||
new /obj/item/weapon/gun/energy/laser/bluetag(src)
|
new /obj/item/weapon/gun/energy/laser/bluetag(src)
|
||||||
|
new /obj/item/clothing/suit/bluetag(src)
|
||||||
|
new /obj/item/clothing/suit/bluetag(src)
|
||||||
@@ -762,7 +762,7 @@ datum
|
|||||||
|
|
||||||
on_mob_life(var/mob/living/M as mob)
|
on_mob_life(var/mob/living/M as mob)
|
||||||
if(!M) M = holder.my_atom
|
if(!M) M = holder.my_atom
|
||||||
M.apply_effect(10,IRRADIATE,0)
|
M.apply_effect(2,IRRADIATE,0)
|
||||||
..()
|
..()
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -912,7 +912,7 @@ datum
|
|||||||
|
|
||||||
on_mob_life(var/mob/living/M as mob)
|
on_mob_life(var/mob/living/M as mob)
|
||||||
if(!M) M = holder.my_atom
|
if(!M) M = holder.my_atom
|
||||||
M.apply_effect(3,IRRADIATE,0)
|
M.apply_effect(1,IRRADIATE,0)
|
||||||
..()
|
..()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
/obj/item/projectile/bluetag
|
/obj/item/projectile/bluetag
|
||||||
name = "lasertag beam"
|
name = "lasertag beam"
|
||||||
icon_state = "ice_2"
|
icon_state = "bluelaser"
|
||||||
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
|
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
|
||||||
damage = 0
|
damage = 0
|
||||||
damage_type = BURN
|
damage_type = BURN
|
||||||
@@ -72,4 +72,19 @@
|
|||||||
var/mob/living/carbon/human/M = target
|
var/mob/living/carbon/human/M = target
|
||||||
if(istype(M.wear_suit, /obj/item/clothing/suit/bluetag))
|
if(istype(M.wear_suit, /obj/item/clothing/suit/bluetag))
|
||||||
M.Weaken(5)
|
M.Weaken(5)
|
||||||
|
return 1
|
||||||
|
|
||||||
|
/obj/item/projectile/omnitag//A laser tag bolt that stuns EVERYONE
|
||||||
|
name = "lasertag beam"
|
||||||
|
icon_state = "omnilaser"
|
||||||
|
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
|
||||||
|
damage = 0
|
||||||
|
damage_type = BURN
|
||||||
|
flag = "laser"
|
||||||
|
|
||||||
|
on_hit(var/atom/target, var/blocked = 0)
|
||||||
|
if(istype(target, /mob/living/carbon/human))
|
||||||
|
var/mob/living/carbon/human/M = target
|
||||||
|
if((istype(M.wear_suit, /obj/item/clothing/suit/bluetag))||(istype(M.wear_suit, /obj/item/clothing/suit/redtag)))
|
||||||
|
M.Weaken(5)
|
||||||
return 1
|
return 1
|
||||||
@@ -126,17 +126,21 @@ Note: Must be placed west/left of and R&D console to function.
|
|||||||
return 1
|
return 1
|
||||||
if (stat)
|
if (stat)
|
||||||
return 1
|
return 1
|
||||||
if (TotalMaterials() + 3750 > max_material_storage)
|
if(istype(O,/obj/item/stack/sheet))
|
||||||
user << "\red The protolathe's material bin is full. Please remove material before adding more."
|
var/obj/item/stack/sheet/S = O
|
||||||
return 1
|
if (TotalMaterials() + S.perunit > max_material_storage)
|
||||||
|
user << "\red The protolathe's material bin is full. Please remove material before adding more."
|
||||||
|
return 1
|
||||||
|
|
||||||
var/obj/item/stack/sheet/stack = O
|
var/obj/item/stack/sheet/stack = O
|
||||||
var/amount = round(input("How many sheets do you want to add?") as num)
|
var/amount = round(input("How many sheets do you want to add?") as num)//No decimals
|
||||||
if(amount < 0)
|
if(amount < 0)//No negative numbers
|
||||||
amount = 0
|
amount = 0
|
||||||
if(amount == 0)
|
if(amount == 0)
|
||||||
return
|
return
|
||||||
if(amount > stack.amount)
|
if(amount > stack.amount)
|
||||||
|
amount = stack.amount
|
||||||
|
if(max_material_storage - TotalMaterials() < (amount*stack.perunit))//Can't overfill
|
||||||
amount = min(stack.amount, round((max_material_storage-TotalMaterials())/stack.perunit))
|
amount = min(stack.amount, round((max_material_storage-TotalMaterials())/stack.perunit))
|
||||||
|
|
||||||
src.overlays += "protolathe_[stack.name]"
|
src.overlays += "protolathe_[stack.name]"
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Reference in New Issue
Block a user