Skip to content

Commit

Permalink
Removes magic stuff adjacent to gun/magic (shiptest-ss13#2877)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

This was MEANT to be a pr were i was tackling gun cruft but magic
accounts for a large portion of the line count.

Pulls from shiptest-ss13#2664 (minus the actual gun crafting) and shiptest-ss13#2702

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

Cruft

<!-- Please add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding. -->

:cl:
del: Removed alot of magic cruft
code: Sorts gun defines into there own file
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Signed-off-by: FalloutFalcon <[email protected]>
Co-authored-by: Sun-Soaked <[email protected]>
  • Loading branch information
2 people authored and MrCat15352 committed Jun 22, 2024
1 parent 46d3eae commit b349787
Show file tree
Hide file tree
Showing 62 changed files with 192 additions and 2,894 deletions.
5 changes: 0 additions & 5 deletions _maps/map_files/generic/CentCom.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -3045,11 +3045,6 @@
/area/wizard_station)
"aEX" = (
/obj/structure/table/wood,
/obj/item/gun/magic/wand{
desc = "Used in emergencies to reignite magma engines.";
max_charges = 0;
name = "wand of emergency engine ignition"
},
/turf/open/floor/plasteel,
/area/wizard_station)
"aEY" = (
Expand Down
1 change: 0 additions & 1 deletion code/__DEFINES/DNA.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#define GLOWY /datum/mutation/human/glow
#define ANTIGLOWY /datum/mutation/human/glow/anti
#define TELEPATHY /datum/mutation/human/telepathy
#define FIREBREATH /datum/mutation/human/firebreath
#define VOID /datum/mutation/human/void
#define TONGUESPIKE /datum/mutation/human/tonguespike
#define TONGUESPIKECHEM /datum/mutation/human/tongue_spike/chem
Expand Down
67 changes: 0 additions & 67 deletions code/__DEFINES/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -133,53 +133,6 @@ GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list(/obj/item/gun)))
#define EMBED_POINTY list("ignore_throwspeed_threshold" = TRUE)
#define EMBED_POINTY_SUPERIOR list("embed_chance" = 100, "ignore_throwspeed_threshold" = TRUE)

//Gun weapon weight
/// Allows you to dual wield this gun and your offhand gun
#define WEAPON_LIGHT 1
/// Does not allow you to dual wield with this gun and your offhand gun
#define WEAPON_MEDIUM 2
/// You must wield the gun to fire this gun
#define WEAPON_HEAVY 3
/// You must FULLY wield (wait the full wield delay) the gun to fire this gun
#define WEAPON_VERY_HEAVY 4
//Gun trigger guards
#define TRIGGER_GUARD_ALLOW_ALL -1
#define TRIGGER_GUARD_NONE 0
#define TRIGGER_GUARD_NORMAL 1
//Gun bolt types
///The gun has a closed bolt, when resting it's closed, and must be racked to get a bullet from a magazine. see: Every Fucking Videogame Gun Ever
#define BOLT_TYPE_STANDARD 1
///Gun has a bolt, it is open when ready to fire. The gun can never have a chambered bullet with no magazine, but the bolt stays ready when a mag is removed.
/// Example: Some SMGs, the L6
#define BOLT_TYPE_OPEN 2
///Gun has no moving bolt mechanism, it cannot be racked. Also dumps the entire contents when emptied instead of a magazine.
/// Example: Break action shotguns, revolvers
#define BOLT_TYPE_NO_BOLT 3
///Gun has a bolt, it locks back when empty. It can be released to chamber a round if a magazine is in.
/// Example: Pistols with a slide lock, some SMGs
#define BOLT_TYPE_LOCKING 4
//Sawn off nerfs
///accuracy penalty of sawn off guns
#define SAWN_OFF_ACC_PENALTY 25
///added recoil of sawn off guns
#define SAWN_OFF_RECOIL 1

