April sync (#360)

* Maps and things no code/icons

* helpers defines globalvars

* Onclick world.dm orphaned_procs

* subsystems

Round vote and shuttle autocall done here too

* datums

* Game folder

* Admin - chatter modules

* clothing - mining

* modular computers - zambies

* client

* mob level 1

* mob stage 2 + simple_animal

* silicons n brains

* mob stage 3 + Alien/Monkey

* human mobs

* icons updated

* some sounds

* emitter y u no commit

* update tgstation.dme

* compile fixes

* travis fixes

Also removes Fast digest mode, because reasons.

* tweaks for travis Mentors are broke again

Also fixes Sizeray guns

* oxygen loss fix for vore code.

* removes unused code

* some code updates

* bulk fixes

* further fixes

* outside things

* whoops.

* Maint bar ported

* GLOBs.
This commit is contained in:
Poojawa
2017-04-13 23:37:00 -05:00
committed by GitHub
parent cdc32c98fa
commit 7e9b96a00f
1322 changed files with 174827 additions and 23888 deletions
+10 -10
View File
@@ -195,7 +195,6 @@
/////////////////////Multiverse Blade////////////////////
var/global/list/multiverse = list()
/obj/item/weapon/multisword
name = "multiverse sword"
@@ -214,10 +213,11 @@ var/global/list/multiverse = list()
var/faction = list("unassigned")
var/cooldown = 0
var/assigned = "unassigned"
var/static/list/multiverse = list()
/obj/item/weapon/multisword/New()
..()
multiverse |= src
multiverse += src
/obj/item/weapon/multisword/Destroy()
@@ -241,7 +241,7 @@ var/global/list/multiverse = list()
to_chat(user, "You bind the sword to yourself. You can now use it to summon help.")
if(!is_gangster(user))
var/datum/gang/multiverse/G = new(src, "[user.real_name]")
ticker.mode.gangs += G
SSticker.mode.gangs += G
G.bosses += user.mind
G.add_gang_hud(user.mind)
user.mind.gang_datum = G
@@ -251,7 +251,7 @@ var/global/list/multiverse = list()
user.mind.objectives += hijack_objective
hijack_objective.explanation_text = "Ensure only [user.real_name] and their copies are on the shuttle!"
to_chat(user, "<B>Objective #[1]</B>: [hijack_objective.explanation_text]")
ticker.mode.traitors += user.mind
SSticker.mode.traitors += user.mind
user.mind.special_role = "[user.real_name] Prime"
else
var/list/candidates = get_candidates(ROLE_WIZARD)
@@ -276,15 +276,15 @@ var/global/list/multiverse = list()
M.key = C.key
M.mind.name = user.real_name
to_chat(M, "<B>You are an alternate version of [user.real_name] from another universe! Help them accomplish their goals at all costs.</B>")
ticker.mode.add_gangster(M.mind, user.mind.gang_datum, FALSE)
SSticker.mode.add_gangster(M.mind, user.mind.gang_datum, FALSE)
M.real_name = user.real_name
M.name = user.real_name
M.faction = list("[user.real_name]")
if(prob(50))
var/list/all_species = list()
for(var/speciestype in subtypesof(/datum/species))
var/datum/species/S = new speciestype()
if(!S.dangerous_existence)
var/datum/species/S = speciestype
if(!initial(S.dangerous_existence))
all_species += speciestype
M.set_species(pick(all_species), icon_update=0)
M.update_body()
@@ -436,7 +436,7 @@ var/global/list/multiverse = list()
var/obj/item/weapon/card/id/W = new /obj/item/weapon/card/id
W.icon_state = "centcom"
W.access += access_maint_tunnels
W.access += GLOB.access_maint_tunnels
W.assignment = "Multiverse Traveller"
W.registered_name = M.real_name
W.update_label(M.real_name)
@@ -517,7 +517,7 @@ var/global/list/multiverse = list()
user.unset_machine()
if("r_leg","l_leg")
to_chat(user, "<span class='notice'>You move the doll's legs around.</span>")
var/turf/T = get_step(target,pick(cardinal))
var/turf/T = get_step(target,pick(GLOB.cardinal))
target.Move(T)
if("r_arm","l_arm")
target.click_random_mob()
@@ -533,7 +533,7 @@ var/global/list/multiverse = list()
possible = list()
if(!link)
return
for(var/mob/living/carbon/human/H in living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
if(md5(H.dna.uni_identity) in link.fingerprints)
possible |= H
+4 -4
View File
@@ -20,7 +20,7 @@
..()
var/playercount = 0
if(!max_mages && !bullshit_mode)
for(var/mob/living/player in mob_list)
for(var/mob/living/player in GLOB.mob_list)
if(player.client && player.stat != 2)
playercount += 1
max_mages = round(playercount / 8)
@@ -90,7 +90,7 @@
var/mob/dead/observer/theghost = null
spawn(rand(spawn_delay_min, spawn_delay_max))
message_admins("SWF is still pissed, sending another wizard - [max_mages - mages_made] left.")
for(var/mob/dead/observer/G in player_list)
for(var/mob/dead/observer/G in GLOB.player_list)
if(G.client && !G.client.holder && !G.client.is_afk() && (ROLE_WIZARD in G.client.prefs.be_special))
if(!jobban_isbanned(G, ROLE_WIZARD) && !jobban_isbanned(G, "Syndicate"))
if(age_check(G.client))
@@ -98,7 +98,7 @@
if(!candidates.len)
message_admins("No applicable ghosts for the next ragin' mage, asking ghosts instead.")
var/time_passed = world.time
for(var/mob/dead/observer/G in player_list)
for(var/mob/dead/observer/G in GLOB.player_list)
if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate"))
if(age_check(G.client))
spawn(0)
@@ -141,7 +141,7 @@
return
//First we spawn a dude.
var/mob/living/carbon/human/new_character = new(pick(latejoin))//The mob being spawned.
var/mob/living/carbon/human/new_character = new(pick(GLOB.latejoin))//The mob being spawned.
G_found.client.prefs.copy_to(new_character)
new_character.dna.update_dna_identity()
+5 -5
View File
@@ -132,7 +132,7 @@
if("VICTIM")
var/mob/living/carbon/human/T = target
if(ticker.mode.name == "cult" && T.mind == ticker.mode:sacrifice_target)
if(SSticker.mode.name == "cult" && T.mind == SSticker.mode:sacrifice_target)
if(iscultist(user))
to_chat(user, "<span class='cult'><b>\"This soul is mine.</b></span> <span class='cultlarge'>SACRIFICE THEM!\"</span>")
else
@@ -201,8 +201,8 @@
if(stoner)
newstruct.faction |= "\ref[stoner]"
newstruct.key = target.key
if(newstruct.mind && ((stoner && iscultist(stoner)) || cultoverride) && ticker && ticker.mode)
ticker.mode.add_cultist(newstruct.mind, 0)
if(newstruct.mind && ((stoner && iscultist(stoner)) || cultoverride) && SSticker && SSticker.mode)
SSticker.mode.add_cultist(newstruct.mind, 0)
if(iscultist(stoner) || cultoverride)
to_chat(newstruct, "<b>You are still bound to serve the cult[stoner ? " and [stoner]":""], follow their orders and help them complete their goals at all costs.</b>")
else if(stoner)
@@ -223,7 +223,7 @@
if(U)
S.faction |= "\ref[U]" //Add the master as a faction, allowing inter-mob cooperation
if(U && iscultist(U))
ticker.mode.add_cultist(S.mind, 0)
SSticker.mode.add_cultist(S.mind, 0)
S.cancel_camera()
name = "soulstone: Shade of [T.real_name]"
icon_state = "soulstone2"
@@ -238,7 +238,7 @@
/obj/item/device/soulstone/proc/getCultGhost(mob/living/carbon/human/T, mob/U)
var/mob/dead/observer/chosen_ghost
for(var/mob/dead/observer/ghost in player_list) //We put them back in their body
for(var/mob/dead/observer/ghost in GLOB.player_list) //We put them back in their body
if(ghost.mind && ghost.mind.current == T && ghost.client)
chosen_ghost = ghost
break
+38 -91
View File
@@ -4,7 +4,6 @@
var/spell_type = null
var/desc = ""
var/category = "Offensive"
var/log_name = "XX" //What it shows up as in logs
var/cost = 2
var/refundable = 1
var/surplus = -1 // -1 for infinite, not used by anything atm
@@ -58,9 +57,10 @@
aspell.name = "Instant [aspell.name]"
if(aspell.spell_level >= aspell.level_max)
to_chat(user, "<span class='notice'>This spell cannot be strengthened any further.</span>")
feedback_add_details("wizard_spell_improved", "[name]|[aspell.level]")
return 1
//No same spell found - just learn it
feedback_add_details("wizard_spell_learned",log_name)
feedback_add_details("wizard_spell_learned", name)
user.mind.AddSpell(S)
to_chat(user, "<span class='notice'>You have learned [S.name].</span>")
return 1
@@ -78,7 +78,7 @@
/datum/spellbook_entry/proc/Refund(mob/living/carbon/human/user,obj/item/weapon/spellbook/book) //return point value or -1 for failure
var/area/wizard_station/A = locate()
if(!(user in A.contents))
to_chat(user, "<span clas=='warning'>You can only refund spells at the wizard lair</span>")
to_chat(user, "<span class='warning'>You can only refund spells at the wizard lair</span>")
return -1
if(!S)
S = new spell_type()
@@ -105,132 +105,110 @@
/datum/spellbook_entry/fireball
name = "Fireball"
spell_type = /obj/effect/proc_holder/spell/aimed/fireball
log_name = "FB"
/datum/spellbook_entry/rod_form
name = "Rod Form"
spell_type = /obj/effect/proc_holder/spell/targeted/rod_form
log_name = "RF"
/datum/spellbook_entry/magicm
name = "Magic Missile"
spell_type = /obj/effect/proc_holder/spell/targeted/projectile/magic_missile
log_name = "MM"
category = "Defensive"
/datum/spellbook_entry/disintegrate
name = "Disintegrate"
spell_type = /obj/effect/proc_holder/spell/targeted/touch/disintegrate
log_name = "DG"
/datum/spellbook_entry/disabletech
name = "Disable Tech"
spell_type = /obj/effect/proc_holder/spell/targeted/emplosion/disable_tech
log_name = "DT"
category = "Defensive"
cost = 1
/datum/spellbook_entry/repulse
name = "Repulse"
spell_type = /obj/effect/proc_holder/spell/aoe_turf/repulse
log_name = "RP"
category = "Defensive"
/datum/spellbook_entry/lightningPacket
name = "Lightning bolt! Lightning bolt!"
spell_type = /obj/effect/proc_holder/spell/targeted/conjure_item/spellpacket
log_name = "LP"
category = "Defensive"
/datum/spellbook_entry/timestop
name = "Time Stop"
spell_type = /obj/effect/proc_holder/spell/aoe_turf/conjure/timestop
log_name = "TS"
category = "Defensive"
/datum/spellbook_entry/smoke
name = "Smoke"
spell_type = /obj/effect/proc_holder/spell/targeted/smoke
log_name = "SM"
category = "Defensive"
cost = 1
/datum/spellbook_entry/blind
name = "Blind"
spell_type = /obj/effect/proc_holder/spell/targeted/trigger/blind
log_name = "BD"
cost = 1
/datum/spellbook_entry/mindswap
name = "Mindswap"
spell_type = /obj/effect/proc_holder/spell/targeted/mind_transfer
log_name = "MT"
category = "Mobility"
/datum/spellbook_entry/forcewall
name = "Force Wall"
spell_type = /obj/effect/proc_holder/spell/targeted/forcewall
log_name = "FW"
category = "Defensive"
cost = 1
/datum/spellbook_entry/blink
name = "Blink"
spell_type = /obj/effect/proc_holder/spell/targeted/turf_teleport/blink
log_name = "BL"
category = "Mobility"
/datum/spellbook_entry/teleport
name = "Teleport"
spell_type = /obj/effect/proc_holder/spell/targeted/area_teleport/teleport
log_name = "TP"
category = "Mobility"
/datum/spellbook_entry/mutate
name = "Mutate"
spell_type = /obj/effect/proc_holder/spell/targeted/genetic/mutate
log_name = "MU"
/datum/spellbook_entry/jaunt
name = "Ethereal Jaunt"
spell_type = /obj/effect/proc_holder/spell/targeted/ethereal_jaunt
log_name = "EJ"
category = "Mobility"
/datum/spellbook_entry/knock
name = "Knock"
spell_type = /obj/effect/proc_holder/spell/aoe_turf/knock
log_name = "KN"
category = "Mobility"
cost = 1
/datum/spellbook_entry/fleshtostone
name = "Flesh to Stone"
spell_type = /obj/effect/proc_holder/spell/targeted/touch/flesh_to_stone
log_name = "FS"
/datum/spellbook_entry/summonitem
name = "Summon Item"
spell_type = /obj/effect/proc_holder/spell/targeted/summonitem
log_name = "IS"
category = "Assistance"
cost = 1
/datum/spellbook_entry/lichdom
name = "Bind Soul"
spell_type = /obj/effect/proc_holder/spell/targeted/lichdom
log_name = "LD"
category = "Defensive"
/datum/spellbook_entry/teslablast
name = "Tesla Blast"
spell_type = /obj/effect/proc_holder/spell/targeted/tesla
log_name = "TB"
/datum/spellbook_entry/lightningbolt
name = "Lightning Bolt"
spell_type = /obj/effect/proc_holder/spell/aimed/lightningbolt
log_name = "LB"
cost = 3
/datum/spellbook_entry/lightningbolt/Buy(mob/living/carbon/human/user,obj/item/weapon/spellbook/book) //return 1 on success
@@ -240,47 +218,40 @@
/datum/spellbook_entry/infinite_guns
name = "Lesser Summon Guns"
spell_type = /obj/effect/proc_holder/spell/targeted/infinite_guns/gun
log_name = "IG"
cost = 3
no_coexistance_typecache = /obj/effect/proc_holder/spell/targeted/infinite_guns/arcane_barrage
/datum/spellbook_entry/arcane_barrage
name = "Arcane Barrage"
spell_type = /obj/effect/proc_holder/spell/targeted/infinite_guns/arcane_barrage
log_name = "AB"
cost = 3
no_coexistance_typecache = /obj/effect/proc_holder/spell/targeted/infinite_guns/gun
/datum/spellbook_entry/barnyard
name = "Barnyard Curse"
spell_type = /obj/effect/proc_holder/spell/targeted/barnyardcurse
log_name = "BC"
/datum/spellbook_entry/charge
name = "Charge"
spell_type = /obj/effect/proc_holder/spell/targeted/charge
log_name = "CH"
category = "Assistance"
cost = 1
/datum/spellbook_entry/shapeshift
name = "Wild Shapeshift"
spell_type = /obj/effect/proc_holder/spell/targeted/shapeshift
log_name = "WS"
category = "Assistance"
cost = 1
/datum/spellbook_entry/spacetime_dist
name = "Spacetime Distortion"
spell_type = /obj/effect/proc_holder/spell/spacetime_dist
log_name = "STD"
category = "Defensive"
cost = 1
/datum/spellbook_entry/the_traps
name = "The Traps!"
spell_type = /obj/effect/proc_holder/spell/aoe_turf/conjure/the_traps
log_name = "TT"
category = "Offensive"
cost = 1
@@ -294,7 +265,7 @@
/datum/spellbook_entry/item/Buy(mob/living/carbon/human/user,obj/item/weapon/spellbook/book)
new item_path(get_turf(user))
feedback_add_details("wizard_spell_learned",log_name)
feedback_add_details("wizard_spell_learned", name)
return 1
/datum/spellbook_entry/item/GetInfo()
@@ -310,32 +281,27 @@
name = "Staff of Change"
desc = "An artefact that spits bolts of coruscating energy which cause the target's very form to reshape itself."
item_path = /obj/item/weapon/gun/magic/staff/change
log_name = "ST"
/datum/spellbook_entry/item/staffanimation
name = "Staff of Animation"
desc = "An arcane staff capable of shooting bolts of eldritch energy which cause inanimate objects to come to life. This magic doesn't affect machines."
item_path = /obj/item/weapon/gun/magic/staff/animate
log_name = "SA"
category = "Assistance"
/datum/spellbook_entry/item/staffchaos
name = "Staff of Chaos"
desc = "A caprious tool that can fire all sorts of magic without any rhyme or reason. Using it on people you care about is not recommended."
item_path = /obj/item/weapon/gun/magic/staff/chaos
log_name = "SC"
/datum/spellbook_entry/item/spellblade
name = "Spellblade"
desc = "A sword capable of firing blasts of energy which rip targets limb from limb."
item_path = /obj/item/weapon/gun/magic/staff/spellblade
log_name = "SB"
/datum/spellbook_entry/item/staffdoor
name = "Staff of Door Creation"
desc = "A particular staff that can mold solid metal into ornate doors. Useful for getting around in the absence of other transportation. Does not work on glass."
item_path = /obj/item/weapon/gun/magic/staff/door
log_name = "SD"
cost = 1
category = "Mobility"
@@ -343,7 +309,6 @@
name = "Staff of Healing"
desc = "An altruistic staff that can heal the lame and raise the dead."
item_path = /obj/item/weapon/gun/magic/staff/healing
log_name = "SH"
cost = 1
category = "Defensive"
@@ -351,7 +316,6 @@
name = "Scrying Orb"
desc = "An incandescent orb of crackling energy, using it will allow you to ghost while alive, allowing you to spy upon the station with ease. In addition, buying it will permanently grant you x-ray vision."
item_path = /obj/item/weapon/scrying
log_name = "SO"
category = "Defensive"
/datum/spellbook_entry/item/scryingorb/Buy(mob/living/carbon/human/user,obj/item/weapon/spellbook/book)
@@ -364,7 +328,6 @@
name = "Six Soul Stone Shards and the spell Artificer"
desc = "Soul Stone Shards are ancient tools capable of capturing and harnessing the spirits of the dead and dying. The spell Artificer allows you to create arcane machines for the captured souls to pilot."
item_path = /obj/item/weapon/storage/belt/soulstone/full
log_name = "SS"
category = "Assistance"
/datum/spellbook_entry/item/soulstones/Buy(mob/living/carbon/human/user,obj/item/weapon/spellbook/book)
@@ -377,21 +340,18 @@
name = "A Necromantic Stone"
desc = "A Necromantic stone is able to resurrect three dead individuals as skeletal thralls for you to command."
item_path = /obj/item/device/necromantic_stone
log_name = "NS"
category = "Assistance"
/datum/spellbook_entry/item/wands
name = "Wand Assortment"
desc = "A collection of wands that allow for a wide variety of utility. Wands have a limited number of charges, so be conservative in use. Comes in a handy belt."
item_path = /obj/item/weapon/storage/belt/wands/full
log_name = "WA"
category = "Defensive"
/datum/spellbook_entry/item/armor
name = "Mastercrafted Armor Set"
desc = "An artefact suit of armor that allows you to cast spells while providing more protection against attacks and the void of space."
item_path = /obj/item/clothing/suit/space/hardsuit/wizard
log_name = "HS"
category = "Defensive"
/datum/spellbook_entry/item/armor/Buy(mob/living/carbon/human/user,obj/item/weapon/spellbook/book)
@@ -404,7 +364,6 @@
name = "Contract of Apprenticeship"
desc = "A magical contract binding an apprentice wizard to your service, using it will summon them to your side."
item_path = /obj/item/weapon/antag_spawner/contract
log_name = "CT"
category = "Assistance"
/datum/spellbook_entry/item/guardian
@@ -412,7 +371,6 @@
desc = "A deck of guardian tarot cards, capable of binding a personal guardian to your body. There are multiple types of guardian available, but all of them will transfer some amount of damage to you. \
It would be wise to avoid buying these with anything capable of causing you to swap bodies with others."
item_path = /obj/item/weapon/guardiancreator/choose/wizard
log_name = "GU"
category = "Assistance"
/datum/spellbook_entry/item/guardian/Buy(mob/living/carbon/human/user,obj/item/weapon/spellbook/book)
@@ -424,7 +382,6 @@
name = "Bottle of Blood"
desc = "A bottle of magically infused blood, the smell of which will attract extradimensional beings when broken. Be careful though, the kinds of creatures summoned by blood magic are indiscriminate in their killing, and you yourself may become a victim."
item_path = /obj/item/weapon/antag_spawner/slaughter_demon
log_name = "BB"
limit = 3
category = "Assistance"
@@ -439,7 +396,6 @@
destructive."
item_path = /obj/item/weapon/antag_spawner/slaughter_demon/laughter
cost = 1 //non-destructive; it's just a jape, sibling!
log_name = "HB"
limit = 3
category = "Assistance"
@@ -447,19 +403,16 @@
name = "Mjolnir"
desc = "A mighty hammer on loan from Thor, God of Thunder. It crackles with barely contained power."
item_path = /obj/item/weapon/twohanded/mjollnir
log_name = "MJ"
/datum/spellbook_entry/item/singularity_hammer
name = "Singularity Hammer"
desc = "A hammer that creates an intensely powerful field of gravity where it strikes, pulling everything nearby to the point of impact."
item_path = /obj/item/weapon/twohanded/singularityhammer
log_name = "SI"
/datum/spellbook_entry/item/battlemage
name = "Battlemage Armour"
desc = "An ensorcelled suit of armour, protected by a powerful shield. The shield can completly negate sixteen attacks before being permanently depleted."
item_path = /obj/item/clothing/suit/space/hardsuit/shielded/wizard
log_name = "BM"
limit = 1
category = "Defensive"
@@ -467,7 +420,6 @@
name = "Battlemage Armour Charges"
desc = "A powerful defensive rune, it will grant eight additional charges to a suit of battlemage armour."
item_path = /obj/item/wizard_armour_charge
log_name = "AC"
category = "Defensive"
cost = 1
@@ -475,7 +427,6 @@
name = "Warp Whistle"
desc = "A strange whistle that will transport you to a distant safe place on the station. There is a window of vulnerability at the begining of every use."
item_path = /obj/item/warpwhistle
log_name = "WW"
category = "Mobility"
cost = 1
@@ -504,16 +455,16 @@
/datum/spellbook_entry/summon/ghosts
name = "Summon Ghosts"
desc = "Spook the crew out by making them see dead people. Be warned, ghosts are capricious and occasionally vindicative, and some will use their incredibly minor abilties to frustrate you."
log_name = "SGH"
cost = 0
/datum/spellbook_entry/summon/ghosts/IsAvailible()
if(!ticker.mode)
if(!SSticker.mode)
return FALSE
else
return TRUE
/datum/spellbook_entry/summon/ghosts/Buy(mob/living/carbon/human/user, obj/item/weapon/spellbook/book)
feedback_add_details("wizard_spell_learned", log_name)
feedback_add_details("wizard_spell_learned", name)
new /datum/round_event/wizard/ghost()
active = TRUE
to_chat(user, "<span class='notice'>You have cast summon ghosts!</span>")
@@ -523,15 +474,14 @@
/datum/spellbook_entry/summon/guns
name = "Summon Guns"
desc = "Nothing could possibly go wrong with arming a crew of lunatics just itching for an excuse to kill you. Just be careful not to stand still too long!"
log_name = "SG"
/datum/spellbook_entry/summon/guns/IsAvailible()
if(!ticker.mode) // In case spellbook is placed on map
if(!SSticker.mode) // In case spellbook is placed on map
return 0
return (ticker.mode.name != "ragin' mages" && !config.no_summon_guns)
return (SSticker.mode.name != "ragin' mages" && !config.no_summon_guns)
/datum/spellbook_entry/summon/guns/Buy(mob/living/carbon/human/user,obj/item/weapon/spellbook/book)
feedback_add_details("wizard_spell_learned",log_name)
feedback_add_details("wizard_spell_learned", name)
rightandwrong(0, user, 25)
active = 1
playsound(get_turf(user), 'sound/magic/CastSummon.ogg', 50, 1)
@@ -541,15 +491,14 @@
/datum/spellbook_entry/summon/magic
name = "Summon Magic"
desc = "Share the wonders of magic with the crew and show them why they aren't to be trusted with it at the same time."
log_name = "SU"
/datum/spellbook_entry/summon/magic/IsAvailible()
if(!ticker.mode) // In case spellbook is placed on map
if(!SSticker.mode) // In case spellbook is placed on map
return 0
return (ticker.mode.name != "ragin' mages" && !config.no_summon_magic)
return (SSticker.mode.name != "ragin' mages" && !config.no_summon_magic)
/datum/spellbook_entry/summon/magic/Buy(mob/living/carbon/human/user,obj/item/weapon/spellbook/book)
feedback_add_details("wizard_spell_learned",log_name)
feedback_add_details("wizard_spell_learned", name)
rightandwrong(1, user, 25)
active = 1
playsound(get_turf(user), 'sound/magic/CastSummon.ogg', 50, 1)
@@ -559,17 +508,15 @@
/datum/spellbook_entry/summon/events
name = "Summon Events"
desc = "Give Murphy's law a little push and replace all events with special wizard ones that will confound and confuse everyone. Multiple castings increase the rate of these events."
cost = 2
log_name = "SE"
var/times = 0
/datum/spellbook_entry/summon/events/IsAvailible()
if(!ticker.mode) // In case spellbook is placed on map
if(!SSticker.mode) // In case spellbook is placed on map
return 0
return (ticker.mode.name != "ragin' mages" && !config.no_summon_events)
return (SSticker.mode.name != "ragin' mages" && !config.no_summon_events)
/datum/spellbook_entry/summon/events/Buy(mob/living/carbon/human/user,obj/item/weapon/spellbook/book)
feedback_add_details("wizard_spell_learned",log_name)
feedback_add_details("wizard_spell_learned", name)
summonevents()
times++
playsound(get_turf(user), 'sound/magic/CastSummon.ogg', 50, 1)
@@ -607,6 +554,9 @@
/obj/item/weapon/spellbook/Initialize()
..()
prepare_spells()
/obj/item/weapon/spellbook/proc/prepare_spells()
var/entry_types = subtypesof(/datum/spellbook_entry) - /datum/spellbook_entry/item - /datum/spellbook_entry/summon
for(var/T in entry_types)
var/datum/spellbook_entry/E = new T
@@ -779,28 +729,24 @@
desc = "This template spellbook was never meant for the eyes of man..."
persistence_replacement = null
/obj/item/weapon/spellbook/oneuse/New()
..()
/obj/item/weapon/spellbook/oneuse/prepare_spells()
name += spellname
/obj/item/weapon/spellbook/oneuse/Initialize() //No need to init
return
/obj/item/weapon/spellbook/oneuse/attack_self(mob/user)
var/obj/effect/proc_holder/spell/S = new spell
for(var/obj/effect/proc_holder/spell/knownspell in user.mind.spell_list)
if(knownspell.type == S.type)
if(user.mind)
if(user.mind.special_role == "apprentice" || user.mind.special_role == "Wizard")
user <<"<span class='notice'>You're already far more versed in this spell than this flimsy how-to book can provide.</span>"
to_chat(user,"<span class='notice'>You're already far more versed in this spell than this flimsy how-to book can provide.</span>")
else
user <<"<span class='notice'>You've already read this one.</span>"
to_chat(user,"<span class='notice'>You've already read this one.</span>")
return
if(used)
recoil(user)
else
user.mind.AddSpell(S)
user <<"<span class='notice'>You rapidly read through the arcane book. Suddenly you realize you understand [spellname]!</span>"
to_chat(user,"<span class='notice'>You rapidly read through the arcane book. Suddenly you realize you understand [spellname]!</span>")
user.log_message("<font color='orange'>learned the spell [spellname] ([S]).</font>", INDIVIDUAL_ATTACK_LOG)
onlearned(user)
@@ -833,7 +779,7 @@
/obj/item/weapon/spellbook/oneuse/smoke/recoil(mob/user)
..()
user <<"<span class='caution'>Your stomach rumbles...</span>"
to_chat(user,"<span class='caution'>Your stomach rumbles...</span>")
if(user.nutrition)
user.nutrition -= 200
if(user.nutrition <= 0)
@@ -847,7 +793,7 @@
/obj/item/weapon/spellbook/oneuse/blind/recoil(mob/user)
..()
user <<"<span class='warning'>You go blind!</span>"
to_chat(user,"<span class='warning'>You go blind!</span>")
user.blind_eyes(10)
/obj/item/weapon/spellbook/oneuse/mindswap
@@ -865,21 +811,21 @@
/obj/item/weapon/spellbook/oneuse/mindswap/recoil(mob/user)
..()
if(stored_swap in dead_mob_list)
if(stored_swap in GLOB.dead_mob_list)
stored_swap = null
if(!stored_swap)
stored_swap = user
user <<"<span class='warning'>For a moment you feel like you don't even know who you are anymore.</span>"
to_chat(user,"<span class='warning'>For a moment you feel like you don't even know who you are anymore.</span>")
return
if(stored_swap == user)
user <<"<span class='notice'>You stare at the book some more, but there doesn't seem to be anything else to learn...</span>"
to_chat(user,"<span class='notice'>You stare at the book some more, but there doesn't seem to be anything else to learn...</span>")
return
var/obj/effect/proc_holder/spell/targeted/mind_transfer/swapper = new
swapper.cast(user, stored_swap, 1)
stored_swap <<"<span class='warning'>You're suddenly somewhere else... and someone else?!</span>"
user <<"<span class='warning'>Suddenly you're staring at [src] again... where are you, who are you?!</span>"
to_chat(stored_swap,"<span class='warning'>You're suddenly somewhere else... and someone else?!</span>")
to_chat(user,"<span class='warning'>Suddenly you're staring at [src] again... where are you, who are you?!</span>")
stored_swap = null
/obj/item/weapon/spellbook/oneuse/forcewall
@@ -890,7 +836,7 @@
/obj/item/weapon/spellbook/oneuse/forcewall/recoil(mob/user)
..()
user <<"<span class='warning'>You suddenly feel very solid!</span>"
to_chat(user,"<span class='warning'>You suddenly feel very solid!</span>")
user.Stun(2)
user.petrify(30)
@@ -902,7 +848,7 @@
/obj/item/weapon/spellbook/oneuse/knock/recoil(mob/user)
..()
user <<"<span class='warning'>You're knocked down!</span>"
to_chat(user,"<span class='warning'>You're knocked down!</span>")
user.Weaken(20)
/obj/item/weapon/spellbook/oneuse/barnyard
@@ -913,7 +859,7 @@
/obj/item/weapon/spellbook/oneuse/barnyard/recoil(mob/living/carbon/user)
if(ishuman(user))
user <<"<font size='15' color='red'><b>HOR-SIE HAS RISEN</b></font>"
to_chat(user,"<font size='15' color='red'><b>HOR-SIE HAS RISEN</b></font>")
var/obj/item/clothing/mask/horsehead/magichead = new /obj/item/clothing/mask/horsehead
magichead.flags |= NODROP //curses!
magichead.flags_inv &= ~HIDEFACE //so you can still see their face
@@ -923,7 +869,7 @@
user.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1)
qdel(src)
else
user <<"<span class='notice'>I say thee neigh</span>" //It still lives here
to_chat(user,"<span class='notice'>I say thee neigh</span>") //It still lives here
/obj/item/weapon/spellbook/oneuse/charge
spell = /obj/effect/proc_holder/spell/targeted/charge
@@ -933,7 +879,7 @@
/obj/item/weapon/spellbook/oneuse/charge/recoil(mob/user)
..()
user <<"<span class='warning'>[src] suddenly feels very warm!</span>"
to_chat(user,"<span class='warning'>[src] suddenly feels very warm!</span>")
empulse(src, 1, 1)
/obj/item/weapon/spellbook/oneuse/summonitem
@@ -944,10 +890,11 @@
/obj/item/weapon/spellbook/oneuse/summonitem/recoil(mob/user)
..()
user <<"<span class='warning'>[src] suddenly vanishes!</span>"
to_chat(user,"<span class='warning'>[src] suddenly vanishes!</span>")
qdel(src)
/obj/item/weapon/spellbook/oneuse/random/New()
/obj/item/weapon/spellbook/oneuse/random/Initialize()
..()
var/static/banned_spells = list(/obj/item/weapon/spellbook/oneuse/mimery_blockade,/obj/item/weapon/spellbook/oneuse/mimery_guns)
var/real_type = pick(subtypesof(/obj/item/weapon/spellbook/oneuse) - banned_spells)
new real_type(loc)
+11 -11
View File
@@ -25,11 +25,11 @@
modePlayer += wizard
wizard.assigned_role = "Wizard"
wizard.special_role = "Wizard"
if(wizardstart.len == 0)
if(GLOB.wizardstart.len == 0)
to_chat(wizard.current, "<span class='boldannounce'>A starting location for you could not be found, please report this bug!</span>")
return 0
for(var/datum/mind/wiz in wizards)
wiz.current.loc = pick(wizardstart)
wiz.current.loc = pick(GLOB.wizardstart)
return 1
@@ -97,8 +97,8 @@
/datum/game_mode/proc/name_wizard(mob/living/carbon/human/wizard_mob)
//Allows the wizard to choose a custom name or go with a random one. Spawn 0 so it does not lag the round starting.
var/wizard_name_first = pick(wizard_first)
var/wizard_name_second = pick(wizard_second)
var/wizard_name_first = pick(GLOB.wizard_first)
var/wizard_name_second = pick(GLOB.wizard_second)
var/randomname = "[wizard_name_first] [wizard_name_second]"
spawn(0)
var/newname = copytext(sanitize(input(wizard_mob, "You are the Space Wizard. Would you like to change your name to something else?", "Name change", randomname) as null|text),1,MAX_NAME_LEN)
@@ -168,9 +168,9 @@
if(isliving(wizard.current) && wizard.current.stat!=DEAD)
return ..()
if(SSevent.wizardmode) //If summon events was active, turn it off
SSevent.toggleWizardmode()
SSevent.resetFrequency()
if(SSevents.wizardmode) //If summon events was active, turn it off
SSevents.toggleWizardmode()
SSevents.resetFrequency()
return ..()
@@ -179,7 +179,7 @@
feedback_set_details("round_end_result","loss - wizard killed")
to_chat(world, "<span class='userdanger'>The wizard[(wizards.len>1)?"s":""] has been killed by the crew! The Space Wizards Federation has been taught a lesson they will not soon forget!</span>")
ticker.news_report = WIZARD_KILLED
SSticker.news_report = WIZARD_KILLED
..()
return 1
@@ -247,15 +247,15 @@
//returns whether the mob is a wizard (or apprentice)
/proc/iswizard(mob/living/M)
return istype(M) && M.mind && ticker && ticker.mode && ((M.mind in ticker.mode.wizards) || (M.mind in ticker.mode.apprentices))
return istype(M) && M.mind && SSticker && SSticker.mode && ((M.mind in SSticker.mode.wizards) || (M.mind in SSticker.mode.apprentices))
/datum/game_mode/proc/update_wiz_icons_added(datum/mind/wiz_mind)
var/datum/atom_hud/antag/wizhud = huds[ANTAG_HUD_WIZ]
var/datum/atom_hud/antag/wizhud = GLOB.huds[ANTAG_HUD_WIZ]
wizhud.join_hud(wiz_mind.current)
set_antag_hud(wiz_mind.current, ((wiz_mind in wizards) ? "wizard" : "apprentice"))
/datum/game_mode/proc/update_wiz_icons_removed(datum/mind/wiz_mind)
var/datum/atom_hud/antag/wizhud = huds[ANTAG_HUD_WIZ]
var/datum/atom_hud/antag/wizhud = GLOB.huds[ANTAG_HUD_WIZ]
wizhud.leave_hud(wiz_mind.current)
set_antag_hud(wiz_mind.current, null)