Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

Adjusts the Emag's effect on the Emergency Shuttle #541

Closed
Closed
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
58792f6
attempting to fix issue #435
etherware-novice Jul 10, 2022
d133c4e
Merge branch 'Monkestation:master' into master
etherware-novice Jul 10, 2022
0248b8f
ssetting down basics for this
Jul 11, 2022
b3e413e
gets the new shuttle time and sets it
Jul 11, 2022
bfa6f24
fixes it firing twice and causing a huge earthquake
Jul 11, 2022
97c65e1
tracking down the root cause of the double launch
Jul 11, 2022
f7d5bd2
updated to use modTimer instead of setTime
Jul 12, 2022
739a158
fixes the igniting issue! also makes it only repeat *occasionally*
Jul 12, 2022
ab22a27
minor fix ups
Jul 12, 2022
f91fef1
syntaxical fixes
Jul 12, 2022
7381b6d
more moving around and renaming
Jul 12, 2022
3eea0d7
fixes up syntax and actually defines the define
Jul 13, 2022
3b54964
fixes the super() call in Destroy()
Jul 13, 2022
b8d09a1
Merge branch 'Monkestation:master' into emgshuttlefix
etherware-novice Jul 14, 2022
7a8e5cc
fixes the timer mods to use defines instead of hardcoded vals
Jul 14, 2022
8dafaa3
undefs the defs
Jul 14, 2022
ed9cfda
Merge branch 'Monkestation:master' into emgshuttlefix
etherware-novice Jul 15, 2022
93bd5a5
who woulda thought adding authorized users would make it authorize th…
Jul 16, 2022
c9c3cb8
Merge branch 'emgshuttlefix' of https://github.com/etherware-novice/c…
Jul 16, 2022
93ea88a
gotta love it when you put a comma by accident
Jul 16, 2022
576beed
Merge branch 'Monkestation:master' into emgshuttlefix
etherware-novice Jul 16, 2022
a9dfa7b
Update code/modules/shuttle/emergency.dm
etherware-novice Jul 16, 2022
50fcfdb
adjusts time fields and adds early launch msg
Jul 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 30 additions & 8 deletions code/modules/shuttle/emergency.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
var/hijack_completion_flight_time_set = 10 SECONDS //How long in deciseconds to set shuttle's timer after hijack is done.
var/hijack_hacking = FALSE
var/hijack_announce = TRUE
var/emaglast // measures the last world time the emag event triggered
etherware-novice marked this conversation as resolved.
Show resolved Hide resolved
var/emagcooldown = 20 // the actual time until emag again
etherware-novice marked this conversation as resolved.
Show resolved Hide resolved

/obj/machinery/computer/emergency_shuttle/examine(mob/user)
. = ..()
Expand Down Expand Up @@ -175,8 +177,28 @@
if(ENGINES_STARTED || (!IS_DOCKED))
return .


// monkestation addition
if(obj_flags & EMAGGED && (!emaglast || emagcooldown + emaglast < world.time) && prob(50))
var/OLDTIME = TIME_LEFT // for admin logs
etherware-novice marked this conversation as resolved.
Show resolved Hide resolved
var/CUTTIME = rand(1, 5)
CUTTIME = 2 / CUTTIME
etherware-novice marked this conversation as resolved.
Show resolved Hide resolved

if (CUTTIME * TIME_LEFT <= 11)
SSshuttle.emergency.setTimer(ENGINES_START_TIME) // to make it align with igniting
etherware-novice marked this conversation as resolved.
Show resolved Hide resolved
else
SSshuttle.emergency.modTimer(CUTTIME)
if (CUTTIME > 1) // providing launch updates if it changes (doesnt roll a 2)
minor_announce("Launch timer corrupted, restarting timer at earlier point..", "SYSTEM ERROR:")
else if (CUTTIME < 1)
minor_announce("Launch timer corrupted, fast forwarding..", "SYSTEM ERROR:")

emaglast = world.time



// Check to see if we've reached criteria for early launch
if((authorized.len >= auth_need) || (obj_flags & EMAGGED))
if(authorized.len >= auth_need)
// shuttle timers use 1/10th seconds internally
SSshuttle.emergency.setTimer(ENGINES_START_TIME)
var/system_error = obj_flags & EMAGGED ? "SYSTEM ERROR:" : null
Expand Down Expand Up @@ -259,7 +281,7 @@
if(!IS_DOCKED)
return

if((obj_flags & EMAGGED) || ENGINES_STARTED) //SYSTEM ERROR: THE SHUTTLE WILL LA-SYSTEM ERROR: THE SHUTTLE WILL LA-SYSTEM ERROR: THE SHUTTLE WILL LAUNCH IN 10 SECONDS
if(ENGINES_STARTED) //SYSTEM ERROR: THE SHUTTLE WILL LA-SYSTEM ERROR: THE SHUTTLE WILL LA-SYSTEM ERROR: THE SHUTTLE WILL LAUNCH IN 10 SECONDS
to_chat(user, "<span class='warning'>The shuttle is already launching!</span>")
return

Expand All @@ -268,8 +290,8 @@
log_game("[key_name(user)] has emagged the emergency shuttle in [COORD(src)] [time] seconds before launch.")
etherware-novice marked this conversation as resolved.
Show resolved Hide resolved

obj_flags |= EMAGGED
SSshuttle.emergency.movement_force = list("KNOCKDOWN" = 60, "THROW" = 20)//YOUR PUNY SEATBELTS can SAVE YOU NOW, MORTAL
var/datum/species/S = new
etherware-novice marked this conversation as resolved.
Show resolved Hide resolved
SSshuttle.emergency.movement_force = list("KNOCKDOWN" = 60, "THROW" = 20) //YOUR PUNY SEATBELTS can SAVE YOU NOW, MORTAL
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was getting compile errors with this comment so added whitespace to be certain

/* var/datum/species/S = new
etherware-novice marked this conversation as resolved.
Show resolved Hide resolved
for(var/i in 1 to 10)
// the shuttle system doesn't know who these people are, but they
// must be important, surely
Expand All @@ -278,20 +300,20 @@
ID.registered_name = S.random_name(pick(MALE, FEMALE))
ID.assignment = J.title

authorized += ID

// authorized += ID
*/
process(SSMACHINES_DT)

/obj/machinery/computer/emergency_shuttle/Destroy()
// Our fake IDs that the emag generated are just there for colour
// They're not supposed to be accessible

/*
etherware-novice marked this conversation as resolved.
Show resolved Hide resolved
for(var/obj/item/card/id/ID in src)
qdel(ID)
if(authorized?.len)
authorized.Cut()
authorized = null

*/
. = ..()

/obj/docking_port/mobile/emergency
Expand Down
Binary file modified monkestation/icons/mob/catgloves.dmi
Binary file not shown.