//ammo box sprite defines
///ammo box will always use provided icon state
#define AMMO_BOX_ONE_SPRITE 0
///ammo box will have a different state for each bullet; <icon_state>-<bullets left>
#define AMMO_BOX_PER_BULLET 1
///ammo box will have a different state for full and empty; <icon_state>-max_ammo and <icon_state>-0
#define AMMO_BOX_FULL_EMPTY 2

#define SUPPRESSED_NONE 0
#define SUPPRESSED_QUIET 1 ///standard suppressed
#define SUPPRESSED_VERY 2 /// no message

//Projectile Reflect
#define REFLECT_NORMAL (1<<0)
#define REFLECT_FAKEPROJECTILE (1<<1)

//Object/Item sharpness
#define IS_BLUNT 0
#define IS_SHARP 1
Expand Down Expand Up @@ -215,23 +168,3 @@ GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list(/obj/item/gun)))

//We will round to this value in damage calculations.
#define DAMAGE_PRECISION 0.1

//bullet_act() return values
#define BULLET_ACT_HIT "HIT" //It's a successful hit, whatever that means in the context of the thing it's hitting.
#define BULLET_ACT_BLOCK "BLOCK" //It's a blocked hit, whatever that means in the context of the thing it's hitting.
#define BULLET_ACT_FORCE_PIERCE "PIERCE" //It pierces through the object regardless of the bullet being piercing by default.

#define NICE_SHOT_RICOCHET_BONUS 10 //if the shooter has the NICE_SHOT trait and they fire a ricocheting projectile, add this to the ricochet chance and auto aim angle

//Autofire component
/// Compatible firemode is in the gun. Wait until it's held in the user hands.
#define AUTOFIRE_STAT_IDLE (1<<0)
/// Gun is active and in the user hands. Wait until user does a valid click.
#define AUTOFIRE_STAT_ALERT (1<<1)
/// Gun is shooting.
#define AUTOFIRE_STAT_FIRING (1<<2)

#define COMSIG_AUTOFIRE_ONMOUSEDOWN "autofire_onmousedown"
#define COMPONENT_AUTOFIRE_ONMOUSEDOWN_BYPASS (1<<0)
#define COMSIG_AUTOFIRE_SHOT "autofire_shot"
#define COMPONENT_AUTOFIRE_SHOT_SUCCESS (1<<0)
78 changes: 77 additions & 1 deletion code/__DEFINES/guns.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,61 @@
//weapon manufacturers
//Gun weapon weight
/// Allows you to dual wield this gun and your offhand gun
#define WEAPON_LIGHT 1
/// Does not allow you to dual wield with this gun and your offhand gun
#define WEAPON_MEDIUM 2
/// You must wield the gun to fire this gun
#define WEAPON_HEAVY 3
/// You must FULLY wield (wait the full wield delay) the gun to fire this gun
#define WEAPON_VERY_HEAVY 4
//Gun trigger guards
#define TRIGGER_GUARD_ALLOW_ALL -1
#define TRIGGER_GUARD_NONE 0
#define TRIGGER_GUARD_NORMAL 1
//Gun bolt types
///The gun has a closed bolt, when resting it's closed, and must be racked to get a bullet from a magazine. see: Every Fucking Videogame Gun Ever
#define BOLT_TYPE_STANDARD 1
///Gun has a bolt, it is open when ready to fire. The gun can never have a chambered bullet with no magazine, but the bolt stays ready when a mag is removed.
/// Example: Some SMGs, the L6
#define BOLT_TYPE_OPEN 2
///Gun has no moving bolt mechanism, it cannot be racked. Also dumps the entire contents when emptied instead of a magazine.
/// Example: Break action shotguns, revolvers
#define BOLT_TYPE_NO_BOLT 3
///Gun has a bolt, it locks back when empty. It can be released to chamber a round if a magazine is in.
/// Example: Pistols with a slide lock, some SMGs
#define BOLT_TYPE_LOCKING 4
//Sawn off nerfs
///accuracy penalty of sawn off guns
#define SAWN_OFF_ACC_PENALTY 25
///added recoil of sawn off guns
#define SAWN_OFF_RECOIL 1

