Skip to content

Commit

Permalink
pr34634
Browse files Browse the repository at this point in the history
  • Loading branch information
Builder13 committed Dec 14, 2024
1 parent 0dd4f39 commit 308573e
Show file tree
Hide file tree
Showing 112 changed files with 4,305 additions and 703 deletions.
48 changes: 47 additions & 1 deletion baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "code\__defines\atmos.dm"
#include "code\__defines\atmospherics.dm"
#include "code\__defines\byond_tracy.dm"
#include "code\__defines\changeling.dm"
#include "code\__defines\chemistry.dm"
#include "code\__defines\client.dm"
#include "code\__defines\colors.dm"
Expand Down Expand Up @@ -348,6 +349,8 @@
#include "code\datums\item_modifiers\space_suits.dm"
#include "code\datums\item_modifiers\~defines.dm"
#include "code\datums\licences\license.dm"
#include "code\datums\managed_browsers\_managed_browser.dm"
#include "code\datums\managed_browsers\changelingevolution.dm"
#include "code\datums\mind\memory.dm"
#include "code\datums\mind\mind.dm"
#include "code\datums\move_intent\move_intent.dm"
Expand Down Expand Up @@ -610,8 +613,48 @@
#include "code\game\gamemodes\calamity\calamity.dm"
#include "code\game\gamemodes\changeling\absorbed_dna.dm"
#include "code\game\gamemodes\changeling\changeling.dm"
#include "code\game\gamemodes\changeling\changeling_evolutiontree.dm"
#include "code\game\gamemodes\changeling\changeling_powers.dm"
#include "code\game\gamemodes\changeling\modularchangling.dm"
#include "code\game\gamemodes\changeling\generic_equip_procs.dm"
#include "code\game\gamemodes\changeling\powers\absorb.dm"
#include "code\game\gamemodes\changeling\powers\armblade.dm"
#include "code\game\gamemodes\changeling\powers\armor.dm"
#include "code\game\gamemodes\changeling\powers\augmented_eyesight.dm"
#include "code\game\gamemodes\changeling\powers\bioelectrogenesis.dm"
#include "code\game\gamemodes\changeling\powers\blind_sting.dm"
#include "code\game\gamemodes\changeling\powers\boost_range.dm"
#include "code\game\gamemodes\changeling\powers\cryo_sting.dm"
#include "code\game\gamemodes\changeling\powers\darkvision.dm"
#include "code\game\gamemodes\changeling\powers\deaf_sting.dm"
#include "code\game\gamemodes\changeling\powers\death_sting.dm"
#include "code\game\gamemodes\changeling\powers\delayed_toxin_sting.dm"
#include "code\game\gamemodes\changeling\powers\electric_lockpick.dm"
#include "code\game\gamemodes\changeling\powers\endoarmor.dm"
#include "code\game\gamemodes\changeling\powers\engorged_glands.dm"
#include "code\game\gamemodes\changeling\powers\enrage.dm"
#include "code\game\gamemodes\changeling\powers\escape_restraints.dm"
#include "code\game\gamemodes\changeling\powers\extract_dna_sting.dm"
#include "code\game\gamemodes\changeling\powers\fabricate_clothing.dm"
#include "code\game\gamemodes\changeling\powers\fake_death.dm"
#include "code\game\gamemodes\changeling\powers\false_identity.dm"
#include "code\game\gamemodes\changeling\powers\fleshmend.dm"
#include "code\game\gamemodes\changeling\powers\hivemind.dm"
#include "code\game\gamemodes\changeling\powers\lsd_sting.dm"
#include "code\game\gamemodes\changeling\powers\mimic_voice.dm"
#include "code\game\gamemodes\changeling\powers\panacea.dm"
#include "code\game\gamemodes\changeling\powers\rapid_regen.dm"
#include "code\game\gamemodes\changeling\powers\rapid_synthesis.dm"
#include "code\game\gamemodes\changeling\powers\reattach_limb.dm"
#include "code\game\gamemodes\changeling\powers\recursive_enhancement.dm"
#include "code\game\gamemodes\changeling\powers\reinforced_tendons.dm"
#include "code\game\gamemodes\changeling\powers\revive.dm"
#include "code\game\gamemodes\changeling\powers\self_respiration.dm"
#include "code\game\gamemodes\changeling\powers\shriek.dm"
#include "code\game\gamemodes\changeling\powers\silence_sting.dm"
#include "code\game\gamemodes\changeling\powers\synaptizine_overdose.dm"
#include "code\game\gamemodes\changeling\powers\tentacle.dm"
#include "code\game\gamemodes\changeling\powers\transform.dm"
#include "code\game\gamemodes\changeling\powers\visible_camouflage.dm"
#include "code\game\gamemodes\cult\cult.dm"
#include "code\game\gamemodes\cult\cult_items.dm"
#include "code\game\gamemodes\cult\cult_structures.dm"
Expand Down Expand Up @@ -1532,7 +1575,10 @@
#include "code\modules\augment\passive\armor.dm"
#include "code\modules\augment\passive\boost.dm"
#include "code\modules\augment\passive\fluff.dm"
#include "code\modules\augment\passive\ling_lenses.dm"
#include "code\modules\augment\passive\lingcore.dm"
#include "code\modules\augment\passive\nanoaura.dm"
#include "code\modules\augment\passive\ragecore.dm"
#include "code\modules\augment\passive\boost\muscle.dm"
#include "code\modules\augment\passive\boost\reflex.dm"
#include "code\modules\augment\passive\boost\shooting.dm"
Expand Down
2 changes: 2 additions & 0 deletions code/__defines/changeling.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define ABSORB_NONLETHAL 1
#define ABSORB_LETHAL 2
14 changes: 14 additions & 0 deletions code/__defines/gamemode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@
#define Sp_CHARGES "charges"
#define Sp_HOLDVAR "holdervar"

