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 10 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
49 changes: 26 additions & 23 deletions code/modules/shuttle/emergency.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
var/hijack_hacking = FALSE
var/hijack_announce = TRUE

// measures the last world time the emag event triggered
var/emaglast
etherware-novice marked this conversation as resolved.
Show resolved Hide resolved
// the actual time until emag again
var/emagcooldown = 20
etherware-novice marked this conversation as resolved.
Show resolved Hide resolved

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


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

if (cut_time * 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(cut_time)
etherware-novice marked this conversation as resolved.
Show resolved Hide resolved
if (cut_time > 1) // providing launch updates if it changes (doesnt roll a 2)
etherware-novice marked this conversation as resolved.
Show resolved Hide resolved
minor_announce("Launch timer corrupted, restarting timer at earlier point..", "SYSTEM ERROR:")
else if (cut_time < 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 +282,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,30 +291,10 @@
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
for(var/i in 1 to 10)
// the shuttle system doesn't know who these people are, but they
// must be important, surely
var/obj/item/card/id/ID = new(src)
var/datum/job/J = pick(SSjob.occupations)
ID.registered_name = S.random_name(pick(MALE, FEMALE))
ID.assignment = J.title

authorized += ID

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

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

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.