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

stuff #161

Merged
merged 6 commits into from
Jun 27, 2021
Merged

stuff #161

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
307 changes: 152 additions & 155 deletions _maps/map_files/debug/8 Singularity Round (4v4).dmm

Large diffs are not rendered by default.

8,017 changes: 3,870 additions & 4,147 deletions _maps/map_files/debug/9 Spaceman Feud Round (4v4).dmm

Large diffs are not rendered by default.

283 changes: 152 additions & 131 deletions _maps/map_files/debug/runtimestation.dmm

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions code/controllers/subsystem/events.dm
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ SUBSYSTEM_DEF(events)

//sets up the holidays and holidays list
/datum/controller/subsystem/events/proc/getHoliday()
#ifdef EVENTMODE
return
#endif
if(!CONFIG_GET(flag/allow_holidays))
return // Holiday stuff was not enabled in the config!
for(var/H in subtypesof(/datum/holiday))
Expand Down
13 changes: 9 additions & 4 deletions code/controllers/subsystem/vote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ SUBSYSTEM_DEF(vote)
var/question
var/started_time
var/time_remaining
var/period
var/list/voted = list()
var/list/voting = list()

// Called by master_controller
/datum/controller/subsystem/vote/fire()
if(!mode)
return
time_remaining = round((started_time + CONFIG_GET(number/vote_period) - world.time)/10)
time_remaining = round((started_time + period - world.time)/10)
if(time_remaining < 0)
result()
SStgui.close_uis(src)
Expand Down Expand Up @@ -196,23 +197,27 @@ SUBSYSTEM_DEF(vote)
question = stripped_input(usr,"What is the vote for?")
if(!question)
return FALSE
period = input(usr,"Set a custom time (in seconds) or hit cancel to use config time") as num|null
if(isnum(period))
period *= 10
for(var/i=1,i<=10,i++)
var/option = capitalize(stripped_input(usr,"Please enter an option or hit cancel to finish"))
if(!option || mode || !usr.client)
break
choices.Add(option)
else
return FALSE
if(!period)
period = CONFIG_GET(number/vote_period)
mode = vote_type
initiator = initiator_key
started_time = world.time
var/text = "[capitalize(mode)] vote started by [initiator || "CentCom"]."
if(mode == "custom")
text += "\n[question]"
log_vote(text)
var/vp = CONFIG_GET(number/vote_period)
to_chat(world, "\n<span class='infoplain'><font color='purple'><b>[text]</b>\nType <b>vote</b> or click <a href='byond://winset?command=vote'>here</a> to place your votes.\nYou have [DisplayTimeText(vp)] to vote.</font></span>")
time_remaining = round(vp/10)
to_chat(world, "\n<span class='infoplain'><font color='purple'><b>[text]</b>\nType <b>vote</b> or click <a href='byond://winset?command=vote'>here</a> to place your votes.\nYou have [DisplayTimeText(period)] to vote.</font></span>")
time_remaining = round(period/10)
for(var/c in GLOB.clients)
var/client/C = c
var/datum/action/vote/V = new
Expand Down
3 changes: 0 additions & 3 deletions code/datums/event/_contestant.dm
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@
//return

var/mob/oldbody = get_mob()
if(oldbody && !isobserver(oldbody))
testing("Spawning in [ckey] even though already in body [oldbody]")
//return

var/mob/living/carbon/human/M = new/mob/living/carbon/human(get_turf(spawnpoint))
if(oldbody?.client) // debug testing with empty contestant datums
Expand Down
8 changes: 1 addition & 7 deletions code/datums/event/_team.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
var/datum/roster/the_roster = GLOB.global_roster
if(!the_roster)
CRASH("Tried querying to add member to a team, but there's no roster???")
return

if(!the_roster.active_contestants)
to_chat(user, span_warning("ERROR: No active eligible contestants. If you want to add someone who is eliminated, please un-eliminate them first."))
Expand Down Expand Up @@ -154,11 +153,6 @@
message_admins("[key_name_admin(user)] has spawned [src]!")
log_game("[key_name_admin(user)] has spawned [src]!")

var/successes = 0
for(var/datum/contestant/iter_member in members)
var/obj/machinery/arena_spawn/random_spawn = pick(spawnpoints)
if(iter_member.spawn_this_contestant(random_spawn))
successes++

testing("Team [src]: [successes]/[LAZYLEN(members)] spawned!")

