/tg/ 4/14 (#367)
* outside code stuff * defines, helpers, etc * everything not module * modules * compiled fixes + missing sounds
This commit is contained in:
@@ -78,7 +78,7 @@
|
||||
triggering = FALSE
|
||||
message_admins("[key_name_admin(usr)] cancelled event [name].")
|
||||
log_admin_private("[key_name(usr)] cancelled event [name].")
|
||||
feedback_add_details("admin_verb","Cancel Event: [typepath]")
|
||||
feedback_add_details("event_admin_cancelled","[typepath]")
|
||||
|
||||
/datum/round_event_control/proc/runEvent(random)
|
||||
var/datum/round_event/E = new typepath()
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
else
|
||||
regular_candidates = list()
|
||||
|
||||
shuffle(regular_candidates)
|
||||
shuffle_inplace(regular_candidates)
|
||||
|
||||
var/list/candidates = priority_candidates + regular_candidates
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
|
||||
/datum/round_event_control/shuttle_loan
|
||||
name = "Shuttle loan"
|
||||
name = "Shuttle Loan"
|
||||
typepath = /datum/round_event/shuttle_loan
|
||||
max_occurrences = 1
|
||||
earliest_start = 4000
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
if(turfs.len) //Pick a turf to spawn at if we can
|
||||
var/turf/T = pick(turfs)
|
||||
new/obj/effect/spacevine_controller(T) //spawn a controller at turf
|
||||
new /datum/spacevine_controller(T) //spawn a controller at turf
|
||||
|
||||
|
||||
/datum/spacevine_mutation
|
||||
@@ -80,12 +80,7 @@
|
||||
/datum/spacevine_mutation/space_covering/New()
|
||||
. = ..()
|
||||
if(!coverable_turfs)
|
||||
coverable_turfs = typecacheof(list(
|
||||
/turf/open/space
|
||||
))
|
||||
coverable_turfs -= typecacheof(list(
|
||||
/turf/open/space/transit
|
||||
))
|
||||
coverable_turfs = typecacheof(list(/turf/open/space)) - /turf/open/space/transit
|
||||
|
||||
/datum/spacevine_mutation/space_covering/on_grow(obj/structure/spacevine/holder)
|
||||
process_mutation(holder)
|
||||
@@ -324,10 +319,10 @@
|
||||
obj_integrity = 50
|
||||
max_integrity = 50
|
||||
var/energy = 0
|
||||
var/obj/effect/spacevine_controller/master = null
|
||||
var/datum/spacevine_controller/master = null
|
||||
var/list/mutations = list()
|
||||
|
||||
/obj/structure/spacevine/New()
|
||||
/obj/structure/spacevine/Initialize()
|
||||
..()
|
||||
add_atom_colour("#ffffff", FIXED_COLOUR_PRIORITY)
|
||||
|
||||
@@ -347,13 +342,7 @@
|
||||
for(var/datum/spacevine_mutation/SM in mutations)
|
||||
SM.on_death(src)
|
||||
if(master)
|
||||
master.vines -= src
|
||||
master.growth_queue -= src
|
||||
if(!master.vines.len)
|
||||
var/obj/item/seeds/kudzu/KZ = new(loc)
|
||||
KZ.mutations |= mutations
|
||||
KZ.set_potency(master.mutativeness * 10)
|
||||
KZ.set_production((master.spread_cap / initial(master.spread_cap)) * 5)
|
||||
master.VineDestroyed(src)
|
||||
mutations = list()
|
||||
set_opacity(0)
|
||||
if(has_buckled_mobs())
|
||||
@@ -428,41 +417,49 @@
|
||||
/obj/structure/spacevine/attack_alien(mob/living/user)
|
||||
eat(user)
|
||||
|
||||
/obj/effect/spacevine_controller
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
var/list/obj/structure/spacevine/vines = list()
|
||||
var/list/growth_queue = list()
|
||||
/datum/spacevine_controller
|
||||
var/list/obj/structure/spacevine/vines
|
||||
var/list/growth_queue
|
||||
var/spread_multiplier = 5
|
||||
var/spread_cap = 30
|
||||
var/list/GLOB.mutations_list = list()
|
||||
var/list/vine_mutations_list
|
||||
var/mutativeness = 1
|
||||
|
||||
/obj/effect/spacevine_controller/New(loc, list/muts, potency, production)
|
||||
add_atom_colour("#ffffff", FIXED_COLOUR_PRIORITY)
|
||||
spawn_spacevine_piece(loc, , muts)
|
||||
/datum/spacevine_controller/New(turf/location, list/muts, potency, production)
|
||||
spawn_spacevine_piece(location, null, muts)
|
||||
START_PROCESSING(SSobj, src)
|
||||
init_subtypes(/datum/spacevine_mutation/, GLOB.mutations_list)
|
||||
vines = list()
|
||||
growth_queue = list()
|
||||
vine_mutations_list = list()
|
||||
init_subtypes(/datum/spacevine_mutation/, vine_mutations_list)
|
||||
if(potency != null)
|
||||
mutativeness = potency / 10
|
||||
if(production != null)
|
||||
spread_cap *= production / 5
|
||||
spread_multiplier /= production / 5
|
||||
..()
|
||||
|
||||
/obj/effect/spacevine_controller/ex_act() //only killing all vines will end this suffering
|
||||
return
|
||||
/datum/spacevine_controller/vv_drop_down/vv_get_dropdown()
|
||||
. = ..()
|
||||
. += "---"
|
||||
.["Delete Vines"] = "?_src_=\ref[src];purge_vines=1"
|
||||
|
||||
/obj/effect/spacevine_controller/singularity_act()
|
||||
return
|
||||
/datum/spacevine_controller/Topic(href, href_list)
|
||||
if(..() || !check_rights(R_ADMIN, FALSE))
|
||||
return
|
||||
|
||||
if(href_list["purge_vines"])
|
||||
if(alert(usr, "Are you sure you want to delete this spacevine cluster?", "Delete Vines", "Yes", "No") != "Yes")
|
||||
return
|
||||
DeleteVines()
|
||||
|
||||
/obj/effect/spacevine_controller/singularity_pull()
|
||||
return
|
||||
/datum/spacevine_controller/proc/DeleteVines() //this is kill
|
||||
QDEL_LIST(vines) //this will also qdel us
|
||||
|
||||
/obj/effect/spacevine_controller/Destroy()
|
||||
/datum/spacevine_controller/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/spacevine_controller/proc/spawn_spacevine_piece(turf/location, obj/structure/spacevine/parent, list/muts)
|
||||
/datum/spacevine_controller/proc/spawn_spacevine_piece(turf/location, obj/structure/spacevine/parent, list/muts)
|
||||
var/obj/structure/spacevine/SV = new(location)
|
||||
growth_queue += SV
|
||||
vines += SV
|
||||
@@ -476,17 +473,28 @@
|
||||
var/parentcolor = parent.atom_colours[FIXED_COLOUR_PRIORITY]
|
||||
SV.add_atom_colour(parentcolor, FIXED_COLOUR_PRIORITY)
|
||||
if(prob(mutativeness))
|
||||
var/datum/spacevine_mutation/randmut = pick(GLOB.mutations_list - SV.mutations)
|
||||
var/datum/spacevine_mutation/randmut = pick(vine_mutations_list - SV.mutations)
|
||||
randmut.add_mutation_to_vinepiece(SV)
|
||||
|
||||
for(var/datum/spacevine_mutation/SM in SV.mutations)
|
||||
SM.on_birth(SV)
|
||||
|
||||
/obj/effect/spacevine_controller/process()
|
||||
if(!vines)
|
||||
/datum/spacevine_controller/proc/VineDestroyed(obj/structure/spacevine/S)
|
||||
S.master = null
|
||||
vines -= S
|
||||
growth_queue -= S
|
||||
if(!vines.len)
|
||||
var/obj/item/seeds/kudzu/KZ = new(S.loc)
|
||||
KZ.mutations |= S.mutations
|
||||
KZ.set_potency(mutativeness * 10)
|
||||
KZ.set_production((spread_cap / initial(spread_cap)) * 5)
|
||||
qdel(src)
|
||||
|
||||
/datum/spacevine_controller/process()
|
||||
if(!LAZYLEN(vines))
|
||||
qdel(src) //space vines exterminated. Remove the controller
|
||||
return
|
||||
if(!growth_queue)
|
||||
if(!LAZYLEN(growth_queue))
|
||||
qdel(src) //Sanity check
|
||||
return
|
||||
|
||||
|
||||
@@ -6,27 +6,10 @@
|
||||
earliest_start = 0
|
||||
|
||||
/datum/round_event/wizard/rpgloot/start()
|
||||
var/list/prefixespositive = list("greater", "major", "blessed", "superior", "enpowered", "honed", "true", "glorious", "robust")
|
||||
var/list/prefixesnegative = list("lesser", "minor", "blighted", "inferior", "enfeebled", "rusted", "unsteady", "tragic", "gimped")
|
||||
var/list/suffixes = list("orc slaying", "elf slaying", "corgi slaying", "strength", "dexterity", "constitution", "intelligence", "wisdom", "charisma", "the forest", "the hills", "the plains", "the sea", "the sun", "the moon", "the void", "the world", "the fool", "many secrets", "many tales", "many colors", "rending", "sundering", "the night", "the day")
|
||||
var/upgrade_scroll_chance = 0
|
||||
var/upgrade_scroll_chance = 0
|
||||
for(var/obj/item/I in world)
|
||||
if(istype(I,/obj/item/organ/))
|
||||
continue
|
||||
var/quality = pick(1;15, 2;14, 2;13, 2;12, 3;11, 3;10, 3;9, 4;8, 4;7, 4;6, 5;5, 5;4, 5;3, 6;2, 6;1, 6;0)
|
||||
if(prob(50))
|
||||
quality = -quality
|
||||
if(quality > 0)
|
||||
I.name = "[pick(prefixespositive)] [I.name] of [pick(suffixes)] +[quality]"
|
||||
else if(quality < 0)
|
||||
I.name = "[pick(prefixesnegative)] [I.name] of [pick(suffixes)] [quality]"
|
||||
else
|
||||
I.name = "[I.name] of [pick(suffixes)]"
|
||||
|
||||
I.force = max(0,I.force + quality)
|
||||
I.throwforce = max(0,I.throwforce + quality)
|
||||
for(var/value in I.armor)
|
||||
I.armor[value] += quality
|
||||
if(!istype(I.rpg_loot))
|
||||
I.rpg_loot = new(I)
|
||||
|
||||
if(istype(I,/obj/item/weapon/storage))
|
||||
var/obj/item/weapon/storage/S = I
|
||||
@@ -36,28 +19,97 @@
|
||||
upgrade_scroll_chance = max(0,upgrade_scroll_chance-100)
|
||||
upgrade_scroll_chance += 25
|
||||
|
||||
GLOB.rpg_loot_items = TRUE
|
||||
|
||||
/obj/item/upgradescroll
|
||||
name = "Item Fortification Scroll"
|
||||
name = "item fortification scroll"
|
||||
desc = "Somehow, this piece of paper can be applied to items to make them \"better\". Apparently there's a risk of losing the item if it's already \"too good\". <i>This all feels so arbitrary...</i>"
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "scroll"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
var/upgrade_amount = 1
|
||||
var/can_backfire = TRUE
|
||||
var/one_use = TRUE
|
||||
|
||||
/obj/item/upgradescroll/afterattack(obj/item/target, mob/user , proximity)
|
||||
if(!proximity || !istype(target))
|
||||
return
|
||||
var/quality = target.force - initial(target.force)
|
||||
if(quality > 9 && prob((quality - 9)*10))
|
||||
to_chat(user, "<span class='danger'>[target] catches fire!</span>")
|
||||
if(target.resistance_flags & (LAVA_PROOF|FIRE_PROOF))
|
||||
target.resistance_flags &= ~(LAVA_PROOF|FIRE_PROOF)
|
||||
target.resistance_flags |= FLAMMABLE
|
||||
target.fire_act()
|
||||
|
||||
var/datum/rpg_loot/rpg_loot_datum = target.rpg_loot
|
||||
if(!istype(rpg_loot_datum))
|
||||
rpg_loot_datum = new /datum/rpg_loot(target)
|
||||
|
||||
var/quality = rpg_loot_datum.quality
|
||||
|
||||
if(can_backfire && (quality > 9 && prob((quality - 9)*10)))
|
||||
to_chat(user, "<span class='danger'>[target] violently glows blue for a while, then evaporates.</span>")
|
||||
target.burn()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[target] glows blue and seems vaguely \"better\"!</span>")
|
||||
rpg_loot_datum.modify(upgrade_amount)
|
||||
|
||||
if(one_use)
|
||||
qdel(src)
|
||||
return
|
||||
target.force += 1
|
||||
target.throwforce += 1
|
||||
for(var/value in target.armor)
|
||||
target.armor[value] += 1
|
||||
to_chat(user, "<span class='notice'>[target] glows blue and seems vaguely \"better\"!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/upgradescroll/unlimited
|
||||
name = "unlimited foolproof item fortification scroll"
|
||||
desc = "Somehow, this piece of paper can be applied to items to make them \"better\". This scroll is made from the tongues of dead paper wizards, and can be used an unlimited number of times, with no drawbacks."
|
||||
one_use = FALSE
|
||||
can_backfire = FALSE
|
||||
|
||||
/datum/rpg_loot
|
||||
var/positive_prefix = "okay"
|
||||
var/negative_prefix = "weak"
|
||||
var/suffix = "something profound"
|
||||
var/quality = 0
|
||||
|
||||
var/obj/item/attached
|
||||
var/original_name
|
||||
|
||||
/datum/rpg_loot/New(attached_item=null)
|
||||
attached = attached_item
|
||||
|
||||
randomise()
|
||||
|
||||
/datum/rpg_loot/Destroy()
|
||||
attached = null
|
||||
|
||||
/datum/rpg_loot/proc/randomise()
|
||||
var/static/list/prefixespositive = list("greater", "major", "blessed", "superior", "enpowered", "honed", "true", "glorious", "robust")
|
||||
var/static/list/prefixesnegative = list("lesser", "minor", "blighted", "inferior", "enfeebled", "rusted", "unsteady", "tragic", "gimped")
|
||||
var/static/list/suffixes = list("orc slaying", "elf slaying", "corgi slaying", "strength", "dexterity", "constitution", "intelligence", "wisdom", "charisma", "the forest", "the hills", "the plains", "the sea", "the sun", "the moon", "the void", "the world", "the fool", "many secrets", "many tales", "many colors", "rending", "sundering", "the night", "the day")
|
||||
|
||||
var/new_quality = pick(1;15, 2;14, 2;13, 2;12, 3;11, 3;10, 3;9, 4;8, 4;7, 4;6, 5;5, 5;4, 5;3, 6;2, 6;1, 6;0)
|
||||
|
||||
suffix = pick(suffixes)
|
||||
positive_prefix = pick(prefixespositive)
|
||||
negative_prefix = pick(prefixesnegative)
|
||||
|
||||
if(prob(50))
|
||||
new_quality = -new_quality
|
||||
|
||||
modify(new_quality)
|
||||
|
||||
/datum/rpg_loot/proc/rename()
|
||||
var/obj/item/I = attached
|
||||
if(!original_name)
|
||||
original_name = I.name
|
||||
if(quality < 0)
|
||||
I.name = "[negative_prefix] [original_name] of [suffix] [quality]"
|
||||
else if(quality == 0)
|
||||
I.name = "[original_name] of [suffix]"
|
||||
else if(quality > 0)
|
||||
I.name = "[positive_prefix] [original_name] of [suffix] +[quality]"
|
||||
|
||||
/datum/rpg_loot/proc/modify(quality_mod)
|
||||
var/obj/item/I = attached
|
||||
quality += quality_mod
|
||||
|
||||
I.force = max(0,I.force + quality_mod)
|
||||
I.throwforce = max(0,I.throwforce + quality_mod)
|
||||
|
||||
for(var/value in I.armor)
|
||||
I.armor[value] += quality
|
||||
|
||||
rename()
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
if(!mobs)
|
||||
return
|
||||
|
||||
shuffle(moblocs)
|
||||
shuffle(mobs)
|
||||
shuffle_inplace(moblocs)
|
||||
shuffle_inplace(mobs)
|
||||
|
||||
for(var/mob/living/carbon/human/H in mobs)
|
||||
if(!moblocs)
|
||||
@@ -55,8 +55,8 @@
|
||||
if(!mobs)
|
||||
return
|
||||
|
||||
shuffle(mobnames)
|
||||
shuffle(mobs)
|
||||
shuffle_inplace(mobnames)
|
||||
shuffle_inplace(mobs)
|
||||
|
||||
for(var/mob/living/carbon/human/H in mobs)
|
||||
if(!mobnames)
|
||||
@@ -89,7 +89,7 @@
|
||||
if(!mobs)
|
||||
return
|
||||
|
||||
shuffle(mobs)
|
||||
shuffle_inplace(mobs)
|
||||
|
||||
var/obj/effect/proc_holder/spell/targeted/mind_transfer/swapper = new /obj/effect/proc_holder/spell/targeted/mind_transfer
|
||||
while(mobs.len > 1)
|
||||
|
||||
Reference in New Issue
Block a user