Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map Manipulator #656

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions code/controllers/subsystem/nightmare.dm
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ SUBSYSTEM_DEF(nightmare)
var/datum/nmcontext/context = contexts[NIGHTMARE_CTX_GLOBAL]
return context.set_scenario_value(name, value)

/// Returns a list of all currently set values for the scenario.
/datum/controller/subsystem/nightmare/proc/get_scenario_list(stype)
var/datum/nmcontext/context = contexts[stype]
return context.scenario

/// Returns all scenario keys and their possible values for that stype as an associated list of lists.
/datum/controller/subsystem/nightmare/proc/get_directory(stype)
var/datum/nmcontext/context = contexts[stype]
return context.directory

/// Reads a JSON file, returns a branch nmnode representing contents of file
/datum/controller/subsystem/nightmare/proc/load_file(filename, tag)
RETURN_TYPE(/datum/nmnode/branch)
Expand Down
10 changes: 10 additions & 0 deletions code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,16 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list(
return TRUE
return ..(M)

/obj/structure/machinery/door/airlock/proc/break_or_seal(deconstruct_probability = 50)
if(prob(deconstruct_probability)) //Maybe it starts out disassembled instead.
deconstruct(TRUE)
else
if(prob(55))
cut(AIRLOCK_WIRE_DOOR_BOLTS)
if(prob(35))
welded = TRUE
update_icon()

/obj/structure/machinery/door/airlock/proc/break_resin_objects()
var/list/things_to_shmush = locs
for(var/turf/i in things_to_shmush)
Expand Down
7 changes: 7 additions & 0 deletions code/game/machinery/doors/poddoor/poddoor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
closed_layer = PODDOOR_CLOSED_LAYER
///How many tiles the shutter occupies
var/shutter_length = 1
var/signal_id

/obj/structure/machinery/door/poddoor/Initialize()
. = ..()
Expand Down Expand Up @@ -71,6 +72,12 @@
open()
return TRUE

/obj/structure/machinery/door/poddoor/proc/toggle_pod_door(signal_id)
if(id == signal_id)
if(density)
INVOKE_ASYNC(src, PROC_REF(open))
else
INVOKE_ASYNC(src, PROC_REF(close))

/obj/structure/machinery/door/poddoor/try_to_activate_door(mob/user)
return
Expand Down
4 changes: 4 additions & 0 deletions code/game/objects/effects/landmarks/landmarks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@
LAZYREMOVE(GLOB.ert_spawns[type], src)
return ..()

/obj/effect/landmark/tunnel_ambush
name = "xeno ambush"
icon_state = "xeno_ambush"

// Nightmare insert locations
/obj/effect/landmark/nightmare
name = "Nightmare Insert"
Expand Down
9 changes: 9 additions & 0 deletions code/game/objects/structures/gun_rack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@
else
icon_state = "[initial(icon_state)]_0"

/obj/structure/gun_rack/proc/empty_out(number_to_remove = max_stored)
number_to_remove = min(length(contents), number_to_remove) //We don't want our specified mumber, if provided, to be greater than what is actually inside the rack.
for(var/i in src)
if(!number_to_remove--)
break
qdel(i)

update_icon()

/obj/structure/gun_rack/m41
allowed_type = /obj/item/weapon/gun/rifle/m41aMK1
populate_type = /obj/item/weapon/gun/rifle/m41aMK1
Expand Down
Loading
Loading