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

add: legendary swords #1092

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions modular_bandastation/_defines220/_defines220.dme
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
#include "code/signals_atom.dm"
#include "code/signals_item.dm"
#include "code/defines/automapper.dm"
#include "code/defines/combat.dm"
#include "code/defines/jobs.dm"
#include "code/defines/keybindings.dm"
#include "code/defines/misc.dm"
#include "code/defines/preferences.dm"
#include "code/defines/spans.dm"
#include "code/defines/subsystems.dm"
#include "code/defines/text_to_speech.dm"
#include "code/defines/roles.dm"
#include "code/signals_mob/signals_mob_ai.dm"
#include "code/signals_mob/signals_mob_carbon.dm"
#include "code/signals_mob/signals_mob_living.dm"
Expand Down
2 changes: 2 additions & 0 deletions modular_bandastation/_defines220/code/defines/combat.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// Click cooldowns, in tenths of a second, used for various combat actions
#define CLICK_CD_RAGE_MELEE 5
2 changes: 2 additions & 0 deletions modular_bandastation/_defines220/code/defines/roles.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// Role in mob/mind to centcom officers
#define CENTCOM_ROLE_OFFICER "centcom_role_officer"
4 changes: 4 additions & 0 deletions modular_bandastation/objects/_objects.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#include "code/shuttles.dm"

#include "code/components/components.dm"

#include "code/effects/decal.dm"
#include "code/effects/spawners.dm"
#include "code/effects/turf_decal.dm"
Expand Down Expand Up @@ -66,6 +68,8 @@
#include "code/items/storage/paper_spray_box.dm"
#include "code/items/storage/tape_box.dm"
#include "code/items/weapons/melee/centcom/rapier.dm"
#include "code/items/weapons/melee/centcom/enchantment.dm"
#include "code/items/weapons/melee/centcom/legendary_swords.dm"
#include "code/items/weapons/ranged/energy/awaymission_gun.dm"
#include "code/items/weapons/ranged/energy/eg_14.dm"

Expand Down
32 changes: 32 additions & 0 deletions modular_bandastation/objects/code/components/components.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/datum/component/ckey_and_role_locked_pickup
var/pickup_damage
var/list/ckeys = list()
var/offstation_role
var/refusal_text

/datum/component/ckey_and_role_locked_pickup/Initialize(offstation_role = TRUE, ckey_whitelist, pickup_damage = 0, refusal_text)
src.offstation_role = offstation_role
src.ckeys = ckey_whitelist
src.pickup_damage = pickup_damage
src.refusal_text = refusal_text

/datum/component/ckey_and_role_locked_pickup/RegisterWithParent()
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, PROC_REF(on_equip))

/datum/component/ckey_and_role_locked_pickup/UnregisterFromParent()
UnregisterSignal(parent, COMSIG_ITEM_EQUIPPED)

/datum/component/ckey_and_role_locked_pickup/proc/on_equip(obj/item/I, mob/living/user)
SIGNAL_HANDLER
if(check_role_and_ckey(user))
return
user.Knockdown(10 SECONDS)
user.dropItemToGround(I, force = TRUE)
to_chat(user, span_userdanger(refusal_text))
if(ishuman(user))
user.apply_damage(rand(pickup_damage, pickup_damage * 2), BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))

/datum/component/ckey_and_role_locked_pickup/proc/check_role_and_ckey(mob/user)
if(user.client.ckey in ckeys)
return TRUE
return user.mind.centcom_role == CENTCOM_ROLE_OFFICER
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/datum/enchantment
/// Used for blackbox logging
var/name = "You shouldn't be seeing this, file an issue report."
/// Used for wizards/cultists examining the runes on the blade
var/desc = "Someone messed up, file an issue report."
/// Used for damage values
var/power = 1
/// Whether the enchant procs despite not being in proximity
var/ranged = FALSE
/// Distance in tiles
var/range = 1
/// Stores the world.time after which it can be used again, the `initial(cooldown)` is the cooldown between activations.
var/cooldown = -1
/// If has traits, has it applied them?
var/applied_traits = FALSE
/// A modifier that can be appled to the cooldown after the enchantment has been initialized. Used by the forcewall spellblade
var/cooldown_multiplier = 1
/// Used for saveng target info
var/target
/// List of actions added by enchantment
var/list/actions_types = list()

/datum/enchantment/proc/on_hit(mob/living/target, mob/living/user, proximity, obj/item/melee/S)
if(world.time < cooldown)
return FALSE
if(!istype(target))
return FALSE
if(target.stat == DEAD)
return FALSE
if(!ranged && !proximity)
return FALSE
cooldown = world.time + (initial(cooldown) * cooldown_multiplier)
return TRUE

/datum/enchantment/proc/on_gain(obj/item/I)
I.reach = range
return

/datum/enchantment/proc/toggle_traits(obj/item/I, mob/living/user)
return

/datum/enchantment/proc/on_apply(obj/item/I)
return

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions modular_bandastation/outfits/_outfits.dme
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
#include "code/magistrate.dm"
#include "code/nanotrasen_representative.dm"
#include "code/syndicate.dm"
#include "code/mind.dm"
4 changes: 4 additions & 0 deletions modular_bandastation/outfits/code/centcom.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// MARK: Nanotrasen CentCom //

/datum/outfit/centcom/post_equip(mob/living/carbon/human/centcom_member, visuals_only = FALSE)
if(centcom_member.mind)
centcom_member.mind.centcom_role = CENTCOM_ROLE_OFFICER

// Old Fashion CentCom Commander
/datum/outfit/centcom/spec_ops/old
name = "Old Fashion Special Ops Officer"
Expand Down
2 changes: 2 additions & 0 deletions modular_bandastation/outfits/code/mind.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/datum/mind
var/centcom_role
Loading