mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +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_deny = "engivend-deny"
|
||||
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_amounts = "5;5;3;5;5;5;2;3;3"
|
||||
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;3;5;3;5;5;5;2;3;3"
|
||||
product_hidden = "/obj/item/weapon/weldingtool/hugetank;/obj/item/clothing/gloves/fyellow"
|
||||
product_hideamt = "2;2"
|
||||
product_coin = "/obj/item/weapon/storage/belt/utility"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/machinery/bot/ed209
|
||||
name = "ED-209"
|
||||
name = "ED-209 Security Robot"
|
||||
desc = "A security robot. He looks less than thrilled."
|
||||
icon = 'aibots.dmi'
|
||||
icon_state = "ed2090"
|
||||
@@ -16,7 +16,7 @@
|
||||
var/lastfired = 0
|
||||
var/shot_delay = 3 //.3 seconds between shots
|
||||
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
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
var/idcheck = 1 //If false, all station IDs are authorized for weapons.
|
||||
var/check_records = 1 //Does it check security records?
|
||||
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
|
||||
#define SECBOT_IDLE 0 // idle
|
||||
@@ -86,11 +87,14 @@
|
||||
radio_controller.add_object(src, control_freq, filter = RADIO_SECBOT)
|
||||
radio_controller.add_object(src, beacon_freq, filter = RADIO_NAVBEACONS)
|
||||
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)
|
||||
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")
|
||||
if(lasercolor == "r")
|
||||
if((lasercolor == "r") && (name == "ED-209 Security Robot"))
|
||||
name = pick("RED RAMPAGE","RED ROVER","RED KILLDEATH MURDERBOT")
|
||||
|
||||
/obj/machinery/bot/ed209/turn_on()
|
||||
@@ -123,6 +127,7 @@ Behaviour controls are [src.locked ? "locked" : "unlocked"]"},
|
||||
"<A href='?src=\ref[src];power=1'>[src.on ? "On" : "Off"]</A>" )
|
||||
|
||||
if(!src.locked)
|
||||
if(!lasercolor)
|
||||
dat += text({"<BR>
|
||||
Check for Weapon Authorization: []<BR>
|
||||
Check Security Records: []<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=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=patrol'>[auto_patrol ? "On" : "Off"]</A>" )
|
||||
else
|
||||
dat += text({"<BR>
|
||||
Auto Patrol: []"},
|
||||
|
||||
"<A href='?src=\ref[src];operation=patrol'>[auto_patrol ? "On" : "Off"]</A>" )
|
||||
|
||||
|
||||
@@ -144,6 +154,12 @@ Auto Patrol: []"},
|
||||
return
|
||||
usr.machine = src
|
||||
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 (src.on)
|
||||
turn_off()
|
||||
@@ -177,6 +193,8 @@ Auto Patrol: []"},
|
||||
..()
|
||||
if (!istype(W, /obj/item/weapon/screwdriver) && (W.force) && (!src.target))
|
||||
src.target = user
|
||||
if(lasercolor)//To make up for the fact that lasertag bots don't hunt
|
||||
src.shootAt(user)
|
||||
src.mode = SECBOT_HUNT
|
||||
|
||||
/obj/machinery/bot/ed209/Emag(mob/user as mob)
|
||||
@@ -192,6 +210,7 @@ Auto Patrol: []"},
|
||||
src.emagged = 1
|
||||
src.on = 1
|
||||
src.icon_state = "[lasercolor]ed209[src.on]"
|
||||
src.projectile = null
|
||||
mode = SECBOT_IDLE
|
||||
|
||||
/obj/machinery/bot/ed209/process()
|
||||
@@ -233,6 +252,7 @@ Auto Patrol: []"},
|
||||
|
||||
if(SECBOT_HUNT) // hunting for perp
|
||||
if(src.lasercolor)//Lasertag bots do not tase or arrest anyone, just patrol and shoot and whatnot
|
||||
mode = SECBOT_IDLE
|
||||
return
|
||||
// if can't reach perp for long enough, go idle
|
||||
if (src.frustration >= 8)
|
||||
@@ -282,6 +302,7 @@ Auto Patrol: []"},
|
||||
|
||||
if(SECBOT_PREP_ARREST) // preparing to arrest target
|
||||
if(src.lasercolor)
|
||||
mode = SECBOT_IDLE
|
||||
return
|
||||
if (!target)
|
||||
mode = SECBOT_IDLE
|
||||
@@ -319,6 +340,7 @@ Auto Patrol: []"},
|
||||
|
||||
if(SECBOT_ARREST) // arresting
|
||||
if(src.lasercolor)
|
||||
mode = SECBOT_IDLE
|
||||
return
|
||||
if (!target || src.target.handcuffed)
|
||||
src.anchored = 0
|
||||
@@ -387,6 +409,8 @@ Auto Patrol: []"},
|
||||
path -= loc
|
||||
|
||||
look_for_perp()
|
||||
if(lasercolor)
|
||||
sleep(20)
|
||||
else // failed to move
|
||||
|
||||
blockcount++
|
||||
@@ -585,12 +609,17 @@ Auto Patrol: []"},
|
||||
// look for a criminal in view of the bot
|
||||
|
||||
/obj/machinery/bot/ed209/proc/look_for_perp()
|
||||
if(src.disabled)
|
||||
return
|
||||
src.anchored = 0
|
||||
src.threatlevel = 0
|
||||
for (var/mob/living/carbon/C in view(12,src)) //Let's find us a criminal
|
||||
if ((C.stat) || (C.handcuffed))
|
||||
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))
|
||||
continue
|
||||
|
||||
@@ -606,6 +635,7 @@ Auto Patrol: []"},
|
||||
src.target = C
|
||||
src.oldtarget_name = C.name
|
||||
src.speak("Level [src.threatlevel] infraction alert!")
|
||||
if(!src.lasercolor)
|
||||
playsound(src.loc, pick('ed209_20sec.ogg', 'EDPlaceholder.ogg'), 50, 0)
|
||||
src.visible_message("<b>[src]</b> points at [C.name]!")
|
||||
mode = SECBOT_HUNT
|
||||
@@ -624,8 +654,6 @@ Auto Patrol: []"},
|
||||
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.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/energy/laser/bluetag) \
|
||||
@@ -656,6 +684,7 @@ Auto Patrol: []"},
|
||||
threatcount -= 2
|
||||
|
||||
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))
|
||||
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)))
|
||||
@@ -664,6 +693,7 @@ Auto Patrol: []"},
|
||||
threatcount += 2
|
||||
|
||||
if(src.lasercolor == "r")
|
||||
threatcount = 0
|
||||
if(istype(perp.wear_suit, /obj/item/clothing/suit/bluetag))
|
||||
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)))
|
||||
@@ -690,6 +720,9 @@ Auto Patrol: []"},
|
||||
threatcount = 4
|
||||
break
|
||||
|
||||
if((src.idcheck) && (src.allowed(perp)) && !(src.lasercolor))
|
||||
threatcount = 0//Corrupt cops cannot exist beep boop
|
||||
|
||||
return threatcount
|
||||
|
||||
/obj/machinery/bot/ed209/Bump(M as mob|obj) //Leave no door unopened!
|
||||
@@ -739,7 +772,19 @@ Auto Patrol: []"},
|
||||
G.power_supply.charge = 0
|
||||
|
||||
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
|
||||
s.set_up(3, 1, src)
|
||||
@@ -765,27 +810,26 @@ Auto Patrol: []"},
|
||||
//if(lastfired && world.time - lastfired < 100)
|
||||
// playsound(src.loc, 'ed209_shoot.ogg', 50, 0)
|
||||
|
||||
var/obj/item/projectile/A
|
||||
if(!projectile)
|
||||
if(!lasercolor)
|
||||
if (src.emagged)
|
||||
A = new /obj/item/projectile/beam( loc )
|
||||
projectile = /obj/item/projectile/beam
|
||||
else
|
||||
A = new /obj/item/projectile/energy/electrode( loc )
|
||||
projectile = /obj/item/projectile/energy/electrode
|
||||
else if(lasercolor == "b")
|
||||
if (src.emagged)
|
||||
A = new /obj/item/projectile/energy/electrode( loc )
|
||||
projectile = /obj/item/projectile/omnitag
|
||||
else
|
||||
A = new /obj/item/projectile/bluetag( loc )
|
||||
projectile = /obj/item/projectile/bluetag
|
||||
else if(lasercolor == "r")
|
||||
if (src.emagged)
|
||||
A = new /obj/item/projectile/energy/electrode( loc )
|
||||
projectile = /obj/item/projectile/omnitag
|
||||
else
|
||||
A = new /obj/item/projectile/redtag( loc )
|
||||
projectile = /obj/item/projectile/redtag
|
||||
|
||||
if (!( istype(U, /turf) ))
|
||||
//A = null
|
||||
del(A)
|
||||
return
|
||||
var/obj/item/projectile/A = new projectile (loc)
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
@@ -963,11 +1007,33 @@ Auto Patrol: []"},
|
||||
if((src.lasercolor == "b") && (src.disabled == 0))
|
||||
if(istype(Proj, /obj/item/projectile/redtag))
|
||||
src.disabled = 1
|
||||
del (Proj)
|
||||
sleep(100)
|
||||
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))
|
||||
src.disabled = 1
|
||||
del (Proj)
|
||||
sleep(100)
|
||||
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/gun_charge = 0 // the charge of the gun inserted
|
||||
var/projectile = null //holder for bullettype
|
||||
var/eprojectile = null//holder for the shot when emagged
|
||||
var/reqpower = 0 //holder for power needed
|
||||
var/sound = null//So the taser can have sound
|
||||
var/iconholder = null//holder for the icon_state
|
||||
@@ -63,6 +64,112 @@
|
||||
spark_system = new /datum/effect/effect/system/spark_spread
|
||||
spark_system.set_up(5, 0, 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()
|
||||
// deletes its own cover with it
|
||||
del(cover)
|
||||
@@ -79,6 +186,7 @@
|
||||
var/dat
|
||||
|
||||
// The browse() text, similar to ED-209s and beepskies.
|
||||
if(!(src.lasercolor))//Lasertag turrets have less options
|
||||
dat += text({"
|
||||
<TT><B>Automatic Portable Turret Installation</B></TT><BR><BR>
|
||||
Status: []<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=shootall'>[stun_all ? "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")
|
||||
@@ -251,11 +371,13 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
||||
if((src.lasercolor == "b") && (src.disabled == 0))
|
||||
if(istype(Proj, /obj/item/projectile/redtag))
|
||||
src.disabled = 1
|
||||
del (Proj)
|
||||
sleep(100)
|
||||
src.disabled = 0
|
||||
if((src.lasercolor == "r") && (src.disabled == 0))
|
||||
if(istype(Proj, /obj/item/projectile/bluetag))
|
||||
src.disabled = 1
|
||||
del (Proj)
|
||||
sleep(100)
|
||||
src.disabled = 0
|
||||
return
|
||||
@@ -286,7 +408,7 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
||||
src.health = 0
|
||||
src.density = 0
|
||||
src.stat |= BROKEN // enables the BROKEN bit
|
||||
src.icon_state = "destroyed_target_prism"
|
||||
src.icon_state = "[lasercolor]destroyed_target_prism"
|
||||
invisibility=0
|
||||
src.spark_system.start() // creates some sparks because they look cool
|
||||
src.density=1
|
||||
@@ -396,6 +518,8 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
||||
|
||||
/obj/machinery/porta_turret/proc
|
||||
popUp() // pops the turret up
|
||||
if(disabled)
|
||||
return
|
||||
if(raising || raised) return
|
||||
if(stat & BROKEN) return
|
||||
invisibility=0
|
||||
@@ -409,6 +533,8 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
||||
layer=4
|
||||
|
||||
popDown() // pops the turret down
|
||||
if(disabled)
|
||||
return
|
||||
if(raising || !raised) return
|
||||
if(stat & BROKEN) return
|
||||
layer=3
|
||||
@@ -435,7 +561,7 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
||||
if(auth_weapons) // check for weapon authorization
|
||||
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
|
||||
|
||||
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))
|
||||
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))
|
||||
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)))
|
||||
@@ -455,7 +582,8 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
||||
if(istype(perp:belt, /obj/item/weapon/gun/energy/laser/redtag))
|
||||
threatcount += 2
|
||||
|
||||
if(src.lasercolor == "r")
|
||||
if((src.lasercolor) == "r")
|
||||
threatcount = 0
|
||||
if(istype(perp.wear_suit, /obj/item/clothing/suit/bluetag))
|
||||
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)))
|
||||
@@ -483,6 +611,7 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
||||
break
|
||||
|
||||
|
||||
|
||||
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
|
||||
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(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!
|
||||
|
||||
|
||||
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)
|
||||
icon_state = "[lasercolor]target_prism"
|
||||
else
|
||||
icon_state = "[lasercolor]orange_target_prism"
|
||||
if(sound)
|
||||
playsound(src.loc, 'Taser.ogg', 75, 1)
|
||||
var/obj/item/projectile/A
|
||||
if(emagged)
|
||||
A = new eprojectile( loc )
|
||||
else
|
||||
A = new projectile( loc )
|
||||
A.original = target.loc
|
||||
if(!emagged)
|
||||
use_power(reqpower)
|
||||
else
|
||||
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:
|
||||
|
||||
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.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
@@ -773,9 +822,10 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
||||
Turret.installation = src.installation
|
||||
Turret.gun_charge = src.gun_charge
|
||||
|
||||
Turret.cover=new/obj/machinery/porta_turret_cover(src.loc)
|
||||
Turret.cover.Parent_Turret=Turret
|
||||
Turret.cover.name = finish_name
|
||||
// Turret.cover=new/obj/machinery/porta_turret_cover(src.loc)
|
||||
// Turret.cover.Parent_Turret=Turret
|
||||
// Turret.cover.name = finish_name
|
||||
Turret.New()
|
||||
del(src)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/crowbar))
|
||||
@@ -846,7 +896,7 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
||||
if (.)
|
||||
return
|
||||
var/dat
|
||||
|
||||
if(!(Parent_Turret.lasercolor))
|
||||
dat += text({"
|
||||
<TT><B>Automatic Portable Turret Installation</B></TT><BR><BR>
|
||||
Status: []<BR>
|
||||
@@ -867,7 +917,12 @@ 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=shootall'>[Parent_Turret.stun_all ? "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")
|
||||
@@ -878,7 +933,7 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
||||
if (.)
|
||||
return
|
||||
var/dat
|
||||
|
||||
if(!(Parent_Turret.lasercolor))
|
||||
dat += text({"
|
||||
<TT><B>Automatic Portable Turret Installation</B></TT><BR><BR>
|
||||
Status: []<BR>
|
||||
@@ -899,6 +954,19 @@ 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=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")
|
||||
|
||||
@@ -25,15 +25,15 @@
|
||||
/obj/structure/closet/lasertag/red/New()
|
||||
..()
|
||||
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/clothing/suit/redtag(src)
|
||||
new /obj/item/clothing/suit/redtag(src)
|
||||
|
||||
/obj/structure/closet/lasertag/blue/New()
|
||||
..()
|
||||
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/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)
|
||||
if(!M) M = holder.my_atom
|
||||
M.apply_effect(10,IRRADIATE,0)
|
||||
M.apply_effect(2,IRRADIATE,0)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -912,7 +912,7 @@ datum
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
M.apply_effect(3,IRRADIATE,0)
|
||||
M.apply_effect(1,IRRADIATE,0)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
/obj/item/projectile/bluetag
|
||||
name = "lasertag beam"
|
||||
icon_state = "ice_2"
|
||||
icon_state = "bluelaser"
|
||||
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
|
||||
damage = 0
|
||||
damage_type = BURN
|
||||
@@ -73,3 +73,18 @@
|
||||
if(istype(M.wear_suit, /obj/item/clothing/suit/bluetag))
|
||||
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
|
||||
@@ -126,17 +126,21 @@ Note: Must be placed west/left of and R&D console to function.
|
||||
return 1
|
||||
if (stat)
|
||||
return 1
|
||||
if (TotalMaterials() + 3750 > max_material_storage)
|
||||
if(istype(O,/obj/item/stack/sheet))
|
||||
var/obj/item/stack/sheet/S = O
|
||||
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/amount = round(input("How many sheets do you want to add?") as num)
|
||||
if(amount < 0)
|
||||
var/amount = round(input("How many sheets do you want to add?") as num)//No decimals
|
||||
if(amount < 0)//No negative numbers
|
||||
amount = 0
|
||||
if(amount == 0)
|
||||
return
|
||||
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))
|
||||
|
||||
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