Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
TaculoTaculo committed Dec 17, 2023
2 parents 2054e27 + 0b9cbb4 commit 3aa6315
Show file tree
Hide file tree
Showing 103 changed files with 2,690 additions and 766 deletions.
Binary file modified ModularTegustation/Teguicons/32x48.dmi
Binary file not shown.
Binary file modified ModularTegustation/Teguicons/64x64.dmi
Binary file not shown.
1,038 changes: 1,038 additions & 0 deletions ModularTegustation/lc13_adventuredatum.dm

Large diffs are not rendered by default.

105 changes: 105 additions & 0 deletions ModularTegustation/lc13_machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,108 @@
if(C.linked_console)
LAZYADD(abnormalities, "[C.AbnormalityInfo()]: [C.relative_location]")
sortList(abnormalities)

/*------------------\
|Text Adventure Code|
\-------------------/
Refer to lc13_adventuredatum.dm for the program code.*/
/obj/machinery/text_adventure_console
name = "adventure console"
desc = "This computer has a program on it that can decrypt abnormality data."
icon = 'icons/obj/machines/research.dmi'
icon_state = "nanite_program_hub"
//Feels weird to make it indestructable but it is a unique machine.
resistance_flags = INDESTRUCTIBLE
anchored = TRUE
density = TRUE
//Keepin it simple and soft coded.
var/datum/adventure_layout/adventure_data

//Console with debug text adventure program for testing.
/obj/machinery/text_adventure_console/debug/Initialize()
. = ..()
if(!adventure_data)
adventure_data = new(TRUE)

//Stolen from nanite_program_hub.dm
/obj/machinery/text_adventure_console/update_overlays()
. = ..()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
SSvis_overlays.add_vis_overlay(src, icon, "nanite_program_hub_on", layer, plane)
SSvis_overlays.add_vis_overlay(src, icon, "nanite_program_hub_on", EMISSIVE_LAYER, EMISSIVE_PLANE)

/obj/machinery/text_adventure_console/ui_interact(mob/user)
. = ..()
if(isliving(user))
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
var/dat
if(!adventure_data)
adventure_data = new
dat += adventure_data.Adventure(src, user)
var/datum/browser/popup = new(user, "Adventure", "AdventureTest", 500, 600)
popup.set_content(dat)
popup.open()
return

//This is where the magic happens with the adventure datum. Choices in the datum are returned and processed here.
/obj/machinery/text_adventure_console/Topic(href, href_list)
. = ..()
if(.)
return .
if(ishuman(usr))
usr.set_machine(src)
add_fingerprint(usr)
//Setting display menu for the text adventure.
if(href_list["set_display"])
var/set_display = text2num(href_list["set_display"])
if(!(set_display < 1 || set_display > 3) && set_display != adventure_data.display_mode)
adventure_data.display_mode = set_display
playsound(get_turf(src), 'sound/machines/terminal_prompt_confirm.ogg', 50, TRUE)
updateUsrDialog()
return TRUE

//Adventure Mode choice reaction.
if(href_list["travel"])
var/travel_num = text2num(href_list["travel"])
adventure_data.AdventureModeReact(travel_num)
playsound(get_turf(src), 'sound/machines/terminal_prompt_confirm.ogg', 50, TRUE)
updateUsrDialog()
return TRUE

//Choosing an adventure from the event options.
if(href_list["adventure"])
/* There must be a better way of doing this because returning
A itself just brings the name instead of the instance. -IP */
var/created_event = text2path(href_list["adventure"])
adventure_data.GenerateEvent(created_event)
playsound(get_turf(src), 'sound/machines/uplinkpurchase.ogg', 50, TRUE)
updateUsrDialog()
return TRUE

//Event choices.
if(href_list["choice"])
var/reaction = text2num(href_list["choice"])
//Remotely call event reaction with our choice.
adventure_data.event_data.EventReact(reaction)
//Essential for refreshing the UI after completing a event.
playsound(get_turf(src), 'sound/machines/pda_button2.ogg', 50, TRUE)
updateUsrDialog()
return TRUE

if(href_list["extra_chance"])
//Remotely call event reaction with our choice.
adventure_data.event_data.AddChanceReact()
//Essential for refreshing the UI after completing a event.
playsound(get_turf(src), 'sound/machines/pda_button2.ogg', 50, TRUE)
updateUsrDialog()
return TRUE

//For very niche effects and conditions.
if(href_list["event_misc"])
var/reaction = text2num(href_list["event_misc"])
//Remotely call event reaction with our choice.
adventure_data.event_data.ChanceCords(reaction)
//Essential for refreshing the UI after completing a event.
playsound(get_turf(src), 'sound/machines/pda_button2.ogg', 50, TRUE)
updateUsrDialog()
return TRUE
5 changes: 3 additions & 2 deletions ModularTegustation/tegu_items/rcorp/landmarks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ GLOBAL_LIST_INIT(easycombat, list(
/mob/living/simple_animal/hostile/abnormality/helper,
/mob/living/simple_animal/hostile/abnormality/apex_predator,
/mob/living/simple_animal/hostile/abnormality/cleaner,
/mob/living/simple_animal/hostile/abnormality/smile))
/mob/living/simple_animal/hostile/abnormality/smile,
/mob/living/simple_animal/hostile/abnormality/pinocchio))

