mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
Updated nuke mode a bit. The main changes are to the nuke shuttle.
The nuke shuttle now has no restrictions (except a cooldown) on movement, and can be piloted to any location. It also travels through hyperspace. Nuke lockers and such now start on the shuttle, rather than spawning on landmarks. (with the exception of the bomb, and the uplink locker) git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5141 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -459,6 +459,10 @@ proc/process_ghost_teleport_locs()
|
||||
name = "\improper Syndicate Station Location 6"
|
||||
icon_state = "green"
|
||||
|
||||
/area/syndicate_station/transit
|
||||
name = "\improper Syndicate Station Transit"
|
||||
icon_state = "shuttle"
|
||||
|
||||
/area/wizard_station
|
||||
name = "\improper Wizard's Den"
|
||||
icon_state = "yellow"
|
||||
|
||||
@@ -33,8 +33,6 @@
|
||||
var/list/possible_syndicates = get_players_for_role(BE_OPERATIVE)
|
||||
var/agent_number = 0
|
||||
|
||||
syndicate_begin()
|
||||
|
||||
if(possible_syndicates.len < 1)
|
||||
return 0
|
||||
|
||||
@@ -112,23 +110,13 @@
|
||||
var/list/turf/synd_spawn = list()
|
||||
|
||||
for(var/obj/effect/landmark/A in landmarks_list)
|
||||
if (A.name == "Syndicate-Gear-Closet")
|
||||
new /obj/structure/closet/syndicate/personal(A.loc)
|
||||
del(A)
|
||||
continue
|
||||
|
||||
if (A.name == "Syndicate-Bomb")
|
||||
new /obj/effect/spawner/newbomb/timer/syndicate(A.loc)
|
||||
del(A)
|
||||
continue
|
||||
|
||||
if(A.name == "Syndicate-Spawn")
|
||||
synd_spawn += get_turf(A)
|
||||
del(A)
|
||||
continue
|
||||
|
||||
var/obj/effect/landmark/uplinklocker = locate("landmark*Syndicate-Uplink") //i will be rewriting this shortly
|
||||
var/obj/effect/landmark/nuke_spawn = locate("landmark*Nuclear-Bomb")
|
||||
var/obj/effect/landmark/closet_spawn = locate("landmark*Nuclear-Closet")
|
||||
|
||||
var/nuke_code = "[rand(10000, 99999)]"
|
||||
var/leader_selected = 0
|
||||
@@ -155,13 +143,12 @@
|
||||
|
||||
update_all_synd_icons()
|
||||
|
||||
if(uplinklocker)
|
||||
new /obj/structure/closet/syndicate/nuclear(uplinklocker.loc)
|
||||
if(nuke_spawn && synd_spawn.len > 0)
|
||||
var/obj/machinery/nuclearbomb/the_bomb = new /obj/machinery/nuclearbomb(nuke_spawn.loc)
|
||||
the_bomb.r_code = nuke_code
|
||||
|
||||
if(closet_spawn)
|
||||
new /obj/structure/closet/syndicate/nuclear(closet_spawn.loc)
|
||||
|
||||
spawn (rand(waittime_l, waittime_h))
|
||||
send_intercept()
|
||||
|
||||
@@ -189,7 +176,6 @@
|
||||
|
||||
else
|
||||
nuke_code = "code will be provided later"
|
||||
synd_mind.current << "Nuclear Explosives 101:\n\tHello and thank you for choosing the Syndicate for your nuclear information needs.\nToday's crash course will deal with the operation of a Fusion Class Nanotrasen made Nuclear Device.\nFirst and foremost, DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE.\nPressing any button on the compacted bomb will cause it to extend and bolt itself into place.\nIf this is done to unbolt it one must compeltely log in which at this time may not be possible.\nTo make the device functional:\n1. Place bomb in designated detonation zone\n2. Extend and anchor bomb (attack with hand).\n3. Insert Nuclear Auth. Disk into slot.\n4. Type numeric code into keypad ([nuke_code]).\n\tNote: If you make a mistake press R to reset the device.\n5. Press the E button to log onto the device\nYou now have activated the device. To deactivate the buttons at anytime for example when\nyou've already prepped the bomb for detonation remove the auth disk OR press the R ont he keypad.\nNow the bomb CAN ONLY be detonated using the timer. A manual det. is not an option.\n\tNote: Nanotrasen is a pain in the neck.\nToggle off the SAFETY.\n\tNote: You wouldn't believe how many Syndicate Operatives with doctorates have forgotten this step\nSo use the - - and + + to set a det time between 5 seconds and 10 minutes.\nThen press the timer toggle button to start the countdown.\nNow remove the auth. disk so that the buttons deactivate.\n\tNote: THE BOMB IS STILL SET AND WILL DETONATE\nNow before you remove the disk if you need to move the bomb you can:\nToggle off the anchor, move it, and re-anchor.\n\nGood luck. Remember the order:\nDisk, Code, Safety, Timer, Disk, RUN!\nIntelligence Analysts believe that they are hiding the disk in the bridge. Your space ship will not leave until the bomb is armed and timing.\nGood luck!"
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
var/bomb_set
|
||||
|
||||
/obj/machinery/nuclearbomb
|
||||
name = "\improper Nuclear Fission Explosive"
|
||||
desc = "Uh oh. RUN!!!!"
|
||||
@@ -192,9 +194,11 @@
|
||||
else
|
||||
off_station = 2
|
||||
|
||||
if (ticker)
|
||||
if(ticker)
|
||||
if(ticker.mode && ticker.mode.name == "nuclear emergency")
|
||||
ticker.mode:syndies_didnt_escape = syndicate_station_at_station
|
||||
var/obj/machinery/computer/syndicate_station/syndie_location = locate(/obj/machinery/computer/syndicate_station)
|
||||
if(syndie_location)
|
||||
ticker.mode:syndies_didnt_escape = (syndie_location.z > 1 ? 0 : 1) //muskets will make me change this, but it will do for now
|
||||
ticker.mode:nuke_off_station = off_station
|
||||
ticker.station_explosion_cinematic(off_station,null)
|
||||
if(ticker.mode)
|
||||
|
||||
@@ -1,218 +1,94 @@
|
||||
//config stuff
|
||||
#define SYNDICATE_DOCKZ 5 //Z-level of the Dock.
|
||||
#define SYNDICATE_STATIONZ 1 //Z-level of the Station.
|
||||
#define SYNDICATE_MOVETIME 150 //Time to station is milliseconds.
|
||||
#define SYNDICATE_STATION_AREATYPE "/area/syndicate_station/start" //Type of for station
|
||||
#define SYNDICATE_DOCK_AREATYPE 0 //Type of area for dock
|
||||
|
||||
var/syndicate_station_moving_to_station = 0
|
||||
var/syndicate_station_moving_to_space = 0
|
||||
var/syndicate_station_at_station = 0
|
||||
var/syndicate_station_can_send = 1
|
||||
var/syndicate_station_time = 0
|
||||
var/syndicate_station_timeleft = 0
|
||||
var/area/syndicate_loc = null
|
||||
var/syndicate_out_of_moves = 0
|
||||
var/bomb_set = 1
|
||||
#define SYNDICATE_SHUTTLE_MOVE_TIME 240
|
||||
#define SYNDICATE_SHUTTLE_COOLDOWN 200
|
||||
|
||||
/obj/machinery/computer/syndicate_station
|
||||
name = "Syndicate Station Terminal"
|
||||
name = "syndicate shuttle terminal"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "syndishuttle"
|
||||
req_access = list()
|
||||
var/temp = null
|
||||
var/hacked = 0
|
||||
var/allowedtocall = 0
|
||||
var/syndicate_break = 0
|
||||
|
||||
/proc/syndicate_begin()
|
||||
switch(rand(1,6))
|
||||
if(1)
|
||||
syndicate_loc = locate(/area/syndicate_station/one)
|
||||
if(2)
|
||||
syndicate_loc = locate(/area/syndicate_station/two)
|
||||
if(3)
|
||||
syndicate_loc = locate(/area/syndicate_station/three)
|
||||
if(4)
|
||||
syndicate_loc = locate(/area/syndicate_station/four)
|
||||
if(5)
|
||||
syndicate_loc = locate(/area/syndicate_station/five)
|
||||
if(6)
|
||||
syndicate_loc = locate(/area/syndicate_station/six)
|
||||
|
||||
/proc/syndicate_process()
|
||||
while(syndicate_station_time - world.timeofday > 0)
|
||||
var/ticksleft = syndicate_station_time - world.timeofday
|
||||
|
||||
if(ticksleft > 1e5)
|
||||
syndicate_station_time = world.timeofday + 10 // midnight rollover
|
||||
var/area/curr_location
|
||||
var/moving = 0
|
||||
var/lastMove = 0
|
||||
|
||||
|
||||
syndicate_station_timeleft = (ticksleft / 10)
|
||||
sleep(5)
|
||||
syndicate_station_moving_to_station = 0
|
||||
syndicate_station_moving_to_space = 0
|
||||
|
||||
switch(syndicate_station_at_station)
|
||||
if(0)
|
||||
syndicate_station_at_station = 1
|
||||
if (syndicate_station_moving_to_station || syndicate_station_moving_to_space) return
|
||||
|
||||
if (!syndicate_can_move())
|
||||
usr << "\red The syndicate shuttle is unable to leave."
|
||||
return
|
||||
|
||||
var/area/start_location = locate(/area/syndicate_station/start)
|
||||
var/area/end_location = syndicate_loc
|
||||
|
||||
var/list/dstturfs = list()
|
||||
var/throwy = world.maxy
|
||||
|
||||
for(var/turf/T in end_location)
|
||||
dstturfs += T
|
||||
if(T.y < throwy)
|
||||
throwy = T.y
|
||||
|
||||
// hey you, get out of the way!
|
||||
for(var/turf/T in dstturfs)
|
||||
// find the turf to move things to
|
||||
var/turf/D = locate(T.x, throwy - 1, 1)
|
||||
//var/turf/E = get_step(D, SOUTH)
|
||||
for(var/atom/movable/AM as mob|obj in T)
|
||||
AM.Move(D)
|
||||
if(istype(T, /turf/simulated))
|
||||
del(T)
|
||||
|
||||
start_location.move_contents_to(end_location)
|
||||
bomb_set = 0
|
||||
/obj/machinery/computer/syndicate_station/New()
|
||||
curr_location= locate(/area/syndicate_station/start)
|
||||
|
||||
|
||||
/obj/machinery/computer/syndicate_station/proc/syndicate_move_to(area/destination as area)
|
||||
if(moving) return
|
||||
if(lastMove + SYNDICATE_SHUTTLE_COOLDOWN > world.time) return
|
||||
var/area/dest_location = locate(destination)
|
||||
if(curr_location == dest_location) return
|
||||
|
||||
if(1)
|
||||
syndicate_station_at_station = 0
|
||||
if (syndicate_station_moving_to_station || syndicate_station_moving_to_space) return
|
||||
moving = 1
|
||||
lastMove = world.time
|
||||
|
||||
if (!syndicate_can_move())
|
||||
usr << "\red The syndicate shuttle is unable to leave."
|
||||
return
|
||||
if(curr_location.z != dest_location.z)
|
||||
var/area/transit_location = locate(/area/syndicate_station/transit)
|
||||
curr_location.move_contents_to(transit_location)
|
||||
curr_location = transit_location
|
||||
sleep(SYNDICATE_SHUTTLE_MOVE_TIME)
|
||||
|
||||
var/area/start_location = syndicate_loc
|
||||
var/area/end_location = locate(/area/syndicate_station/start)
|
||||
curr_location.move_contents_to(dest_location)
|
||||
curr_location = dest_location
|
||||
moving = 0
|
||||
return 1
|
||||
|
||||
var/list/dstturfs = list()
|
||||
var/throwy = world.maxy
|
||||
|
||||
for(var/turf/T in end_location)
|
||||
dstturfs += T
|
||||
if(T.y < throwy)
|
||||
throwy = T.y
|
||||
/obj/machinery/computer/syndicate_station/attackby(obj/item/I as obj, mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
// hey you, get out of the way!
|
||||
for(var/turf/T in dstturfs)
|
||||
// find the turf to move things to
|
||||
var/turf/D = locate(T.x, throwy - 1, 1)
|
||||
//var/turf/E = get_step(D, SOUTH)
|
||||
for(var/atom/movable/AM as mob|obj in T)
|
||||
AM.Move(D)
|
||||
if(istype(T, /turf/simulated))
|
||||
del(T)
|
||||
/obj/machinery/computer/syndicate_station/attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
start_location.move_contents_to(end_location)
|
||||
syndicate_out_of_moves = 1
|
||||
/obj/machinery/computer/syndicate_station/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/proc/syndicate_can_move()
|
||||
//world << "moving_to_station = [syndicate_station_moving_to_station]; moving_to_space = [syndicate_station_moving_to_space]; out_of_moves = [syndicate_out_of_moves]; bomb_set = [bomb_set]; "
|
||||
if(syndicate_station_moving_to_station || syndicate_station_moving_to_space) return 0
|
||||
if(syndicate_out_of_moves) return 0
|
||||
if(!bomb_set) return 0
|
||||
else return 1
|
||||
|
||||
/obj/machinery/computer/syndicate_station/attackby(I as obj, user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/syndicate_station/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/syndicate_station/attack_paw(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/syndicate_station/attackby(I as obj, user as mob)
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
user << "\blue Nothing happens."
|
||||
else
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/syndicate_station/attack_hand(var/mob/user as mob)
|
||||
if(!src.allowed(user))
|
||||
user << "\red Access Denied."
|
||||
/obj/machinery/computer/syndicate_station/attack_hand(mob/user as mob)
|
||||
if(!allowed(user))
|
||||
user << "<span class='notice'>Access Denied.</span>"
|
||||
return
|
||||
|
||||
if(syndicate_break)
|
||||
user << "\red Unable to locate shuttle."
|
||||
return
|
||||
|
||||
if(..())
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
if (src.temp)
|
||||
dat = src.temp
|
||||
else
|
||||
dat += {"<BR><B>Syndicate Shuttle</B><HR>
|
||||
\nLocation: [syndicate_station_moving_to_station || syndicate_station_moving_to_space ? "Moving to station ([syndicate_station_timeleft] Secs.)":syndicate_station_at_station ? "Station":"Space"]<BR>
|
||||
[syndicate_station_moving_to_station || syndicate_station_moving_to_space ? "\n*Shuttle already called*<BR>\n<BR>":syndicate_station_at_station ? "\n<A href='?src=\ref[src];sendtospace=1'>Send to space</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>"}
|
||||
|
||||
var/dat = {"Location: [curr_location]<br>
|
||||
<a href='?src=\ref[src];syndicate=1'>Syndicate Space</a><br>
|
||||
<a href='?src=\ref[src];station_nw=1'>North West of SS13</a> |
|
||||
<a href='?src=\ref[src];station_n=1'>North of SS13</a> |
|
||||
<a href='?src=\ref[src];station_ne=1'>North East of SS13</a><br>
|
||||
<a href='?src=\ref[src];station_sw=1'>South West of SS13</a> |
|
||||
<a href='?src=\ref[src];station_s=1'>South of SS13</a> |
|
||||
<a href='?src=\ref[src];station_se=1'>South East of SS13</a><br>
|
||||
<a href='?src=\ref[user];mach_close=computer'>Close</a>"}
|
||||
|
||||
user << browse(dat, "window=computer;size=575x450")
|
||||
onclose(user, "computer")
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/computer/syndicate_station/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(!isliving(usr)) return
|
||||
var/mob/living/user = usr
|
||||
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
usr.set_machine(src)
|
||||
if(in_range(src, user) || istype(user, /mob/living/silicon))
|
||||
user.set_machine(src)
|
||||
|
||||
if (href_list["sendtospace"])
|
||||
if(!syndicate_station_at_station|| syndicate_station_moving_to_station || syndicate_station_moving_to_space) return
|
||||
if(href_list["syndicate"])
|
||||
syndicate_move_to(/area/syndicate_station/start)
|
||||
else if(href_list["station_nw"])
|
||||
syndicate_move_to(/area/syndicate_station/two)
|
||||
else if(href_list["station_n"])
|
||||
syndicate_move_to(/area/syndicate_station/five)
|
||||
else if(href_list["station_ne"])
|
||||
syndicate_move_to(/area/syndicate_station/three)
|
||||
else if(href_list["station_sw"])
|
||||
syndicate_move_to(/area/syndicate_station/one)
|
||||
else if(href_list["station_s"])
|
||||
syndicate_move_to(/area/syndicate_station/six)
|
||||
else if(href_list["station_se"])
|
||||
syndicate_move_to(/area/syndicate_station/four)
|
||||
|
||||
if (!syndicate_can_move())
|
||||
usr << "\red The syndicate shuttle is unable to leave."
|
||||
return
|
||||
|
||||
usr << "\blue The syndicate shuttle will move in [(PRISON_MOVETIME/10)] seconds."
|
||||
|
||||
src.temp += "Shuttle sent.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
||||
src.updateUsrDialog()
|
||||
|
||||
syndicate_station_moving_to_space = 1
|
||||
|
||||
syndicate_station_time = world.timeofday + SYNDICATE_MOVETIME
|
||||
spawn(0)
|
||||
syndicate_process()
|
||||
|
||||
else if (href_list["sendtostation"])
|
||||
if(syndicate_station_at_station || syndicate_station_moving_to_station || syndicate_station_moving_to_space) return
|
||||
|
||||
if (!syndicate_can_move())
|
||||
usr << "\red The syndicate shuttle is unable to leave."
|
||||
return
|
||||
|
||||
usr << "\blue The syndicate shuttle will move in [(SYNDICATE_MOVETIME/10)] seconds."
|
||||
|
||||
src.temp += "Shuttle sent.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
||||
src.updateUsrDialog()
|
||||
|
||||
syndicate_station_moving_to_station = 1
|
||||
|
||||
syndicate_station_time = world.timeofday + SYNDICATE_MOVETIME
|
||||
spawn(0)
|
||||
syndicate_process()
|
||||
|
||||
else if (href_list["mainmenu"])
|
||||
src.temp = null
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
add_fingerprint(usr)
|
||||
updateUsrDialog()
|
||||
return
|
||||
@@ -237,7 +237,6 @@ client/proc/one_click_antag()
|
||||
if(candidates.len)
|
||||
var/numagents = 5
|
||||
var/agentcount = 0
|
||||
syndicate_begin()
|
||||
|
||||
for(var/i = 0, i<numagents,i++)
|
||||
shuffle(candidates) //More shuffles means more randoms
|
||||
|
||||
@@ -48,6 +48,13 @@ Stuff which is in development and not yet visible to players or just code relate
|
||||
should be listed in the changelog upon commit tho. Thanks. -->
|
||||
|
||||
<!-- To take advantage of the pretty new format (well it was new when I wrote this anyway), open the "add-to-changelog.html" file in any browser and add the stuff and then generate the html code and paste it here -->
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">21 November 2012</h2>
|
||||
<h3 class="author">Petethegoat updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="rscadd">The nuke shuttle can now travel at will, and to any location. When travelling from syndicate space to the station, (and vice versa), it will travel through hyperspace.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">20 November 2012</h2>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user