Skip to content

Commit

Permalink
Rcorp Assorted Changes (+ Realization engine) (#1728)
Browse files Browse the repository at this point in the history
* adds everything

* fix linters?

* fixes luna

* fix linters second try (i'm dumb).

* fix linters (for realsies) (this time i was REALLY stupid and even commited a broken animation...)
  • Loading branch information
TaculoTaculo authored Dec 9, 2023
1 parent 827befe commit dd3ea00
Show file tree
Hide file tree
Showing 19 changed files with 135 additions and 31 deletions.
Binary file modified ModularTegustation/Teguicons/32x48.dmi
Binary file not shown.
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
8 changes: 8 additions & 0 deletions code/game/objects/effects/abnormality.dm
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,11 @@
/obj/effect/greenmidnight_laser/Initialize()
. = ..()
animate(src, alpha = 255, time = 5)

/obj/effect/golden_bough
name = "Golden Bough"
desc = "A shining golden bough, the light it emits feels soothing."
icon = 'ModularTegustation/Teguicons/32x48.dmi'
icon_state = "bough_bough"
move_force = INFINITY
pull_force = INFINITY
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/obj/structure/toolabnormality/realization
name = "realization engine"
desc = "An artifact used to find true potential within certains items."
icon_state = "realization"
icon = 'ModularTegustation/Teguicons/32x48.dmi'
icon_state = "bough_pedestal"
var/static/realized_users = list()
/// Assoc list 'input = output'
var/list/output = list(
Expand Down Expand Up @@ -62,6 +63,46 @@
/obj/item/toy/plush/angela = /obj/item/toy/plush/carmen,
)

//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/toolabnormality/realization/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/toolabnormality/realization/Destroy()
qdel(bough)
..()

/obj/structure/toolabnormality/realization/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/toolabnormality/realization/proc/YinYangCheck()
for(var/datum/abnormality/AD in SSlobotomy_corp.all_abnormality_datums)
if(AD.abno_path == /mob/living/simple_animal/hostile/abnormality/yang)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
//Spawning
/mob/living/simple_animal/hostile/abnormality/nobody_is/PostSpawn()
. = ..()
if(CheckCombat())
if(IsCombatMap())
current_stage = 2
next_stage()
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@

//Spawning Fairies
/mob/living/simple_animal/hostile/abnormality/titania/proc/FairyLoop()
if(CheckCombat())
if(IsCombatMap())
return
//Blurb about how many we have spawned
listclearnulls(spawned_mobs)
Expand All @@ -109,7 +109,7 @@

//Setting the nemesis
/mob/living/simple_animal/hostile/abnormality/titania/proc/ChooseNemesis()
if(CheckCombat())
if(IsCombatMap())
return

var/list/potentialmarked = list()
Expand All @@ -134,7 +134,7 @@
//------------------------------------------------------------------------------

/mob/living/simple_animal/hostile/abnormality/titania/proc/SetLaw()
if(CheckCombat())
if(IsCombatMap())
return


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
var/mob/living/simple_animal/hostile/abnormality/golden_apple/apple = owner
if(apple.IsContained()) // No more using cooldowns while contained
return FALSE
if(apple.is_maggot == TRUE || !apple.CheckCombat())//False apple shouldn't have this ability, and it should not be usable outside RCA
if(apple.is_maggot == TRUE || !apple.IsCombatMap())//False apple shouldn't have this ability, and it should not be usable outside RCA
return FALSE
if(apple.pulse_count == 0)
to_chat(owner, span_warning("You cannot activate this due to a lack of charges. Attack a hostile target to gain more charges."))
Expand All @@ -129,7 +129,7 @@

//***Simple Mob Procs***
/mob/living/simple_animal/hostile/abnormality/golden_apple/Initialize()
if(CheckCombat())//Is it R corp assault? Hit 'em with the nerf bat!
if(IsCombatMap())//Is it R corp assault? Hit 'em with the nerf bat!
pulse_cooldown_time = 130 SECONDS//The duraction of the buff is 60 seconds; you can't build stacks at this rate.
maggot_attack = new /datum/action/innate/abnormality_attack/maggot_spread
maggot_attack2 = new /datum/action/innate/abnormality_attack/maggot_spread2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
if(client)
mind.transfer_to(realboy)
//Prevents pinocchio from going insane on Rcorp.
if(!CheckCombat())
if(!IsCombatMap())
realboy.ai_controller = /datum/ai_controller/insane/murder/puppet
realboy.InitializeAIController()
realboy.apply_status_effect(/datum/status_effect/panicked_type/puppet)
Expand Down Expand Up @@ -260,7 +260,7 @@
return FALSE

/mob/living/carbon/human/species/pinocchio/UnarmedAttack(atom/A, proximity)
if(istype(A, /obj/structure/toolabnormality/touch))
if((istype(A, /obj/structure/toolabnormality/touch)) || (istype(A, /obj/structure/bough)))
to_chat(src, span_userdanger("YOUR FOOLISHNESS IS IMPRESSIVE."))
return
. = ..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
return
if(IsContained())
return
if(client || CheckCombat())
if(client || IsCombatMap())
return
if((teleport_cooldown <= world.time) && can_act)
TryTeleport()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
/mob/living/simple_animal/hostile/abnormality/voiddream/BreachEffect(mob/living/carbon/human/user)
..()
ability_cooldown = world.time + 4 SECONDS
if(CheckCombat())
if(IsCombatMap())
return
addtimer(CALLBACK(src, .proc/DelPassive), rand((3 MINUTES), (5 MINUTES)))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
/* Combat */

/mob/living/simple_animal/hostile/abnormality/alriune/Move()
if(CheckCombat())
if(IsCombatMap())
return ..()
return FALSE

Expand Down Expand Up @@ -98,7 +98,7 @@


/mob/living/simple_animal/hostile/abnormality/alriune/proc/TeleportAway()
if(CheckCombat())
if(IsCombatMap())
return
var/list/potential_turfs = list()
for(var/turf/T in GLOB.xeno_spawn)
Expand Down Expand Up @@ -141,7 +141,7 @@
petals_next = world.time + petals_next_time + 30
TeleportAway()
icon_state = "alriune_active"
if(CheckCombat())
if(IsCombatMap())
pulse_damage = 70 //R-Corp cannot eat 180 white damage
return

Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
return TRUE

/mob/living/simple_animal/hostile/abnormality/despair_knight/proc/TryTeleport()
if(CheckCombat())
if(IsCombatMap())
return FALSE
if(teleport_cooldown > world.time)
return FALSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
light_range = 20
light_power = 20
update_light()
if(CheckCombat())
if(IsCombatMap())
loot = list()
return
addtimer(CALLBACK(src, .proc/KillOtherBird), 90 SECONDS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
startTeleport() //Let's Spaghettioodle out of here

/mob/living/simple_animal/hostile/abnormality/greed_king/proc/startTeleport()
if(CheckCombat())
if(IsCombatMap())
return
if(busy || teleport_cooldown > world.time || (status_flags & GODMODE))
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
L.apply_damage(judgement_damage, PALE_DAMAGE, null, L.run_armor_check(null, PALE_DAMAGE), spread_damage = TRUE)

if(L.stat == DEAD) //Gotta fucking check again in case it kills you. Real moment
if(!CheckCombat())
if(!IsCombatMap())
var/turf/T = get_turf(L)
if(locate(/obj/structure/jbird_noose) in T)
T = pick_n_take(T.reachableAdjacentTurfs())//if a noose is on this tile, it'll still create another one. You probably shouldn't be letting this many people die to begin with
Expand Down Expand Up @@ -128,7 +128,7 @@

/mob/living/simple_animal/hostile/abnormality/judgement_bird/BreachEffect(mob/living/carbon/human/user)
..()
if(CheckCombat())
if(IsCombatMap())
judgement_damage = 65
return

Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/simple_animal/abnormality/waw/luna.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
/mob/living/simple_animal/hostile/abnormality/luna/ZeroQliphoth(mob/living/carbon/human/user)
icon_state = "dellaluna_breach"
//Normal breach
if(!CheckCombat())
if(!IsCombatMap())
var/turf/W = pick(GLOB.department_centers)
var/mob/living/simple_animal/hostile/luna/spawningmonster = new(get_turf(W))
breached_monster = spawningmonster
Expand All @@ -58,7 +58,7 @@
else
var/mob/living/simple_animal/hostile/luna/spawningmonster = new(get_turf(src))
breached_monster = spawningmonster
qdel(src) //Destroys the piano, as it is unecessary in Rcorp.
QDEL_IN(src, 1 SECONDS) //Destroys the piano, as it is unecessary in Rcorp.

breached = TRUE
if(client)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
for(var/obj/structure/spreading/apple_vine/W in range(15, get_turf(src)))
if(W.last_expand <= world.time)
W.expand()
if(teleport_cooldown <= world.time && !togglemovement && !client && !CheckCombat())
if(teleport_cooldown <= world.time && !togglemovement && !client && !IsCombatMap())
TryTeleport()

/mob/living/simple_animal/hostile/abnormality/snow_whites_apple/AttackingTarget(atom/attacked_target)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/simple_animal/simple_animal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
if(!unsuitable_heat_damage)
unsuitable_heat_damage = unsuitable_atmos_damage
//LC13 Check, it's here to give everything nightvision on Rcorp.
if(CheckCombat())
if(IsCombatMap())
var/obj/effect/proc_holder/spell/targeted/night_vision/bloodspell = new
AddSpell(bloodspell)
//LC13 Check. If it's the citymap, they all gain a faction
Expand Down Expand Up @@ -750,7 +750,7 @@

// -- LC13 THINGS --

/mob/living/simple_animal/proc/CheckCombat() //Is it currently a combat gamemode? Used to check for a few interactions, like if somethings can teleport.
/mob/living/simple_animal/proc/IsCombatMap() //Is it currently a combat gamemode? Used to check for a few interactions, like if somethings can teleport.
if(SSmaptype.maptype in SSmaptype.combatmaps)
return TRUE
return FALSE

0 comments on commit dd3ea00

Please sign in to comment.