//changeling cost
#define CHANGELING_STASIS_COST 20

//Voting-related
#define VOTE_PROCESS_ABORT 1
#define VOTE_PROCESS_COMPLETE 2
Expand All @@ -105,3 +108,14 @@
#define VOTE_STATUS_PREVOTE 1
#define VOTE_STATUS_ACTIVE 2
#define VOTE_STATUS_COMPLETE 3

/*
Changeling Defines
*/
#define CHANGELING_POWER_INHERENT "Inherent"
#define CHANGELING_POWER_ARMOR "Armor"
#define CHANGELING_POWER_STINGS "Stings"
#define CHANGELING_POWER_SHRIEKS "Shrieks"
#define CHANGELING_POWER_HEALTH "Health"
#define CHANGELING_POWER_ENHANCEMENTS "Enhancements"
#define CHANGELING_POWER_WEAPONS "Weapons"
46 changes: 46 additions & 0 deletions code/_helpers/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,52 @@
/proc/get_exposed_defense_zone(atom/movable/target)
return pick(BP_HEAD, BP_L_HAND, BP_R_HAND, BP_L_FOOT, BP_R_FOOT, BP_L_ARM, BP_R_ARM, BP_L_LEG, BP_R_LEG, BP_CHEST, BP_GROIN)

/proc/do_mob(mob/user , mob/target, time = 30, target_zone = 0, uninterruptible = FALSE, progress = TRUE, ignore_movement = FALSE, incapacitation_affected = TRUE)
if(!user || !target)
return 0
var/user_loc = user.loc
var/target_loc = target.loc

var/holding = user.get_active_hand()
var/datum/progressbar/private/progbar
if (progress)
progbar = new(user, time, target)

var/endtime = world.time+time
var/starttime = world.time
. = TRUE
while (world.time < endtime)
stoplag(1)
if (progress)
progbar.update(world.time - starttime)
if(!user || !target)
. = FALSE
break
if(uninterruptible)
continue