iter_member.spawn_this_contestant(random_spawn)
91 changes: 87 additions & 4 deletions code/game/machinery/scrungulo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -740,14 +740,97 @@
. += "<span class='terminal'>3. Anchor, wire and screw the parts of the accelerator.</span>"
. += "<span class='terminal'>4. Anchor and power the PACmans.</span>"
. += "<span class='terminal'>5. Weld the field generators and power them with emitters.</span>"
. += "<span class='terminal'>6. Use your team beacon in the other team's room to make the singularity home on it.</span>"
. += "<span class='terminal'>7. Configure and turn on the particle accelerator.</span>"
. += "<span class='terminal'>8. Once the singularity reaches the third stage, turn off the emitters.</span>"
. += "<span class='terminal'>9. Hide in the locker shelter.</span>"
. += "<span class='terminal'>6. Configure and turn on the particle accelerator.</span>"
. += "<span class='terminal'>7. Reach stage three, the further objectives are optional.</span>"
. += "<span class='terminal'>8. Use your team beacon in the other team's room to make the singularity home on it.</span>"
. += "<span class='terminal'>9. Turn off the emitters and hide in the locker shelter.</span>"
. += "<span class='terminal'>10. Don't die!</span>"

#undef PA_CONSTRUCTION_UNSECURED
#undef PA_CONSTRUCTION_UNWIRED
#undef PA_CONSTRUCTION_PANEL_OPEN
#undef PA_CONSTRUCTION_COMPLETE

GLOBAL_LIST_EMPTY(feud_buttons)

/obj/structure/feudbutton
name = "big red button"
desc = "A big, plastic red button."
icon = 'icons/obj/assemblies.dmi'
icon_state = "bigred"
pixel_y = 4
anchored = TRUE
resistance_flags = INDESTRUCTIBLE
light_color = LIGHT_COLOR_FLARE
var/obj/structure/feudsign/sign

/obj/structure/feudbutton/Initialize()
. = ..()
GLOB.feud_buttons |= src

/obj/structure/feudbutton/Destroy()
. = ..()
GLOB.feud_buttons &= ~src

/obj/structure/feudbutton/attack_hand(mob/living/user)
. = ..()
if(!sign.button_ready)
return
sign.button_ready = FALSE
playsound(src, 'sound/machines/buzz-sigh.ogg', 100, FALSE)
balloon_alert_to_viewers("ping!")

/obj/structure/feudsign
name = "feud board"
desc = "Holds the secrets of the universe."
icon = 'icons/obj/status_display.dmi'
icon_state = "frame"
anchored = TRUE
var/button_ready = TRUE
var/strike_counter = 0

/obj/structure/feudsign/Initialize()
. = ..()
var/obj/item/feudcontrol/button = new /obj/item/feudcontrol(get_turf(src))
button.sign = src
return INITIALIZE_HINT_LATELOAD

/obj/structure/feudsign/LateInitialize()
. = ..()
for(var/obj/structure/feudbutton/button in GLOB.feud_buttons)
button.sign = src

/obj/structure/feudsign/proc/get_input(input, obj/item/feudcontrol/source)
if(!COOLDOWN_FINISHED(source, button_cd))
return
if(input == "right")
playsound(src, 'sound/machines/ping.ogg', 100, FALSE)
add_overlay("right")
if(input == "wrong")
strike_counter += 1
playsound(src, 'sound/machines/scanbuzz.ogg', 100, FALSE)
add_overlay("wrong[strike_counter]")
if(strike_counter == 3)
strike_counter = 0
addtimer(CALLBACK(src, .proc/reset), 1 SECONDS)
COOLDOWN_START(source, button_cd, 1.5 SECONDS)

/obj/structure/feudsign/proc/reset()
cut_overlays()
button_ready = TRUE

/obj/item/feudcontrol
name = "feud control button"
icon_state = "timer-igniter0"
icon = 'icons/obj/assemblies.dmi'
w_class = WEIGHT_CLASS_TINY
var/obj/structure/feudsign/sign
COOLDOWN_DECLARE(button_cd)

/obj/item/feudcontrol/attack_self(mob/user, modifiers)
. = ..()
sign.get_input("right", src)