//ammo box sprite defines
///ammo box will always use provided icon state
#define AMMO_BOX_ONE_SPRITE 0
///ammo box will have a different state for each bullet; <icon_state>-<bullets left>
#define AMMO_BOX_PER_BULLET 1
///ammo box will have a different state for full and empty; <icon_state>-max_ammo and <icon_state>-0
#define AMMO_BOX_FULL_EMPTY 2

#define SUPPRESSED_NONE 0
#define SUPPRESSED_QUIET 1 ///standard suppressed
#define SUPPRESSED_VERY 2 /// no message

//Autofire component
/// Compatible firemode is in the gun. Wait until it's held in the user hands.
#define AUTOFIRE_STAT_IDLE (1<<0)
/// Gun is active and in the user hands. Wait until user does a valid click.
#define AUTOFIRE_STAT_ALERT (1<<1)
/// Gun is shooting.
#define AUTOFIRE_STAT_FIRING (1<<2)

#define COMSIG_AUTOFIRE_ONMOUSEDOWN "autofire_onmousedown"
#define COMPONENT_AUTOFIRE_ONMOUSEDOWN_BYPASS (1<<0)
#define COMSIG_AUTOFIRE_SHOT "autofire_shot"
#define COMPONENT_AUTOFIRE_SHOT_SUCCESS (1<<0)

#define DUALWIELD_PENALTY_EXTRA_MULTIPLIER 1.6

#define MANUFACTURER_NONE null
#define MANUFACTURER_SHARPLITE "the Sharplite Defense logo"
#define MANUFACTURER_SHARPLITE_NEW "the Nanotrasen-Sharplite logo"
Expand All @@ -15,6 +72,25 @@
#define MANUFACTURER_PGF "the Etherbor Industries emblem"
#define MANUFACTURER_IMPORT "Lanchester Import Co."


/////////////////
// PROJECTILES //
/////////////////

//bullet_act() return values
#define BULLET_ACT_HIT "HIT" //It's a successful hit, whatever that means in the context of the thing it's hitting.
#define BULLET_ACT_BLOCK "BLOCK" //It's a blocked hit, whatever that means in the context of the thing it's hitting.
#define BULLET_ACT_FORCE_PIERCE "PIERCE" //It pierces through the object regardless of the bullet being piercing by default.

#define NICE_SHOT_RICOCHET_BONUS 10 //if the shooter has the NICE_SHOT trait and they fire a ricocheting projectile, add this to the ricochet chance and auto aim angle

//Projectile Reflect
#define REFLECT_NORMAL (1<<0)
#define REFLECT_FAKEPROJECTILE (1<<1)

#define MOVES_HITSCAN -1 //Not actually hitscan but close as we get without actual hitscan.
#define MUZZLE_EFFECT_PIXEL_INCREMENT 17 //How many pixels to move the muzzle flash up so your character doesn't look like they're shitting out lasers.

#define FIREMODE_SEMIAUTO "single"
#define FIREMODE_BURST "burst"
#define FIREMODE_FULLAUTO "auto"
Expand Down
1 change: 0 additions & 1 deletion code/controllers/subsystem/traumas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ SUBSYSTEM_DEF(traumas)
/obj/item/soulstone,
/obj/item/clothing/suit/wizrobe, /obj/item/clothing/head/wizard, /obj/item/spellbook, /obj/item/staff,
/obj/item/clothing/suit/space/hardsuit/shielded/wizard, /obj/item/clothing/suit/space/hardsuit/wizard,
/obj/item/gun/magic/staff, /obj/item/gun/magic/wand,
/obj/item/nullrod, /obj/item/clothing/under/rank/civilian/chaplain)),

