diff --git a/code/defines/obj/vending.dm b/code/defines/obj/vending.dm index 2da0dfca818..c4dc34db10d 100644 --- a/code/defines/obj/vending.dm +++ b/code/defines/obj/vending.dm @@ -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" diff --git a/code/game/machinery/bots/ed209bot.dm b/code/game/machinery/bots/ed209bot.dm index 7ce256f6fbe..fe4329dd905 100644 --- a/code/game/machinery/bots/ed209bot.dm +++ b/code/game/machinery/bots/ed209bot.dm @@ -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,7 +127,8 @@ Behaviour controls are [src.locked ? "locked" : "unlocked"]"}, "[src.on ? "On" : "Off"]" ) if(!src.locked) - dat += text({"
+ if(!lasercolor) + dat += text({"
Check for Weapon Authorization: []
Check Security Records: []
Operating Mode: []
@@ -132,6 +137,11 @@ Auto Patrol: []"}, "[src.idcheck ? "Yes" : "No"]", "[src.check_records ? "Yes" : "No"]", "[src.arrest_type ? "Detain" : "Arrest"]", +"[auto_patrol ? "On" : "Off"]" ) + else + dat += text({"
+Auto Patrol: []"}, + "[auto_patrol ? "On" : "Off"]" ) @@ -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,7 +635,8 @@ Auto Patrol: []"}, src.target = C src.oldtarget_name = C.name 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("[src] points at [C.name]!") mode = SECBOT_HUNT spawn(0) @@ -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(!lasercolor) - if (src.emagged) - A = new /obj/item/projectile/beam( loc ) - else - A = new /obj/item/projectile/energy/electrode( loc ) - else if(lasercolor == "b") - if (src.emagged) - A = new /obj/item/projectile/energy/electrode( loc ) - else - A = new /obj/item/projectile/bluetag( loc ) - else if(lasercolor == "r") - if (src.emagged) - A = new /obj/item/projectile/energy/electrode( loc ) - else - A = new /obj/item/projectile/redtag( loc ) + if(!projectile) + if(!lasercolor) + if (src.emagged) + projectile = /obj/item/projectile/beam + else + projectile = /obj/item/projectile/energy/electrode + else if(lasercolor == "b") + if (src.emagged) + projectile = /obj/item/projectile/omnitag + else + projectile = /obj/item/projectile/bluetag + else if(lasercolor == "r") + if (src.emagged) + projectile = /obj/item/projectile/omnitag + else + 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) \ No newline at end of file diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 763bcd76944..b44b61fec79 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -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,15 +186,16 @@ var/dat // The browse() text, similar to ED-209s and beepskies. - dat += text({" + if(!(src.lasercolor))//Lasertag turrets have less options + dat += text({" Automatic Portable Turret Installation

Status: []
Behaviour controls are [src.locked ? "locked" : "unlocked"]"}, "[src.on ? "On" : "Off"]" ) - if(!src.locked) - dat += text({"
+ if(!src.locked) + dat += text({"
Check for Weapon Authorization: []
Check Security Records: []
Neutralize Identified Criminals: []
@@ -99,6 +207,18 @@ Neutralize All Unidentified Life Signs: []
"}, "[src.criminals ? "Yes" : "No"]", "[stun_all ? "Yes" : "No"]", "[check_anomalies ? "Yes" : "No"]" ) + 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({" +Automatic Portable Turret Installation

+Status: []
"}, + +"[src.on ? "On" : "Off"]" ) user << browse("Automatic Portable Turret Installation[dat]", "window=autosec") @@ -251,11 +371,13 @@ Neutralize All Unidentified Life Signs: []
"}, 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: []
"}, 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: []
"}, /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: []
"}, 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: []
"}, 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: []
"}, 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: []
"}, 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: []
"}, break + return threatcount @@ -490,6 +619,13 @@ Neutralize All Unidentified Life Signs: []
"}, /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: []
"}, // 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) - A = new projectile( loc ) + 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: []
"}, 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,8 +896,8 @@ Neutralize All Unidentified Life Signs: []
"}, if (.) return var/dat - - dat += text({" + if(!(Parent_Turret.lasercolor)) + dat += text({" Automatic Portable Turret Installation

Status: []
Behaviour controls are [Parent_Turret.locked ? "locked" : "unlocked"]"}, @@ -855,38 +905,6 @@ Behaviour controls are [Parent_Turret.locked ? "locked" : "unlocked"]"}, "[Parent_Turret.on ? "On" : "Off"]" ) - dat += text({"
-Check for Weapon Authorization: []
-Check Security Records: []
-Neutralize Identified Criminals: []
-Neutralize All Non-Security and Non-Command Personnel: []
-Neutralize All Unidentified Life Signs: []
"}, - -"[Parent_Turret.auth_weapons ? "Yes" : "No"]", -"[Parent_Turret.check_records ? "Yes" : "No"]", -"[Parent_Turret.criminals ? "Yes" : "No"]", -"[Parent_Turret.stun_all ? "Yes" : "No"]" , -"[Parent_Turret.check_anomalies ? "Yes" : "No"]" ) - - - user << browse("Automatic Portable Turret Installation[dat]", "window=autosec") - onclose(user, "autosec") - return - -/obj/machinery/porta_turret_cover/attack_hand(mob/user as mob) - . = ..() - if (.) - return - var/dat - - dat += text({" -Automatic Portable Turret Installation

-Status: []
-Behaviour controls are [Parent_Turret.locked ? "locked" : "unlocked"]"}, - -"[Parent_Turret.on ? "On" : "Off"]" ) - - if(!Parent_Turret.locked) dat += text({"
Check for Weapon Authorization: []
Check Security Records: []
@@ -899,6 +917,56 @@ Neutralize All Unidentified Life Signs: []
"}, "[Parent_Turret.criminals ? "Yes" : "No"]", "[Parent_Turret.stun_all ? "Yes" : "No"]" , "[Parent_Turret.check_anomalies ? "Yes" : "No"]" ) + else + dat += text({" +Automatic Portable Turret Installation

+Status: []
"}, + +"[Parent_Turret.on ? "On" : "Off"]" ) + + user << browse("Automatic Portable Turret Installation[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({" +Automatic Portable Turret Installation

+Status: []
+Behaviour controls are [Parent_Turret.locked ? "locked" : "unlocked"]"}, + +"[Parent_Turret.on ? "On" : "Off"]" ) + + if(!Parent_Turret.locked) + dat += text({"
+Check for Weapon Authorization: []
+Check Security Records: []
+Neutralize Identified Criminals: []
+Neutralize All Non-Security and Non-Command Personnel: []
+Neutralize All Unidentified Life Signs: []
"}, + +"[Parent_Turret.auth_weapons ? "Yes" : "No"]", +"[Parent_Turret.check_records ? "Yes" : "No"]", +"[Parent_Turret.criminals ? "Yes" : "No"]", +"[Parent_Turret.stun_all ? "Yes" : "No"]" , +"[Parent_Turret.check_anomalies ? "Yes" : "No"]" ) + 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({" +Automatic Portable Turret Installation

+Status: []
"}, + +"[Parent_Turret.on ? "On" : "Off"]" ) + user << browse("Automatic Portable Turret Installation[dat]", "window=autosec") diff --git a/code/game/objects/closets/fitnesscloset.dm b/code/game/objects/closets/fitnesscloset.dm index 10f89b69038..c676464ccdf 100644 --- a/code/game/objects/closets/fitnesscloset.dm +++ b/code/game/objects/closets/fitnesscloset.dm @@ -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) \ No newline at end of file + new /obj/item/weapon/gun/energy/laser/bluetag(src) + new /obj/item/clothing/suit/bluetag(src) + new /obj/item/clothing/suit/bluetag(src) \ No newline at end of file diff --git a/code/modules/chemical/Chemistry-Reagents.dm b/code/modules/chemical/Chemistry-Reagents.dm index 588410cfed5..438d6ad5c3f 100644 --- a/code/modules/chemical/Chemistry-Reagents.dm +++ b/code/modules/chemical/Chemistry-Reagents.dm @@ -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 diff --git a/code/modules/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm index c60e6444856..db8971a1b3c 100644 --- a/code/modules/projectiles/projectile/beams.dm +++ b/code/modules/projectiles/projectile/beams.dm @@ -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 @@ -72,4 +72,19 @@ var/mob/living/carbon/human/M = target 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 \ No newline at end of file diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index 71fe1aca326..4f3221a5512 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -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) - user << "\red The protolathe's material bin is full. Please remove material before adding more." - return 1 + 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]" diff --git a/icons/obj/projectiles.dmi b/icons/obj/projectiles.dmi index 1a00168f525..d631540cc00 100644 Binary files a/icons/obj/projectiles.dmi and b/icons/obj/projectiles.dmi differ