/obj/item/feudcontrol/attack_self_secondary(mob/user, modifiers)
. = ..()
sign.get_input("wrong", src)
11 changes: 11 additions & 0 deletions code/game/machinery/syndicatebeacon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
for (var/_singulo in GLOB.singularities)
var/datum/component/singularity/singulo = _singulo
var/atom/singulo_atom = singulo.parent
if(istype(singulo_atom, /obj/singularity))
var/obj/singularity/real_deal = singulo_atom
if(team != real_deal.team)
continue
if(singulo_atom.z == z)
singulo.target = src
icon_state = "[icontype]1"
Expand Down Expand Up @@ -102,6 +106,10 @@
for(var/_singulo_component in GLOB.singularities)
var/datum/component/singularity/singulo_component = _singulo_component
var/atom/singulo = singulo_component.parent
if(istype(singulo, /obj/singularity))
var/obj/singularity/real_deal = singulo
if(team != real_deal.team)
continue
if(singulo.z == z)
say("[singulo] is now [get_dist(src,singulo)] standard lengths away to the [dir2text(get_dir(src,singulo))]")
else
Expand All @@ -120,6 +128,9 @@
. = ..()
Activate()

/obj/machinery/power/singularity_beacon/team/singularity_pull()
return

/obj/machinery/power/singularity_beacon/team/red
name = "red team singularity beacon"
team = "red"
Expand Down
7 changes: 7 additions & 0 deletions code/modules/power/singularity/containment_field.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
// Used for overriding certain procs

/obj/machinery/field
var/team
var/hasShocked = FALSE //Used to add a delay between shocks. In some cases this used to crash servers by spawning hundreds of sparks every second.

/obj/machinery/field/Bumped(atom/movable/mover)
Expand Down Expand Up @@ -151,3 +152,9 @@
var/atom/target = get_edge_target_turf(AM, get_dir(src, get_step_away(AM, src)))
AM.throw_at(target, 200, 4)
addtimer(CALLBACK(src, .proc/clear_shock), 5)

/obj/machinery/field/containment/red
team = "red"

/obj/machinery/field/containment/green
team = "green"
11 changes: 10 additions & 1 deletion code/modules/power/singularity/field_generator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ no power level overlay is currently in the overlays list.
var/list/obj/machinery/field/containment/fields
var/list/obj/machinery/field/generator/connected_gens
var/clean_up = 0
var/containment_type = /obj/machinery/field/containment

/obj/machinery/field/generator/update_overlays()
. = ..()
Expand Down Expand Up @@ -311,7 +312,7 @@ no power level overlay is currently in the overlays list.
var/field_dir = get_dir(T,get_step(G.loc, NSEW))
T = get_step(T, NSEW)
if(!locate(/obj/machinery/field/containment) in T)
var/obj/machinery/field/containment/CF = new(T)
var/obj/machinery/field/containment/CF = new containment_type(T)
CF.set_master(src,G)
CF.setDir(field_dir)
fields += CF
Expand Down Expand Up @@ -396,6 +397,14 @@ no power level overlay is currently in the overlays list.
if(fields.len)
..()

/obj/machinery/field/generator/anchored/red
team = "red"
containment_type = /obj/machinery/field/containment/red

/obj/machinery/field/generator/anchored/green
team = "green"
containment_type = /obj/machinery/field/containment/green

#undef FG_UNSECURED
#undef FG_SECURED
#undef FG_WELDED
Expand Down
8 changes: 6 additions & 2 deletions code/modules/power/singularity/singularity.dm
Original file line number Diff line number Diff line change
Expand Up @@ -346,11 +346,15 @@
/obj/singularity/proc/can_move(turf/T)
if(!T)
return FALSE
if((locate(/obj/machinery/field/containment) in T)||(locate(/obj/machinery/shieldwall) in T))
if(locate(/obj/machinery/shieldwall) in T)
return FALSE
else if(locate(/obj/machinery/field/containment) in T)
var/obj/machinery/field/containment/C = locate(/obj/machinery/field/containment) in T
if(C?.team != team)
return FALSE
else if(locate(/obj/machinery/field/generator) in T)
var/obj/machinery/field/generator/G = locate(/obj/machinery/field/generator) in T
if(G?.active)
if(G?.active || G?.team != team)
return FALSE
else if(locate(/obj/machinery/power/shieldwallgen) in T)
var/obj/machinery/power/shieldwallgen/S = locate(/obj/machinery/power/shieldwallgen) in T
Expand Down
Binary file modified icons/obj/status_display.dmi
Binary file not shown.