"aliens" = typecacheof(list(
Expand Down
4 changes: 0 additions & 4 deletions code/datums/components/fantasy/suffixes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,7 @@
/obj/projectile/bullet/honker = 15,
/obj/projectile/temp = 15,
/obj/projectile/ion = 15,
/obj/projectile/magic/door = 15,
/obj/projectile/magic/locker = 15,
/obj/projectile/magic/fetch = 15,
/obj/projectile/beam/emitter = 15,
/obj/projectile/magic/flying = 15,
/obj/projectile/energy/net = 15,
/obj/projectile/bullet/incendiary/c9mm = 15,
/obj/projectile/temp/hot = 15,
Expand Down
2 changes: 0 additions & 2 deletions code/datums/dna.dm
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,6 @@
O.Remove(src)
visible_message("<span class='danger'>[src] vomits up their [O.name]!</span>", "<span class='danger'>You vomit up your [O.name]</span>") //no "vomit up your the heart"
O.forceMove(drop_location())
if(prob(20))
O.animate_atom_living()
if(9 to 10)
ForceContractDisease(new/datum/disease/gastrolosis())
to_chat(src, "<span class='notice'>Oh, I actually feel quite alright!</span>")
Expand Down
61 changes: 0 additions & 61 deletions code/datums/mutations/actions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -88,67 +88,6 @@
if(direction_text)
to_chat(user,"<span class='notice'>You consider [tracking_target]'s scent. The trail leads <b>[direction_text].</b></span>")

/datum/mutation/human/firebreath
name = "Fire Breath"
desc = "An ancient mutation that gives lizards breath of fire."
quality = POSITIVE
difficulty = 12
locked = TRUE
text_gain_indication = "<span class='notice'>Your throat is burning!</span>"
text_lose_indication = "<span class='notice'>Your throat is cooling down.</span>"
power = /obj/effect/proc_holder/spell/aimed/firebreath
instability = 30
energy_coeff = 1
power_coeff = 1

/datum/mutation/human/firebreath/modify()
if(power)
var/obj/effect/proc_holder/spell/aimed/firebreath/S = power
S.strength = GET_MUTATION_POWER(src)

/obj/effect/proc_holder/spell/aimed/firebreath
name = "Fire Breath"
desc = "You can breathe fire at a target."
school = "evocation"
charge_max = 600
clothes_req = FALSE
range = 20
projectile_type = /obj/projectile/magic/aoe/fireball/firebreath
base_icon_state = "fireball"
action_icon_state = "fireball0"
sound = 'sound/magic/demon_dies.ogg' //horrifying lizard noises
active_msg = "You built up heat in your mouth."
deactive_msg = "You swallow the flame."
var/strength = 1

/obj/effect/proc_holder/spell/aimed/firebreath/before_cast(list/targets)
. = ..()
if(iscarbon(usr))
var/mob/living/carbon/C = usr
if(C.is_mouth_covered())
C.adjust_fire_stacks(2)
C.IgniteMob()
to_chat(C,"<span class='warning'>Something in front of your mouth caught fire!</span>")
return FALSE

/obj/effect/proc_holder/spell/aimed/firebreath/ready_projectile(obj/projectile/P, atom/target, mob/user, iteration)
if(!istype(P, /obj/projectile/magic/aoe/fireball))
return
var/obj/projectile/magic/aoe/fireball/F = P
switch(strength)
if(1 to 3)
F.exp_light = strength-1
if(4 to INFINITY)
F.exp_heavy = strength-3
F.exp_fire += strength

/obj/projectile/magic/aoe/fireball/firebreath
name = "fire breath"
exp_heavy = 0
exp_light = 0
exp_flash = 0
exp_fire= 4

/datum/mutation/human/void
name = "Void Magnet"
desc = "A rare genome that attracts odd forces not usually observed."
Expand Down
25 changes: 0 additions & 25 deletions code/game/gamemodes/objective.dm
Original file line number Diff line number Diff line change
Expand Up @@ -883,31 +883,6 @@ GLOBAL_LIST_EMPTY(possible_items_special)
explanation_text = "Steal at least five guns!"
wanted_items = list(/obj/item/gun)

/datum/objective/steal_five_of_type/summon_magic
name = "steal magic"
explanation_text = "Steal at least five magical artefacts!"
wanted_items = list()

/datum/objective/steal_five_of_type/summon_magic/New()
wanted_items = GLOB.summoned_magic_objectives
..()

/datum/objective/steal_five_of_type/summon_magic/check_completion()
var/list/datum/mind/owners = get_owners()
var/stolen_count = 0
for(var/datum/mind/M in owners)
if(!isliving(M.current))
continue
var/list/all_items = M.current.GetAllContents() //this should get things in cheesewheels, books, etc.
for(var/obj/I in all_items) //Check for wanted items
if(istype(I, /obj/item/book/granter/spell))
var/obj/item/book/granter/spell/spellbook = I
if(!spellbook.used || !spellbook.oneuse) //if the book still has powers...
stolen_count++ //it counts. nice.
else if(is_type_in_typecache(I, wanted_items))
stolen_count++
return stolen_count >= 5

//Created by admin tools
/datum/objective/custom
name = "custom"
Expand Down
5 changes: 0 additions & 5 deletions code/game/objects/items/dna_injector.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@
desc = "This will make you big and strong, but give you a bad skin condition."
add_mutations = list(HULK)

/obj/item/dnainjector/firebreath
name = "\improper DNA injector (Fire Breath)"
desc = "Restores the dragon ancestry."
add_mutations = list(FIREBREATH)

/obj/item/dnainjector/xraymut
name = "\improper DNA injector (X-ray)"
desc = "Finally you can see what the Captain does."
Expand Down
13 changes: 0 additions & 13 deletions code/game/objects/items/granters.dm
Original file line number Diff line number Diff line change
Expand Up @@ -247,19 +247,6 @@
user.Stun(40, ignore_canstun = TRUE)
user.petrify(30)

/obj/item/book/granter/spell/cards
spell = /obj/effect/proc_holder/spell/aimed/spell_cards
spellname = "spellcards"
icon_state ="bookspellcards"
desc = "The ultimate card trick, for users ten and up."
remarks = list("It's all about the razzmataz.", "...I don't think I'll actually be sawing anyone in half", "These are pretty flimsy, most armor would defeat them.", "They do burn damage? Weird.", "Why the dumb stance? It's just a flick of the hand...", "Are these cards? They feel stiffer then pages.", "Best performed using a top hat...")

/obj/item/book/granter/spell/cards/recoil(mob/living/user)
..()
to_chat(user,"<span class='warning'>The cards are against you!</span>")
user.Stun(40, ignore_canstun = TRUE)
user.petrify(30)

/obj/item/book/granter/spell/shapechange
spell = /obj/effect/proc_holder/spell/targeted/shapeshift
spellname = "shapechange"
Expand Down
27 changes: 0 additions & 27 deletions code/game/objects/items/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -600,33 +600,6 @@
/obj/item/multitool = 1)
generate_items_inside(items_inside,src)


/obj/item/storage/belt/wands
name = "wand belt"
desc = "A belt designed to hold various rods of power. A veritable fanny pack of exotic magic."
icon_state = "soulstone"
item_state = "soulstone"

/obj/item/storage/belt/wands/ComponentInitialize()
. = ..()
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 6
STR.set_holdable(list(
/obj/item/gun/magic/wand
))

/obj/item/storage/belt/wands/full/PopulateContents()
new /obj/item/gun/magic/wand/death(src)
new /obj/item/gun/magic/wand/resurrection(src)
new /obj/item/gun/magic/wand/polymorph(src)
new /obj/item/gun/magic/wand/teleport(src)
new /obj/item/gun/magic/wand/door(src)
new /obj/item/gun/magic/wand/fireball(src)

for(var/obj/item/gun/magic/wand/W in contents) //All wands in this pack come in the best possible condition
W.max_charges = initial(W.max_charges)
W.charges = W.max_charges

/obj/item/storage/belt/janitor
name = "janibelt"
desc = "A belt used to hold most janitorial supplies."
Expand Down
Loading

0 comments on commit b349787

Please sign in to comment.