mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Prison Break random event is now added in.
*Airlocks bolt open, APC blows its lights, sec lockers on the station open up. *AI can still access prison station. *Disposal (not toilets) now leads to a maintenance access. *Admins can activate a prison break event. *Further additions will be made. New unpowered door code to allow for locked shuttle doors (not for players). HONK! sprite added to blood.dm for future clown stamp use. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@478 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -178,15 +178,6 @@
|
||||
name = "Magix System IV"
|
||||
desc = "An arcane artifact that holds much magic. Running E-Knock 2.2: Sorceror's Edition"
|
||||
|
||||
/obj/machinery/computer/prison_shuttle
|
||||
name = "Prison Shuttle Console"
|
||||
icon = 'computer.dmi'
|
||||
icon_state = "shuttle"
|
||||
req_access = list(access_security)
|
||||
var/temp = null
|
||||
var/hacked = 0
|
||||
var/allowedtocall = 0
|
||||
|
||||
/obj/machinery/computer/secure_data
|
||||
name = "Security Records"
|
||||
icon_state = "security"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
start_events()
|
||||
|
||||
/proc/event()
|
||||
switch(rand(1,7))
|
||||
switch(rand(1,8))
|
||||
if(1)
|
||||
event = 1
|
||||
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
|
||||
@@ -92,6 +92,9 @@
|
||||
if(7)
|
||||
event = 1
|
||||
alien_infestation()
|
||||
if(8)
|
||||
event = 1
|
||||
prison_break()
|
||||
|
||||
/proc/dotheblobbaby()
|
||||
if (blobevent)
|
||||
@@ -291,4 +294,22 @@
|
||||
if(prob(75))
|
||||
new /obj/alien/egg (vent.loc)
|
||||
vents.Remove(vent)
|
||||
spawncount -= 1
|
||||
spawncount -= 1
|
||||
|
||||
/proc/prison_break() // -- Callagan
|
||||
for (var/obj/machinery/power/apc/temp_apc in world)
|
||||
if(istype(get_area(temp_apc), /area/prison))
|
||||
temp_apc.overload_lighting()
|
||||
for (var/obj/machinery/computer/prison_shuttle/temp_shuttle in world)
|
||||
temp_shuttle.prison_break()
|
||||
for (var/obj/secure_closet/security1/temp_closet in world)
|
||||
if(istype(get_area(temp_closet), /area/prison))
|
||||
temp_closet.prison_break()
|
||||
for (var/obj/machinery/door/airlock/security/temp_airlock in world)
|
||||
if(istype(get_area(temp_airlock), /area/prison))
|
||||
temp_airlock.prison_open()
|
||||
sleep(150)
|
||||
command_alert("Prison station VI is not accepting commands. Recommend station AI involvement.", "VI Alert")
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -951,7 +951,7 @@ About the new airlock wires panel:
|
||||
return ..()
|
||||
|
||||
/obj/machinery/door/airlock/close()
|
||||
if (src.welded || src.locked || (!src.arePowerSystemsOn()) || (stat & NOPOWER) || src.isWireCut(AIRLOCK_WIRE_OPEN_DOOR))
|
||||
if (src.welded || src.locked || (!src.arePowerSystemsOn()) || (stat & NOPOWER) || src.isWireCut(AIRLOCK_WIRE_DOOR_BOLTS))
|
||||
return
|
||||
use_power(50)
|
||||
playsound(src.loc, 'airlock.ogg', 30, 1)
|
||||
@@ -965,4 +965,11 @@ About the new airlock wires panel:
|
||||
for (var/obj/machinery/door/airlock/A in machines)
|
||||
if (A.closeOtherId == src.closeOtherId && A != src)
|
||||
src.closeOther = A
|
||||
break
|
||||
break
|
||||
|
||||
|
||||
/obj/machinery/door/airlock/proc/prison_open()
|
||||
src.locked = 0
|
||||
src.open()
|
||||
src.locked = 1
|
||||
return
|
||||
@@ -226,8 +226,28 @@
|
||||
|
||||
/////////////////////////////////////////////////// Unpowered doors
|
||||
|
||||
/obj/machinery/door/unpowered/Bumped(atom/AM)
|
||||
if(p_open || operating) return
|
||||
if (src.locked)
|
||||
return
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(world.timeofday - AM.last_bumped <= 60) return
|
||||
if(M.client && !M:handcuffed)
|
||||
bumpopen(M)
|
||||
else if(istype(AM, /obj/machinery/bot))
|
||||
var/obj/machinery/bot/bot = AM
|
||||
if(src.check_access(bot.botcard))
|
||||
if(density)
|
||||
open()
|
||||
else if(istype(AM, /obj/alien/facehugger))
|
||||
if(src.check_access(null))
|
||||
if(density)
|
||||
open()
|
||||
|
||||
/obj/machinery/door/unpowered
|
||||
autoclose = 0
|
||||
var/locked = 0
|
||||
|
||||
/obj/machinery/door/unpowered/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
@@ -241,6 +261,8 @@
|
||||
/obj/machinery/door/unpowered/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if (src.operating)
|
||||
return
|
||||
if (src.locked)
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
if (src.allowed(user))
|
||||
if (src.density)
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
new /obj/item/weapon/baton(src)
|
||||
return
|
||||
|
||||
/obj/secure_closet/security1/proc/prison_break()
|
||||
src.locked = 0
|
||||
src.icon_state = src.icon_closed
|
||||
|
||||
/obj/secure_closet/security2/New()
|
||||
..()
|
||||
sleep(2)
|
||||
|
||||
+43
-11
@@ -3,13 +3,24 @@
|
||||
#define PRISON_STATION_AREATYPE "/area/shuttle/prison/station" //Type of the prison shuttle area for station
|
||||
#define PRISON_DOCK_AREATYPE "/area/shuttle/prison/prison" //Type of the prison shuttle area for dock
|
||||
|
||||
var/prison_shuttle_moving = 0
|
||||
var/prison_shuttle_moving_to_station = 0
|
||||
var/prison_shuttle_moving_to_prison = 0
|
||||
var/prison_shuttle_at_station = 0
|
||||
var/prison_shuttle_can_send = 1
|
||||
var/prison_shuttle_time = 0
|
||||
var/prison_shuttle_timeleft = 0
|
||||
var/prison_shuttle_points = 50
|
||||
|
||||
/obj/machinery/computer/prison_shuttle
|
||||
name = "Prison Shuttle Console"
|
||||
icon = 'computer.dmi'
|
||||
icon_state = "shuttle"
|
||||
req_access = list(access_security)
|
||||
var/temp = null
|
||||
var/hacked = 0
|
||||
var/allowedtocall = 0
|
||||
var/prison_break = 0
|
||||
|
||||
/proc/prison_process()
|
||||
while(prison_shuttle_time - world.timeofday > 0)
|
||||
var/ticksleft = prison_shuttle_time - world.timeofday
|
||||
@@ -20,13 +31,14 @@ var/prison_shuttle_points = 50
|
||||
|
||||
prison_shuttle_timeleft = (ticksleft / 10)
|
||||
sleep(5)
|
||||
prison_shuttle_moving = 0
|
||||
prison_shuttle_moving_to_station = 0
|
||||
prison_shuttle_moving_to_prison = 0
|
||||
|
||||
switch(prison_shuttle_at_station)
|
||||
|
||||
if(0)
|
||||
prison_shuttle_at_station = 1
|
||||
if (prison_shuttle_moving) return
|
||||
if (prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return
|
||||
|
||||
if (!prison_can_move())
|
||||
usr << "\red The prison shuttle is unable to leave."
|
||||
@@ -58,7 +70,7 @@ var/prison_shuttle_points = 50
|
||||
|
||||
if(1)
|
||||
prison_shuttle_at_station = 0
|
||||
if (prison_shuttle_moving) return
|
||||
if (prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return
|
||||
|
||||
if (!prison_can_move())
|
||||
usr << "\red The prison shuttle is unable to leave."
|
||||
@@ -89,7 +101,7 @@ var/prison_shuttle_points = 50
|
||||
|
||||
|
||||
/proc/prison_can_move()
|
||||
if(prison_shuttle_moving) return 0
|
||||
if(prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return 0
|
||||
|
||||
else return 1
|
||||
|
||||
@@ -113,6 +125,10 @@ var/prison_shuttle_points = 50
|
||||
user << "\red Access Denied."
|
||||
return
|
||||
|
||||
if(prison_break)
|
||||
user << "\red Unable to locate shuttle."
|
||||
return
|
||||
|
||||
if(..())
|
||||
return
|
||||
user.machine = src
|
||||
@@ -122,8 +138,8 @@ var/prison_shuttle_points = 50
|
||||
dat = src.temp
|
||||
else
|
||||
dat += {"<BR><B>Prison Shuttle</B><HR>
|
||||
\nLocation: [prison_shuttle_moving ? "Moving to station ([prison_shuttle_timeleft] Secs.)":prison_shuttle_at_station ? "Station":"Dock"]<BR>
|
||||
[prison_shuttle_moving ? "\n*Shuttle already called*<BR>\n<BR>":prison_shuttle_at_station ? "\n<A href='?src=\ref[src];sendtodock=1'>Send to Dock</A><BR>\n<BR>":"\n<A href='?src=\ref[src];sendtostation=1'>Send to station</A><BR>\n<BR>"]
|
||||
\nLocation: [prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison ? "Moving to station ([prison_shuttle_timeleft] Secs.)":prison_shuttle_at_station ? "Station":"Dock"]<BR>
|
||||
[prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison ? "\n*Shuttle already called*<BR>\n<BR>":prison_shuttle_at_station ? "\n<A href='?src=\ref[src];sendtodock=1'>Send to Dock</A><BR>\n<BR>":"\n<A href='?src=\ref[src];sendtostation=1'>Send to station</A><BR>\n<BR>"]
|
||||
\n<A href='?src=\ref[user];mach_close=computer'>Close</A>"}
|
||||
|
||||
user << browse(dat, "window=computer;size=575x450")
|
||||
@@ -138,7 +154,7 @@ var/prison_shuttle_points = 50
|
||||
usr.machine = src
|
||||
|
||||
if (href_list["sendtodock"])
|
||||
if(!prison_shuttle_at_station || prison_shuttle_moving) return
|
||||
if(!prison_shuttle_at_station|| prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return
|
||||
|
||||
if (!prison_can_move())
|
||||
usr << "\red The prison shuttle is unable to leave."
|
||||
@@ -150,14 +166,14 @@ var/prison_shuttle_points = 50
|
||||
src.temp += "Shuttle sent.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
||||
src.updateUsrDialog()
|
||||
|
||||
prison_shuttle_moving = 1
|
||||
prison_shuttle_moving_to_prison = 1
|
||||
|
||||
prison_shuttle_time = world.timeofday + PRISON_MOVETIME
|
||||
spawn(0)
|
||||
prison_process()
|
||||
|
||||
else if (href_list["sendtostation"])
|
||||
if(prison_shuttle_at_station || prison_shuttle_moving) return
|
||||
if(prison_shuttle_at_station || prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return
|
||||
|
||||
if (!prison_can_move())
|
||||
usr << "\red The prison shuttle is unable to leave."
|
||||
@@ -169,7 +185,7 @@ var/prison_shuttle_points = 50
|
||||
src.temp += "Shuttle sent.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
||||
src.updateUsrDialog()
|
||||
|
||||
prison_shuttle_moving = 1
|
||||
prison_shuttle_moving_to_station = 1
|
||||
|
||||
prison_shuttle_time = world.timeofday + PRISON_MOVETIME
|
||||
spawn(0)
|
||||
@@ -182,6 +198,22 @@ var/prison_shuttle_points = 50
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/prison_shuttle/proc/prison_break()
|
||||
switch(prison_break)
|
||||
if (0)
|
||||
if(!prison_shuttle_at_station || prison_shuttle_moving_to_prison) return
|
||||
|
||||
prison_shuttle_moving_to_prison = 1
|
||||
prison_shuttle_at_station = prison_shuttle_at_station
|
||||
|
||||
if (!prison_shuttle_moving_to_prison || !prison_shuttle_moving_to_station)
|
||||
prison_shuttle_time = world.timeofday + PRISON_MOVETIME
|
||||
spawn(0)
|
||||
prison_process()
|
||||
prison_break = 1
|
||||
if(1)
|
||||
prison_break = 0
|
||||
|
||||
/obj/machinery/computer/prison_shuttle/proc/post_signal(var/command)
|
||||
|
||||
var/datum/radio_frequency/frequency = radio_controller.return_frequency("1311")
|
||||
|
||||
@@ -1150,6 +1150,9 @@ var/showadminmessages = 1
|
||||
if(aliens_allowed)
|
||||
alien_infestation()
|
||||
message_admins("[key_name_admin(usr)] has spawned aliens", 1)
|
||||
if("prison_break")
|
||||
message_admins("[key_name_admin(usr)] has allowed a prison break", 1)
|
||||
prison_break()
|
||||
if("virus")
|
||||
if(alert("Do you want this to be a random disease or do you have something in mind?",,"Random","Choose")=="Random")
|
||||
viral_outbreak()
|
||||
@@ -1612,6 +1615,7 @@ var/showadminmessages = 1
|
||||
<A href='?src=\ref[src];secretsfun=timeanomalies'>Spawn wormholes (Untested)</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=goblob'>Spawn magma(Untested)</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=aliens'>Trigger an Alien infestation</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=prison_break'>Trigger a Prison Break</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=virus'>Trigger a Virus Outbreak</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=flicklights'>Ghost Mode</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=cleanexcrement'>Remove all urine/poo from station</A><BR>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 42 KiB |
+6426
-6420
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user