Skip to content

Commit

Permalink
Merge pull request #152 from wraith-54321/stream-events
Browse files Browse the repository at this point in the history
  • Loading branch information
Zonespace27 authored Jul 29, 2023
2 parents 090a5da + cd9139f commit 02dcc25
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 2 deletions.
19 changes: 19 additions & 0 deletions monkestation/code/modules/twitch_bits/events/australia_mode.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/datum/twitch_event/australia_mode
event_name = "Australia Mode"
event_duration = 15 MINUTES //effect is very minor so it lasts for a while
event_flags = TWITCH_AFFECTS_ALL
id_tag = "australia-mode"

/datum/twitch_event/australia_mode/run_event(name)
. = ..()

for(var/mob/living/target in targets)
var/matrix/m180 = matrix(target.transform)
m180.Turn(180)
animate(target, transform = m180, time = 3)

/datum/twitch_event/australia_mode/end_event()
for(var/mob/living/target in targets) //I would like to figure out a way to make this check first but this should work for now
var/matrix/m180 = matrix(target.transform)
m180.Turn(180)
animate(target, transform = m180, time = 3)
7 changes: 5 additions & 2 deletions monkestation/code/modules/twitch_bits/events/base_event.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
var/random_count = 0
///list of targets
var/list/targets = list()
///the tag tied to this event
///the tag tied to this event, should make these be defines at some point
var/id_tag
///should we announce this event
var/announce = TRUE

/datum/twitch_event/proc/run_event(name)
if(event_flags & TWITCH_AFFECTS_STREAMER)
Expand All @@ -26,7 +28,8 @@
targets += picked
living_players -= picked

minor_announce("[event_name] has just been triggered by [name].", "The Observers")
if(announce)
minor_announce("[event_name] has just been triggered by [name].", "The Observers")

/datum/twitch_event/proc/end_event()
return
21 changes: 21 additions & 0 deletions monkestation/code/modules/twitch_bits/events/die_fate.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/datum/twitch_event/free_wiz
event_name = "Change Ook's Fate"
event_duration = 1 SECONDS
event_flags = TWITCH_AFFECTS_STREAMER
id_tag = "ook-die-fate"

/datum/twitch_event/free_wiz/run_event(name)
. = ..()

for(var/target in targets)
var/mob/living/future_wiz = target
var/obj/item/dice/d20/fate/one_use/the_die = new(get_turf(future_wiz))
future_wiz.put_in_hands(the_die)
to_chat(future_wiz, span_warning("Something apears in your hand and- oh no you fumbled it. That can't be good."))
the_die.diceroll(future_wiz)

//this is more of a joke, could maybe cost 100k bits or something
/datum/twitch_event/free_wiz/everyone
event_name = "Change Everyone's Fate"
event_flags = TWITCH_AFFECTS_ALL
id_tag = "everyone-die-fate"
14 changes: 14 additions & 0 deletions monkestation/code/modules/twitch_bits/events/random_item.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/datum/twitch_event/give_smsword
event_name = "Give Ook Random Item"
event_duration = 1 SECONDS
event_flags = TWITCH_AFFECTS_STREAMER
id_tag = "give-ook-item"

/datum/twitch_event/give_smsword/run_event(name)
. = ..()

for(var/target in targets)
var/mob/living/debug_uplink_reciever = target
var/obj/item/gamer_item = pick(subtypesof(/obj/item))
gamer_item = new gamer_item()
debug_uplink_reciever.put_in_hands(gamer_item)
13 changes: 13 additions & 0 deletions monkestation/code/modules/twitch_bits/events/rod.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/datum/twitch_event/clang
event_name = "Immovable Rod Ook"
event_duration = 1 SECONDS
event_flags = TWITCH_AFFECTS_STREAMER
id_tag = "rod-ook"
announce = FALSE //takes a while to reach its target so dont announce it

/datum/twitch_event/clang/run_event(name)
. = ..()

for(var/target in targets) //send a rod at the turf of all targets, not making it target them directly because thats just death
var/turf/target_turf = get_turf(target)
new /obj/effect/immovablerod(spaceDebrisStartLoc(pick(GLOB.cardinals), target_turf.z), target)
4 changes: 4 additions & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -5813,9 +5813,13 @@
#include "monkestation\code\modules\twitch_bits\twitch_system.dm"
#include "monkestation\code\modules\twitch_bits\events\amongus.dm"
#include "monkestation\code\modules\twitch_bits\events\anime_ook.dm"
#include "monkestation\code\modules\twitch_bits\events\australia_mode.dm"
#include "monkestation\code\modules\twitch_bits\events\base_event.dm"
#include "monkestation\code\modules\twitch_bits\events\buff.dm"
#include "monkestation\code\modules\twitch_bits\events\chuckle_nut.dm"
#include "monkestation\code\modules\twitch_bits\events\die_fate.dm"
#include "monkestation\code\modules\twitch_bits\events\random_item.dm"
#include "monkestation\code\modules\twitch_bits\events\rod.dm"
#include "monkestation\code\modules\twitch_bits\events\skinny.dm"
#include "monkestation\code\modules\uplink\uplink_items\job.dm"
#include "monkestation\code\modules\vehicles\monkey_ball.dm"
Expand Down

0 comments on commit 02dcc25

Please sign in to comment.