if(!user || (user.incapacitated() && incapacitation_affected))
. = FALSE
break

if(user.loc != user_loc && !ignore_movement)
. = FALSE
break

if(target.loc != target_loc && !ignore_movement)
. = FALSE
break

if(user.get_active_hand() != holding)
. = FALSE
break

if(target_zone && user.zone_sel.selecting != target_zone)
. = FALSE
break

if (progbar)
qdel(progbar)

/// Integer. Unique sequential ID from the `do_after` proc used to validate `DO_USER_UNIQUE_ACT` flag checks.
/mob/var/do_unique_user_handle = 0
Expand Down
6 changes: 3 additions & 3 deletions code/_onclick/hud/ability_screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@

//Changeling Abilities
/obj/screen/ability/verb_based/changeling
icon_state = "ling_spell_base"
background_base_state = "ling"

icon_state = "const_spell_base"
background_base_state = "const"
//use this to force add powers
/obj/screen/movable/ability_master/proc/add_ling_ability(object_given, verb_given, name_given, ability_icon_given, arguments)
if(!object_given)
message_admins("ERROR: add_ling_ability() was not given an object in its arguments.")
Expand Down
3 changes: 3 additions & 0 deletions code/datums/extensions/chameleon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
if (!chameleon_choices)
var/chameleon_type = chameleon_base_type || holder.parent_type
chameleon_choices = LAZYACCESS(chameleon_choices_by_type, chameleon_type)

if (!chameleon_choices)
chameleon_choices = GenerateChameleonChoices(chameleon_type)
LAZYSET(chameleon_choices_by_type, chameleon_type, chameleon_choices)
Expand Down Expand Up @@ -69,8 +70,10 @@
return null

/datum/extension/chameleon/proc/GenerateChameleonChoices(basetype)

var/choices = list()
var/types = islist(basetype) ? basetype : typesof(basetype)

for (var/path in types)
AddChameleonChoice(choices, path)
return sortAssoc(choices)
Expand Down
52 changes: 52 additions & 0 deletions code/datums/managed_browsers/_managed_browser.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
GLOBAL_VAR(managed_browser_id_ticker)

// This holds information on managing a /datum/browser object.
// Managing can include things like persisting the state of specific information inside of this object, receiving Topic() calls, or deleting itself when the window is closed.
// This is useful for browser windows to be able to stand 'on their own' instead of being tied to something in the game world, like an object or mob.
/datum/managed_browser
var/client/my_client = null
var/browser_id = null
var/base_browser_id = null

var/title = null
var/size_x = 200
var/size_y = 400

var/display_when_created = TRUE

/datum/managed_browser/New(client/new_client)
if(!new_client)
crash_with("Managed browser object was not given a client.")
return
if(!base_browser_id)
crash_with("Managed browser object does not have a base browser id defined in its type.")
return

my_client = new_client
browser_id = "[base_browser_id]-[GLOB.managed_browser_id_ticker++]"

if(display_when_created)
display()

/datum/managed_browser/Destroy()
my_client = null
return ..()

// Override if you want to have the browser title change conditionally.
// Otherwise it's easier to just change the title variable directly.
/datum/managed_browser/proc/get_title()
return title

// Override to display the html information.
// It is suggested to build it with a list, and use list.Join() at the end.
// This helps prevent excessive concatination, which helps preserves BYOND's string tree from becoming a laggy mess.
/datum/managed_browser/proc/get_html()
return

/datum/managed_browser/proc/display()
interact(get_html(), get_title(), my_client)

/datum/managed_browser/proc/interact(html, title, client/C)
var/datum/browser/popup = new(C.mob, browser_id, title, size_x, size_y, src)
popup.set_content(html)
popup.open()
Loading

0 comments on commit 308573e

Please sign in to comment.