GLOBAL_LIST_INIT(easysupport, list(/mob/living/simple_animal/hostile/abnormality/fragment,
/mob/living/simple_animal/hostile/abnormality/funeral,
Expand All @@ -28,7 +29,7 @@ GLOBAL_LIST_INIT(hardcombat, list(
/mob/living/simple_animal/hostile/abnormality/big_wolf,
/mob/living/simple_animal/hostile/abnormality/warden,
/mob/living/simple_animal/hostile/abnormality/fire_bird,
))
/mob/living/simple_animal/hostile/abnormality/luna))

GLOBAL_LIST_INIT(hardsupport, list(/mob/living/simple_animal/hostile/abnormality/sphinx,
/mob/living/simple_animal/hostile/abnormality/judgement_bird,
Expand Down
64 changes: 59 additions & 5 deletions ModularTegustation/tegu_items/rcorp/objective.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,64 @@ GLOBAL_VAR_INIT(rcorp_wincondition, 0) //what state the game is in.
minor_announce("DANGER - HOSTILE ARBITER IN THE AREA. NEUTRALIZE IMMEDIATELY." , "R-Corp Intelligence Office")
GLOB.rcorp_wincondition = 2


//Golden Bough Objective
/obj/structure/bough
name = "Golden Bough"
desc = "You need this."
icon_state = "realization"
icon = 'ModularTegustation/Teguicons/toolabnormalities.dmi'
icon_state = "bough_pedestal"
icon = 'ModularTegustation/Teguicons/32x48.dmi'
anchored = TRUE
density = TRUE
resistance_flags = INDESTRUCTIBLE

light_color = COLOR_YELLOW
light_range = 2
light_power = 2
light_on = TRUE

//Collecting vars
var/cooldown
var/list/bastards = list()
var/list/bastards = list() //ckeys that have already tried to grab the bough

//Visual vars
var/obj/effect/golden_bough/bough //The bough effect that is spawned above the pedestal
var/f1 //Filter 1, Ripple filter
var/f2 //Filter 2, Rays filter

/obj/structure/bough/Initialize()
..()
bough = new/obj/effect/golden_bough(src)

//Filter 1 gets applied to the bough
bough.filters += filter(type="ripple", x = 0, y = 11, size = 20, repeat = 6, radius = 0, falloff = 1)
f1 = bough.filters[bough.filters.len]

//Filter 2 gets applied to the pedestal
filters += filter(type="rays", x = 0, y = 11, size = 20, color = COLOR_VERY_SOFT_YELLOW, offset = 0.2, density = 10, factor = 0.4, threshold = 0.5)
f2 = filters[filters.len]
vis_contents += bough

FilterLoop(1) //Starts the filter's loop

/obj/structure/bough/Destroy()
qdel(bough)
..()

/obj/structure/bough/proc/FilterLoop(loop_stage) //Takes a numeric argument for advancing the loop's stage in a cycle (1 > 2 > 3 > 1 > ...)
if(filters[filters.len]) // Stops the loop if we have no filters to animate
switch(loop_stage)
if(1)
animate(f1, radius = 60, time = 60, flags = CIRCULAR_EASING | EASE_OUT | ANIMATION_PARALLEL)
animate(f2, size = 30, offset = pick(4,5,6), time = 60, flags = SINE_EASING | EASE_OUT | ANIMATION_PARALLEL)
addtimer(CALLBACK(src, .proc/FilterLoop, 2), 6 SECONDS)
if(2)
animate(f1, size = 25, radius = 80, time = 20, flags = CIRCULAR_EASING | EASE_OUT | ANIMATION_PARALLEL)
animate(f2, size = 20, offset = pick(0.2,0.4), time = 60, flags = SINE_EASING | EASE_OUT | ANIMATION_END_NOW | ANIMATION_PARALLEL)
addtimer(CALLBACK(src, .proc/FilterLoop, 3), 2 SECONDS)
if(3)
animate(f1, size = 20, radius = 0, time = 0, flags = CIRCULAR_EASING | EASE_IN | EASE_OUT | ANIMATION_PARALLEL)
addtimer(CALLBACK(src, .proc/FilterLoop, 1), 4 SECONDS)
update_icon()

/obj/structure/bough/attack_hand(mob/living/carbon/human/user)
if(cooldown > world.time)
Expand All @@ -76,6 +122,15 @@ GLOBAL_VAR_INIT(rcorp_wincondition, 0) //what state the game is in.
/obj/structure/bough/proc/RoundEndEffect(mob/living/carbon/human/user)
bastards += user.ckey
if(do_after(user, 45 SECONDS))
//Visual Stuff
clear_filters()
bough.clear_filters()
vis_contents.Cut()
qdel(bough)
light_on = FALSE
update_light()

//Round End Effects
SSticker.SetRoundEndSound('sound/abnormalities/donttouch/end.ogg')
SSticker.force_ending = 1
for(var/mob/M in GLOB.player_list)
Expand All @@ -89,7 +144,6 @@ GLOBAL_VAR_INIT(rcorp_wincondition, 0) //what state the game is in.
if(2)
to_chat(M, span_userdanger("R-CORP SUPREME VICTORY."))


else
user.gib() //lol, idiot.

Expand Down
19 changes: 19 additions & 0 deletions ModularTegustation/tegu_items/refinery/sales.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
var/power_timer = 120 //How long does the box last for? You get 1 point every second
var/crate_timer = 180 //How much time until a crate?
var/crates_per_box //Just used to calculate examine text
var/our_corporation // Whatever Representative we may be linked to

var/generating
var/icon_full = "machinelcb_full"
Expand Down Expand Up @@ -54,6 +55,16 @@
var/obj/item/holochip/C = new (get_turf(src))
C.credits = rand(ahn_amount/4,ahn_amount)
SSlobotomy_corp.AdjustGoalBoxes(100) // 50 PE for 100 PE, not including the cost of filters. This eventually gets us positive in spendable PE, once we reach goal...
var/found_rep = FALSE
if(our_corporation) // Don't bother trying to loop if we don't have one set.
for(var/obj/structure/representative_console/rep_console in GLOB.lobotomy_devices)
if(rep_console.our_corporation != our_corporation)
continue
rep_console.AdjustPoints(1)
playsound(rep_console, 'sound/machines/terminal_success.ogg', 20, 1)
found_rep = TRUE
if(!found_rep) // No rep? Bit of a refund, but not as valuable as the rep.
SSlobotomy_corp.AdjustAvailableBoxes(25)

//gacha time
if(crate_timer <= 0)
Expand All @@ -70,26 +81,30 @@
crate = /obj/structure/lootcrate/l_corp
power_timer = 60 //L Corp is where you drain your power
crate_timer = 60 //And it's super cheap
our_corporation = "L corp"

/obj/structure/pe_sales/limbus
name = "Limbus Company Power Input"
desc = "A machine used to send PE to limbus company."
icon_state = "machinelcb"
crate = /obj/structure/lootcrate/limbus
our_corporation = "P corp" // Extremely questionable P-Corp~

/obj/structure/pe_sales/k_corp
name = "K-Corp Power Input"
desc = "A machine used to send PE to K-Corp."
icon_state = "machinek"
crate = /obj/structure/lootcrate/k_corp
crate_timer = 60 //2 per, because you get one bullet per crate
our_corporation = "K corp"

/obj/structure/pe_sales/r_corp
name = "R-Corp Power Input"
desc = "A machine used to send PE to R-Corp."
icon_state = "machiner"
crate = /obj/structure/lootcrate/r_corp
crate_timer = 360 //The most expensive because it's R corp stuff
our_corporation = "R corp"

/obj/structure/pe_sales/s_corp
name = "S-Corp Power Input"
Expand All @@ -104,12 +119,14 @@
crate = /obj/structure/lootcrate/w_corp
power_timer = 60 //W Corp uses a lot of power
crate_timer = 120
our_corporation = "W corp"

/obj/structure/pe_sales/n_corp
name = "N-Corp Power Input"
desc = "A machine used to send PE to N-Corp."
icon_state = "machinen"
crate = /obj/structure/lootcrate/n_corp
our_corporation = "N corp"

/obj/structure/pe_sales/leaflet
name = "Leaflet Workshop Power Input"
Expand Down Expand Up @@ -175,6 +192,7 @@
icon_state = "machinesyndicate"
crate = /obj/structure/lootcrate/syndicate
crate_timer = 360 //The most expensive sales, takes about 3.5 boxes. The worst you'll get is still extremely good
our_corporation = "P corp" // Extremely questionable P-Corp~

/obj/structure/pe_sales/backstreet
name = "Backstreets Workshop Power Input"
Expand All @@ -183,6 +201,7 @@
crate = /obj/structure/lootcrate/backstreets
power_timer = 180 //Takes a bit
crate_timer = 180 //And it's super cheap
our_corporation = "P corp" // Extremely questionable P-Corp~

/obj/structure/pe_sales/jcorp
name = "J-corp Syndicate Power Input"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@
/// How far away you can be to make eye contact with someone while examining
#define EYE_CONTACT_RANGE 5

//simple_mob_flags
#define SILENCE_RANGED_MESSAGE (1<<0)

///Swarmer flags
Expand Down
Loading

0 comments on commit 3aa6315

Please sign in to comment.