Merge pull request #1220 from Erthilo/master

ERT updates, megaphone, AI holopad fixes, cleanbot limiter
This commit is contained in:
SkyMarshal
2012-06-01 14:55:41 -07:00
18 changed files with 314 additions and 117 deletions
+7
View File
@@ -355,6 +355,13 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
/obj/item/weapon/bucket_sensor/attackby(var/obj/item/W, mob/user as mob)
..()
if(istype(W, /obj/item/robot_parts/l_arm) || istype(W, /obj/item/robot_parts/r_arm))
var/cleanbots = 0
for(var/obj/machinery/bot/cleanbot in world)
cleanbots++
if(cleanbots >= 6) //For some reason it starts at 4, so max limit is actually 2.
user << "\red The station frequencies can't handle anymore cleanbots!" //TOO MANY GODDAMN CLEANBOTS
cleanbots = 0
return
var/obj/machinery/bot/cleanbot/A = new /obj/machinery/bot/cleanbot
A.loc = get_turf(src.loc)
A.name = src.created_name
+1
View File
@@ -44,6 +44,7 @@ Possible to do for anyone motivated enough:
if(!(stat & NOPOWER)&&user.eyeobj.loc==src.loc)//If the projector has power and client eye is on it.
if(!hologram)//If there is not already a hologram.
create_holo(user)//Create one.
user.current = src
for(var/mob/M in viewers())
M.show_message("A holographic image of [user] flicks to life right before your eyes!",1)
else
+89
View File
@@ -0,0 +1,89 @@
/obj/structure/closet/secure_closet/ert/commander
name = "\improper ERT commander locker"
req_access = list(access_security)
icon_state = "capsecure1"
icon_closed = "capsecure"
icon_locked = "capsecure1"
icon_opened = "capsecureopen"
icon_broken = "capsecurebroken"
icon_off = "capsecureoff"
New()
..()
sleep(2)
new /obj/item/clothing/head/helmet/space/ert/commander(src)
new /obj/item/clothing/suit/space/ert/commander(src)
new /obj/item/weapon/plastique(src)
new /obj/item/weapon/storage/belt/security/full(src)
new /obj/item/weapon/gun/energy/ionrifle(src)
new /obj/item/weapon/gun/energy/gun/nuclear(src)
new /obj/item/clothing/glasses/thermal(src)
new /obj/item/weapon/lighter/zippo(src)
new /obj/item/weapon/pinpointer(src)
return
/obj/structure/closet/secure_closet/ert/security
name = "\improper ERT security locker"
req_access = list(access_security)
icon_state = "sec1"
icon_closed = "sec"
icon_locked = "sec1"
icon_opened = "secopen"
icon_broken = "secbroken"
icon_off = "secoff"
New()
..()
sleep(2)
new /obj/item/clothing/head/helmet/space/ert/security(src)
new /obj/item/clothing/suit/space/ert/security(src)
new /obj/item/weapon/plastique(src)
new /obj/item/weapon/storage/belt/security/full(src)
new /obj/item/weapon/gun/energy/ionrifle(src)
new /obj/item/weapon/gun/energy/gun/nuclear(src)
new /obj/item/clothing/glasses/thermal(src)
return
/obj/structure/closet/secure_closet/ert/engineer
name = "\improper ERT engineer locker"
req_access = list(access_engine)
icon_state = "secureeng1"
icon_closed = "secureeng"
icon_locked = "secureeng1"
icon_opened = "secureengopen"
icon_broken = "secureengbroken"
icon_off = "secureengoff"
New()
..()
sleep(2)
new /obj/item/clothing/head/helmet/space/ert/engineer(src)
new /obj/item/clothing/suit/space/ert/engineer(src)
new /obj/item/weapon/gun/energy/taser(src)
new /obj/item/weapon/storage/belt/utility/full(src)
new /obj/item/weapon/storage/backpack/industrial/full(src)
new /obj/item/device/t_scanner(src)
new /obj/item/clothing/glasses/meson(src)
return
/obj/structure/closet/secure_closet/ert/medical
name = "\improper ERT medical locker"
req_access = list(access_medical)
icon_state = "securemed1"
icon_closed = "securemed"
icon_locked = "securemed1"
icon_opened = "securemedopen"
icon_broken = "securemedbroken"
icon_off = "securemedoff"
New()
..()
sleep(2)
new /obj/item/clothing/head/helmet/space/ert/medical(src)
new /obj/item/clothing/suit/space/ert/medical(src)
new /obj/item/weapon/gun/energy/taser(src)
new /obj/item/weapon/storage/backpack/medic/full(src)
new /obj/item/weapon/storage/belt/medical(src)
new /obj/item/clothing/glasses/hud/health(src)
return
+17
View File
@@ -564,3 +564,20 @@
for(var/mob/M in viewers(5, src))
M << "\red \the [src] burns up."
del(src)
/obj/item/weapon/megaphone/attack_self(mob/user as mob)
if(!ishuman(user))
usr << "\red You don't know how to use this!"
return
if(cooldown)
usr << "\red \The [src] needs to recharge!"
return
var/message = copytext(sanitize(input(user, "Shout a message?", "Megaphone", null) as text),1,MAX_MESSAGE_LEN)
if(message && !cooldown)
if ((src.loc == user && usr.stat == 0))
for(var/mob/O in (viewers(user)))
O.show_message("<B>[user]</B> broadcasts, <FONT size=3>\"[message]\"</FONT>",2) // 2 stands for hearable message
cooldown = 1
spawn(100)
cooldown = 0
return