/tg/ 4/14 (#367)

* outside code stuff

* defines, helpers, etc

* everything not module

* modules

* compiled fixes + missing sounds
This commit is contained in:
Poojawa
2017-04-14 23:28:04 -05:00
committed by GitHub
parent 884fb45516
commit 9e72b1b8fd
170 changed files with 4916 additions and 1221 deletions
+1 -1
View File
@@ -172,7 +172,7 @@
message["message_sender"] = source
message["message"] = msg
message["source"] = "([config.cross_name])"
message["key"] = GLOB.comms_key
message["key"] = global.comms_key
message["crossmessage"] = type
world.Export("[config.cross_address]?[list2params(message)]")
+3 -3
View File
@@ -755,11 +755,11 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(!holder)
return
GLOB.medals_enabled = !GLOB.medals_enabled
global.medals_enabled = !global.medals_enabled
message_admins("<span class='adminnotice'>[key_name_admin(src)] [GLOB.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.</span>")
message_admins("<span class='adminnotice'>[key_name_admin(src)] [global.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.</span>")
feedback_add_details("admin_verb","Toggle Medal Disable") // If...
log_admin("[key_name(src)] [GLOB.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.")
log_admin("[key_name(src)] [global.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.")
/client/proc/view_runtimes()
set category = "Debug"
+1 -1
View File
@@ -224,7 +224,7 @@
var/agentcount = 0
for(var/i = 0, i<numagents,i++)
shuffle(candidates) //More shuffles means more randoms
shuffle_inplace(candidates) //More shuffles means more randoms
for(var/mob/j in candidates)
if(!j || !j.client)
candidates.Remove(j)
@@ -322,10 +322,10 @@
for(var/t in turf_list)
var/turf/open/T = t
if (space_is_all_consuming && !space_in_group && istype(T.air, /datum/gas_mixture/space))
if (space_is_all_consuming && !space_in_group && istype(T.air, /datum/gas_mixture/immutable/space))
space_in_group = 1
qdel(A)
A = new/datum/gas_mixture/space()
A = new/datum/gas_mixture/immutable/space()
A.merge(T.air)
for(var/id in A_gases)
@@ -0,0 +1,81 @@
//"immutable" gas mixture used for immutable calculations
//it can be changed, but any changes will ultimately be undone before they can have any effect
/datum/gas_mixture/immutable
var/initial_temperature
/datum/gas_mixture/immutable/proc/reset_gas_mix()
temperature = initial_temperature
temperature_archived = initial_temperature
/datum/gas_mixture/immutable/New()
..()
reset_gas_mix()
/datum/gas_mixture/immutable/garbage_collect()
reset_gas_mix()
/datum/gas_mixture/immutable/archive()
return 1 //nothing changes, so we do nothing and the archive is successful
/datum/gas_mixture/immutable/merge()
return 0 //we're immutable.
/datum/gas_mixture/immutable/heat_capacity_archived()
return heat_capacity()
/datum/gas_mixture/immutable/share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4)
. = ..(sharer, 0)
reset_gas_mix()
/datum/gas_mixture/immutable/after_share()
temperature = initial_temperature
reset_gas_mix()
/datum/gas_mixture/immutable/react()
return 0 //we're immutable.
/datum/gas_mixture/immutable/copy()
return new type //we're immutable, so we can just return a new instance.
/datum/gas_mixture/immutable/copy_from()
return 0 //we're immutable.
/datum/gas_mixture/immutable/copy_from_turf()
return 0 //we're immutable.
/datum/gas_mixture/immutable/parse_gas_string()
return 0 //we're immutable.
/datum/gas_mixture/immutable/temperature_share(datum/gas_mixture/sharer, conduction_coefficient, sharer_temperature, sharer_heat_capacity)
. = ..()
temperature = initial_temperature
//used by space tiles
/datum/gas_mixture/immutable/space
initial_temperature = TCMB
/datum/gas_mixture/immutable/space/garbage_collect()
gases.Cut() //clever way of ensuring we always are empty.
/datum/gas_mixture/immutable/space/heat_capacity()
return 7000
/datum/gas_mixture/immutable/space/remove()
return copy() //we're always empty, so we can just return a copy.
/datum/gas_mixture/immutable/space/remove_ratio()
return copy() //we're always empty, so we can just return a copy.
//used by cloners
/datum/gas_mixture/immutable/cloner
initial_temperature = T20C
/datum/gas_mixture/immutable/cloner/reset_gas_mix()
assert_gas("n2")
gases["n2"][MOLES] = MOLES_O2STANDARD + MOLES_N2STANDARD
..()
/datum/gas_mixture/immutable/cloner/heat_capacity()
return (MOLES_O2STANDARD + MOLES_N2STANDARD)*20 //specific heat of nitrogen is 20
+1 -1
View File
@@ -105,7 +105,7 @@
/datum/export/rcd
cost = 100 // 15 metal -> 75 credits, +25 credits for production
unit_name = "rapid construction device"
export_types = list(/obj/item/weapon/rcd)
export_types = list(/obj/item/weapon/construction/rcd)
/datum/export/rcd_ammo
cost = 15 // 1.5 metal, 1 glass -> 12.5 credits, +2.5 credits
+1 -1
View File
@@ -279,7 +279,7 @@ GLOBAL_LIST(external_rsc_urls)
add_admin_verbs()
to_chat(src, get_message_output("memo"))
adminGreet()
if((GLOB.comms_key == "default_pwd" || length(GLOB.comms_key) <= 6) && GLOB.comms_allowed) //It's the default value or less than 6 characters long, but it somehow didn't disable comms.
if((global.comms_key == "default_pwd" || length(global.comms_key) <= 6) && global.comms_allowed) //It's the default value or less than 6 characters long, but it somehow didn't disable comms.
to_chat(src, "<span class='danger'>The server's API key is either too short or is the default value! Consider changing it immediately!</span>")
/* if(mentor && !holder)
+2 -2
View File
@@ -139,7 +139,7 @@
/obj/item/weapon/melee/baton/loaded=1,\
/obj/item/clothing/mask/gas/sechailer=1,\
/obj/item/weapon/gun/energy/e_gun=1,\
/obj/item/weapon/rcd/loaded=1)
/obj/item/weapon/construction/rcd/loaded=1)
/datum/outfit/ert/engineer/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
..()
@@ -158,7 +158,7 @@
/obj/item/weapon/melee/baton/loaded=1,\
/obj/item/clothing/mask/gas/sechailer/swat=1,\
/obj/item/weapon/gun/energy/pulse/pistol/loyalpin=1,\
/obj/item/weapon/rcd/combat=1)
/obj/item/weapon/construction/rcd/combat=1)
/datum/outfit/centcom_official
+1 -1
View File
@@ -67,7 +67,7 @@
obj_integrity = 300
max_integrity = 300
armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 75, fire = 50, acid = 75)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals,/obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/pipe_dispenser)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals,/obj/item/device/t_scanner, /obj/item/weapon/construction/rcd, /obj/item/weapon/pipe_dispenser)
siemens_coefficient = 0
var/obj/item/clothing/head/helmet/space/hardsuit/helmet
actions_types = list(/datum/action/item_action/toggle_helmet)
+1 -1
View File
@@ -493,7 +493,7 @@
icon_state = "coatengineer"
item_state = "coatengineer"
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 20, fire = 30, acid = 45)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/pipe_dispenser)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/device/t_scanner, /obj/item/weapon/construction/rcd, /obj/item/weapon/pipe_dispenser)
hoodtype = /obj/item/clothing/head/hooded/winterhood/engineering
/obj/item/clothing/head/hooded/winterhood/engineering
+1 -1
View File
@@ -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()
+1 -1
View File
@@ -63,7 +63,7 @@
else
regular_candidates = list()
shuffle(regular_candidates)
shuffle_inplace(regular_candidates)
var/list/candidates = priority_candidates + regular_candidates
+1 -1
View File
@@ -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
+46 -38
View File
@@ -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
+87 -35
View File
@@ -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()
+5 -5
View File
@@ -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)
+1 -2
View File
@@ -538,7 +538,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
/obj/item/device/radio/headset/syndicate, /obj/item/weapon/grenade/plastic/c4,\
/obj/item/device/powersink, /obj/item/weapon/storage/box/syndie_kit,\
/obj/item/toy/syndicateballoon, /obj/item/weapon/gun/energy/laser/captain,\
/obj/item/weapon/hand_tele, /obj/item/weapon/rcd, /obj/item/weapon/tank/jetpack,\
/obj/item/weapon/hand_tele, /obj/item/weapon/construction/rcd, /obj/item/weapon/tank/jetpack,\
/obj/item/clothing/under/rank/captain, /obj/item/device/aicard,\
/obj/item/clothing/shoes/magboots, /obj/item/areaeditor/blueprints, /obj/item/weapon/disk/nuclear,\
/obj/item/clothing/suit/space/nasavoid, /obj/item/weapon/tank)
@@ -673,7 +673,6 @@ Gunshots/explosions/opening doors/less rare audio (done)
QDEL_IN(O, 300)
/obj/effect/hallucination/bolts
var/list/doors = list()
+1 -1
View File
@@ -51,7 +51,7 @@
P.name = "Blank Card"
P.card_icon = "cas_white"
cards += P
shuffle(cards) // distribute blank cards throughout deck
shuffle_inplace(cards) // distribute blank cards throughout deck
..()
/obj/item/toy/cards/deck/cas/attack_hand(mob/user)
+1 -1
View File
@@ -1,5 +1,5 @@
//Vars that will not be copied when using /DuplicateObject
GLOBAL_LIST_INIT(duplicate_forbidden_vars,list("area","type","loc","locs","vars", "parent","parent_type", "verbs","ckey","key","power_supply","contents","reagents","stat","x","y","z","group","atmos_adjacent_turfs"))
GLOBAL_LIST_INIT(duplicate_forbidden_vars,list("tag","area","type","loc","locs","vars", "parent","parent_type", "verbs","ckey","key","power_supply","contents","reagents","stat","x","y","z","group","atmos_adjacent_turfs"))
/proc/DuplicateObject(atom/original, perfectcopy = TRUE, sameloc = FALSE, atom/newloc = null, nerf = FALSE, holoitem=FALSE)
if(!original)
+1 -1
View File
@@ -38,7 +38,7 @@
to_chat(user, "<span class='notice'>You plant [src].</span>")
message_admins("Kudzu planted by [ADMIN_LOOKUPFLW(user)] at [ADMIN_COORDJMP(user)]",0,1)
investigate_log("was planted by [key_name(user)] at [COORD(user)]","botany")
new /obj/effect/spacevine_controller(user.loc, mutations, potency, production)
new /datum/spacevine_controller(get_turf(user), mutations, potency, production)
qdel(src)
/obj/item/seeds/kudzu/attack_self(mob/user)
+1 -1
View File
@@ -374,7 +374,7 @@
if(CG) // 10x charge for deafult cell charge gene - 20 000 with 100 potency.
pocell.maxcharge *= CG.rate*1000
pocell.charge = pocell.maxcharge
pocell.name = "[G] battery"
pocell.name = "[G.name] battery"
pocell.desc = "A rechargable plant based power cell. This one has a power rating of [pocell.maxcharge], and you should not swallow it."
if(G.reagents.has_reagent("plasma", 2))
+2 -9
View File
@@ -46,7 +46,7 @@
var/x = round(world.maxx/2)
var/y = round(world.maxy/2)
var/list/bounds = maploader.load_map(get_file(), x, y)
var/list/bounds = maploader.load_map(file(mappath), x, y)
if(!bounds)
return FALSE
@@ -67,7 +67,7 @@
if(T.y+height > world.maxy)
return
var/list/bounds = maploader.load_map(get_file(), T.x, T.y, T.z, cropMap=TRUE)
var/list/bounds = maploader.load_map(file(mappath), T.x, T.y, T.z, cropMap=TRUE)
if(!bounds)
return
@@ -77,13 +77,6 @@
log_game("[name] loaded at at [T.x],[T.y],[T.z]")
return TRUE
/datum/map_template/proc/get_file()
if(mappath)
. = file(mappath)
if(!.)
world.log << "The file of [src] ([mappath]) appears to be empty/non-existent."
/datum/map_template/proc/get_affected_turfs(turf/T, centered = FALSE)
var/turf/placement = T
if(centered)
+4 -4
View File
@@ -20,7 +20,7 @@
dir = direct //This camera eye is visible as a drone, and needs to keep the dir updated
..()
/obj/item/weapon/rcd/internal //Base console's internal RCD. Roundstart consoles are filled, rebuilt cosoles start empty.
/obj/item/weapon/construction/rcd/internal //Base console's internal RCD. Roundstart consoles are filled, rebuilt cosoles start empty.
name = "internal RCD"
max_matter = 600 //Bigger container and faster speeds due to being specialized and stationary.
no_ammo_message = "<span class='warning'>Internal matter exhausted. Please add additional materials.</span>"
@@ -30,7 +30,7 @@
name = "base contruction console"
desc = "An industrial computer integrated with a camera-assisted rapid construction drone."
networks = list("SS13")
var/obj/item/weapon/rcd/internal/RCD //Internal RCD. The computer passes user commands to this in order to avoid massive copypaste.
var/obj/item/weapon/construction/rcd/internal/RCD //Internal RCD. The computer passes user commands to this in order to avoid massive copypaste.
circuit = /obj/item/weapon/circuitboard/computer/base_construction
off_action = new/datum/action/innate/camera_off/base_construction
var/datum/action/innate/aux_base/switch_mode/switch_mode_action = new //Action for switching the RCD's build modes
@@ -50,7 +50,7 @@
/obj/machinery/computer/camera_advanced/base_construction/New()
..()
RCD = new /obj/item/weapon/rcd/internal(src)
RCD = new /obj/item/weapon/construction/rcd/internal(src)
/obj/machinery/computer/camera_advanced/base_construction/Initialize(mapload)
..()
@@ -117,7 +117,7 @@
remote_eye = C.remote_control
B = target
if(!B.RCD) //The console must always have an RCD.
B.RCD = new /obj/item/weapon/rcd/internal(src) //If the RCD is lost somehow, make a new (empty) one!
B.RCD = new /obj/item/weapon/construction/rcd/internal(src) //If the RCD is lost somehow, make a new (empty) one!
/datum/action/innate/aux_base/proc/check_spot()
//Check a loction to see if it is inside the aux base at the station. Camera visbility checks omitted so as to not hinder construction.
+3 -3
View File
@@ -68,7 +68,7 @@
/obj/item/device/wormhole_jaunter/attack_self(mob/user)
user.visible_message("<span class='notice'>[user.name] activates the [src.name]!</span>")
feedback_add_details("jaunter", "U") // user activated
feedback_add_details("jaunter", "User") // user activated
activate(user)
/obj/item/device/wormhole_jaunter/proc/turf_check(mob/user)
@@ -124,13 +124,13 @@
if(triggered)
usr.visible_message("<span class='warning'>The [src] overloads and activates!</span>")
feedback_add_details("jaunter","E") // EMP accidental activation
feedback_add_details("jaunter","EMP") // EMP accidental activation
activate(usr)
/obj/item/device/wormhole_jaunter/proc/chasm_react(mob/user)
if(user.get_item_by_slot(slot_belt) == src)
to_chat(user, "Your [src] activates, saving you from the chasm!</span>")
feedback_add_details("jaunter","C") // chasm automatic activation
feedback_add_details("jaunter","Chasm") // chasm automatic activation
activate(user)
else
to_chat(user, "The [src] is not attached to your belt, preventing it from saving you from the chasm. RIP.</span>")
@@ -87,7 +87,7 @@
user.sight |= SEE_MOBS
icon_state = "lantern"
wisp.orbit(user, 20)
feedback_add_details("wisp_lantern","F") // freed
feedback_add_details("wisp_lantern","Freed") // freed
else
to_chat(user, "<span class='notice'>You return the wisp to the lantern.</span>")
@@ -102,7 +102,7 @@
wisp.stop_orbit()
wisp.loc = src
icon_state = "lantern-blue"
feedback_add_details("wisp_lantern","R") // returned
feedback_add_details("wisp_lantern","Returned") // returned
/obj/item/device/wisp_lantern/Initialize()
..()
@@ -229,7 +229,7 @@
/obj/item/device/immortality_talisman/attack_self(mob/user)
if(cooldown < world.time)
feedback_add_details("immortality_talisman","U") // usage
feedback_add_details("immortality_talisman","Activated") // usage
cooldown = world.time + 600
user.visible_message("<span class='danger'>[user] vanishes from reality, leaving a a hole in [user.p_their()] place!</span>")
var/obj/effect/immortality_talisman/Z = new(get_turf(src.loc))
-3
View File
@@ -51,9 +51,6 @@
new /datum/data/mining_equipment("Drone Ranged Upgrade",/obj/item/device/mine_bot_ugprade/cooldown, 600),
new /datum/data/mining_equipment("Drone AI Upgrade", /obj/item/slimepotion/sentience/mining, 1000),
new /datum/data/mining_equipment("Jump Boots", /obj/item/clothing/shoes/bhop, 2500),
new /datum/data/mining_equipment("Survival Knife", /obj/item/weapon/kitchen/knife/combat/survival, 350),
new /datum/data/mining_equipment("Stimpack", /obj/item/weapon/reagent_containers/hypospray/medipen/stimpack, 250),
new /datum/data/mining_equipment("Stimpack Economy Pack",/obj/item/weapon/storage/box/medipens/utility, 1000)
)
/datum/data/mining_equipment
@@ -0,0 +1,30 @@
/datum/emote/living/alien
mob_type_allowed_typecache = list(/mob/living/carbon/alien)
/datum/emote/living/alien/gnarl
key = "gnarl"
key_third_person = "gnarls"
message = "gnarls and shows its teeth..."
/datum/emote/living/alien/hiss
key = "hiss"
key_third_person = "hisses"
message_alien = "hisses."
message_larva = "hisses softly."
/datum/emote/living/alien/hiss/run_emote(mob/user, params)
. = ..()
if(. && isalienadult(user))
playsound(user.loc, "hiss", 40, 1, 1)
/datum/emote/living/alien/roar
key = "roar"
key_third_person = "roars"
message_alien = "roars"
message_larva = "softly roars"
emote_type = EMOTE_AUDIBLE
/datum/emote/living/alien/roar/run_emote(mob/user, params)
. = ..()
if(. && isalienadult(user))
playsound(user.loc, 'sound/voice/hiss5.ogg', 40, 1, 1)
@@ -1,88 +0,0 @@
/mob/living/carbon/alien/humanoid/emote(act,m_type=1,message = null)
var/param = null
if (findtext(act, "-", 1, null))
var/t1 = findtext(act, "-", 1, null)
param = copytext(act, t1 + 1, length(act) + 1)
act = copytext(act, 1, t1)
var/muzzled = is_muzzled()
switch(act) //Alphabetical please
if ("deathgasp","deathgasps")
message = "<span class='name'>[src]</span> lets out a waning guttural screech, green blood bubbling from its maw..."
m_type = 2
if ("gnarl","gnarls")
if (!muzzled)
message = "<span class='name'>[src]</span> gnarls and shows its teeth.."
m_type = 2
if ("hiss","hisses")
if(!muzzled)
message = "<span class='name'>[src]</span> hisses."
m_type = 2
if ("me")
..()
return
if ("moan","moans")
message = "<span class='name'>[src]</span> moans!"
m_type = 2
if ("roar","roars")
if (!muzzled)
message = "<span class='name'>[src]</span> roars."
m_type = 2
if ("roll","rolls")
if (!src.restrained())
message = "<span class='name'>[src]</span> rolls."
m_type = 1
if ("scratch","scratches")
if (!src.restrained())
message = "<span class='name'>[src]</span> scratches."
m_type = 1
if ("screech","screeches")
if (!muzzled)
message = "<span class='name'>[src]</span> screeches."
m_type = 2
if ("shiver","shivers")
message = "<span class='name'>[src]</span> shivers."
m_type = 2
if ("sign","signs")
if (!src.restrained())
message = text("<span class='name'>[src]</span> signs[].", (text2num(param) ? text(" the number []", text2num(param)) : null))
m_type = 1
if ("tail")
message = "<span class='name'>[src]</span> waves its tail."
m_type = 1
if ("help") //This is an exception
src << "Help for xenomorph emotes. You can use these emotes with say \"*emote\":\n\naflap, airguitar, blink, blink_r, blush, bow, burp, choke, chucke, clap, collapse, cough, dance, deathgasp, drool, flap, frown, gasp, giggle, glare-(none)/mob, gnarl, hiss, jump, laugh, look-atom, me, moan, nod, point-atom, roar, roll, scream, scratch, screech, shake, shiver, sign-#, sit, smile, sneeze, sniff, snore, stare-(none)/mob, sulk, sway, tail, tremble, twitch, twitch_s, wave, whimper, wink, yawn"
else
..(act)
if ((message && src.stat == 0))
log_emote("[name]/[key] : [message]")
if (act == "roar")
playsound(src.loc, 'sound/voice/hiss5.ogg', 40, 1, 1)
if (act == "hiss")
playsound(src.loc, "hiss", 40, 1, 1)
if (act == "deathgasp")
playsound(src.loc, 'sound/voice/hiss6.ogg', 80, 1, 1)
if (m_type & 1)
visible_message(message)
else
audible_message(message)
return
+8 -10
View File
@@ -234,9 +234,11 @@
if(usr.canUseTopic(src, BE_CLOSE, NO_DEXTERY))
if(href_list["embedded_object"])
var/obj/item/I = locate(href_list["embedded_object"])
var/obj/item/bodypart/L = locate(href_list["embedded_limb"])
if(!I || !L || I.loc != src || !(I in L.embedded_objects)) //no item, no limb, or item is not in limb or in the person anymore
var/obj/item/bodypart/L = locate(href_list["embedded_limb"]) in bodyparts
if(!L)
return
var/obj/item/I = locate(href_list["embedded_object"]) in L.embedded_objects
if(!I || I.loc != src) //no item, no limb, or item is not in limb or in the person anymore
return
var/time_taken = I.embedded_unsafe_removal_time*I.w_class
usr.visible_message("<span class='warning'>[usr] attempts to remove [I] from their [L.name].</span>","<span class='notice'>You attempt to remove [I] from your [L.name]... (It will take [time_taken/10] seconds.)</span>")
@@ -921,18 +923,14 @@
return
if(!riding_datum)
riding_datum = new /datum/riding/human(src)
if(buckled_mobs && ((M in buckled_mobs) || (buckled_mobs.len >= max_buckled_mobs)))
return
if(buckled) //NO INFINITE STACKING!!
return
if(M.stat != CONSCIOUS)
if(buckled_mobs && ((M in buckled_mobs) || (buckled_mobs.len >= max_buckled_mobs)) || buckled || (M.stat != CONSCIOUS))
return
if(iscarbon(M))
if(M.incapacitated(FALSE, TRUE) || incapacitated(FALSE, TRUE))
M.visible_message("<span class='boldwarning'>[M] can't hang onto [src]!</span>")
M.visible_message("<span class='warning'>[M] can't hang onto [src]!</span>")
return
if(!riding_datum.equip_buckle_inhands(M, 2)) //MAKE SURE THIS IS LAST!!
M.visible_message("<span class='boldwarning'>[M] can't climb onto [src] because [M.p_their()] hands are full!</span>")
M.visible_message("<span class='warning'>[M] can't climb onto [src]!</span>")
return
. = ..(M, force, check_loc)
stop_pulling()
@@ -685,7 +685,7 @@
to_chat(src, "\t [status == "OK" ? "\blue" : "\red"] Your [LB.name] is [status].")
for(var/obj/item/I in LB.embedded_objects)
to_chat(src, "\t <a href='byond://?src=\ref[src];embedded_object=\ref[I];embedded_limb=\ref[LB]'>\red There is \a [I] embedded in your [LB.name]!</a>")
to_chat(src, "\t <a href='byond://?src=\ref[src];embedded_object=\ref[I];embedded_limb=\ref[LB]'class='warning'> There is \a [I] embedded in your [LB.name]!</a>")
for(var/t in missing)
to_chat(src, "<span class='boldannounce'>Your [parse_zone(t)] is missing!</span>")
@@ -277,7 +277,7 @@
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
if(prob((FUZZY_CHANCE_LOW+FUZZY_CHANCE_HIGH)/4))
BP.change_bodypart_status(BODYPART_ROBOTIC)
BP.change_bodypart_status(BODYPART_ROBOTIC, FALSE, TRUE)
update_icons()
update_damage_overlays()
functions = list("nearbyscan","combat","shitcurity","chatter") // stop customize adding multiple copies of a function
@@ -141,7 +141,7 @@
return not_handled //For future deeper overrides
/mob/living/carbon/human/doUnEquip(obj/item/I, force, newloc, no_move, invdrop)
/mob/living/carbon/human/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE)
. = ..() //See mob.dm for an explanation on this and some rage about people copypasting instead of calling ..() like they should.
if(!. || !I)
return
@@ -117,6 +117,12 @@
if(thing && (!thing.species_exception || !is_type_in_list(src,thing.species_exception)))
C.dropItemToGround(thing)
// this needs to be FIRST because qdel calls update_body which checks if we have DIGITIGRADE legs or not and if not then removes DIGITIGRADE from species_traits
if(("legs" in C.dna.species.mutant_bodyparts) && C.dna.features["legs"] == "Digitigrade Legs")
species_traits += DIGITIGRADE
if(DIGITIGRADE in species_traits)
C.Digitigrade_Leg_Swap(FALSE)
var/obj/item/organ/heart/heart = C.getorganslot("heart")
var/obj/item/organ/lungs/lungs = C.getorganslot("lungs")
var/obj/item/organ/appendix/appendix = C.getorganslot("appendix")
@@ -157,10 +163,7 @@
if(exotic_bloodtype && C.dna.blood_type != exotic_bloodtype)
C.dna.blood_type = exotic_bloodtype
if(("legs" in C.dna.species.mutant_bodyparts) && C.dna.features["legs"] == "Digitigrade Legs")
species_traits += DIGITIGRADE
if(DIGITIGRADE in species_traits)
C.Digitigrade_Leg_Swap(FALSE)
if(NOAROUSAL in species_traits)
C.canbearoused = FALSE
else
@@ -12,10 +12,10 @@
. = ..()
for(var/X in C.bodyparts)
var/obj/item/bodypart/O = X
O.change_bodypart_status(BODYPART_ROBOTIC)
O.change_bodypart_status(BODYPART_ROBOTIC, 0, 1)
/datum/species/android/on_species_loss(mob/living/carbon/C)
. = ..()
for(var/X in C.bodyparts)
var/obj/item/bodypart/O = X
O.change_bodypart_status(BODYPART_ORGANIC)
O.change_bodypart_status(BODYPART_ORGANIC,FALSE, TRUE)
@@ -132,6 +132,10 @@
return 0
/mob/living/carbon/monkey/proc/handle_combat()
// Don't do any AI if inside another mob (devoured)
if (ismob(loc))
// Really no idea what needs to be returned but everything else is TRUE
return TRUE
if(on_fire || buckled || restrained())
if(!resisting && prob(MONKEY_RESIST_PROB))
@@ -287,7 +287,7 @@
basic_modules = list(
/obj/item/device/assembly/flash/cyborg,
/obj/item/borg/sight/meson,
/obj/item/weapon/rcd/borg,
/obj/item/weapon/construction/rcd/borg,
/obj/item/weapon/pipe_dispenser,
/obj/item/weapon/extinguisher,
/obj/item/weapon/weldingtool/largetank/cyborg,
@@ -338,7 +338,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
to_chat(src, "<span class='danger'><B>You don't have another mode!</span></B>")
/mob/living/simple_animal/hostile/guardian/proc/ToggleLight()
if(!luminosity)
if(light_range<3)
to_chat(src, "<span class='notice'>You activate your light.</span>")
set_light(3)
else
@@ -326,7 +326,7 @@ Difficulty: Hard
pools_to_remove = get_pools(get_turf(target), 1)
pools -= pools_to_remove
if(pools.len)
shuffle(pools)
shuffle_inplace(pools)
found_bloodpool = pick(pools)
if(found_bloodpool)
visible_message("<span class='danger'>[src] sinks into the blood...</span>")
@@ -118,7 +118,7 @@
if(admin_spawned)
return FALSE
if(GLOB.medal_hub && GLOB.medal_pass && GLOB.medals_enabled)
if(global.medal_hub && global.medal_pass && global.medals_enabled)
for(var/mob/living/L in view(7,src))
if(L.stat)
continue
@@ -135,11 +135,11 @@
if(!player || !medal)
return
if(GLOB.medal_hub && GLOB.medal_pass && GLOB.medals_enabled)
if(global.medal_hub && global.medal_pass && global.medals_enabled)
spawn()
var/result = world.SetMedal(medal, player, GLOB.medal_hub, GLOB.medal_pass)
var/result = world.SetMedal(medal, player, global.medal_hub, global.medal_pass)
if(isnull(result))
GLOB.medals_enabled = FALSE
global.medals_enabled = FALSE
log_game("MEDAL ERROR: Could not contact hub to award medal:[medal] player:[player.ckey]")
message_admins("Error! Failed to contact hub to award [medal] medal to [player.ckey]!")
else if (result)
@@ -150,7 +150,7 @@
if(!score || !player)
return
if(GLOB.medal_hub && GLOB.medal_pass && GLOB.medals_enabled)
if(global.medal_hub && global.medal_pass && global.medals_enabled)
spawn()
var/list/oldscore = GetScore(score,player,1)
@@ -164,10 +164,10 @@
var/newscoreparam = list2params(oldscore)
var/result = world.SetScores(player.ckey, newscoreparam, GLOB.medal_hub, GLOB.medal_pass)
var/result = world.SetScores(player.ckey, newscoreparam, global.medal_hub, global.medal_pass)
if(isnull(result))
GLOB.medals_enabled = FALSE
global.medals_enabled = FALSE
log_game("SCORE ERROR: Could not contact hub to set score. Score:[score] player:[player.ckey]")
message_admins("Error! Failed to contact hub to set [score] score for [player.ckey]!")
@@ -176,11 +176,11 @@
if(!score || !player)
return
if(GLOB.medal_hub && GLOB.medal_pass && GLOB.medals_enabled)
if(global.medal_hub && global.medal_pass && global.medals_enabled)
var/scoreget = world.GetScores(player.ckey, score, GLOB.medal_hub, GLOB.medal_pass)
var/scoreget = world.GetScores(player.ckey, score, global.medal_hub, global.medal_pass)
if(isnull(scoreget))
GLOB.medals_enabled = FALSE
global.medals_enabled = FALSE
log_game("SCORE ERROR: Could not contact hub to get score. Score:[score] player:[player.ckey]")
message_admins("Error! Failed to contact hub to get score: [score] for [player.ckey]!")
return
@@ -197,12 +197,12 @@
if(!player || !medal)
return
if(GLOB.medal_hub && GLOB.medal_pass && GLOB.medals_enabled)
if(global.medal_hub && global.medal_pass && global.medals_enabled)
var/result = world.GetMedal(medal, player, GLOB.medal_hub, GLOB.medal_pass)
var/result = world.GetMedal(medal, player, global.medal_hub, global.medal_pass)
if(isnull(result))
GLOB.medals_enabled = FALSE
global.medals_enabled = FALSE
log_game("MEDAL ERROR: Could not contact hub to get medal:[medal] player:[player.ckey]")
message_admins("Error! Failed to contact hub to get [medal] medal for [player.ckey]!")
else if (result)
@@ -212,12 +212,12 @@
if(!player || !medal)
return
if(GLOB.medal_hub && GLOB.medal_pass && GLOB.medals_enabled)
if(global.medal_hub && global.medal_pass && global.medals_enabled)
var/result = world.ClearMedal(medal, player, GLOB.medal_hub, GLOB.medal_pass)
var/result = world.ClearMedal(medal, player, global.medal_hub, global.medal_pass)
if(isnull(result))
GLOB.medals_enabled = FALSE
global.medals_enabled = FALSE
log_game("MEDAL ERROR: Could not contact hub to clear medal:[medal] player:[player.ckey]")
message_admins("Error! Failed to contact hub to clear [medal] medal for [player.ckey]!")
else if (result)
@@ -227,6 +227,6 @@
/proc/ClearScore(client/player)
world.SetScores(player.ckey, "", GLOB.medal_hub, GLOB.medal_pass)
world.SetScores(player.ckey, "", global.medal_hub, global.medal_pass)
#undef MEDAL_PREFIX
@@ -1014,7 +1014,7 @@
last_tendril = FALSE
break
if(last_tendril && !admin_spawned)
if(GLOB.medal_hub && GLOB.medal_pass && GLOB.medals_enabled)
if(global.medal_hub && global.medal_pass && global.medals_enabled)
for(var/mob/living/L in view(7,src))
if(L.stat)
continue
+6 -3
View File
@@ -253,7 +253,7 @@
/obj/item/weapon/paper/proc/openhelp(mob/user)
user << browse({"<HTML><HEAD><TITLE>Pen Help</TITLE></HEAD>
user << browse({"<HTML><HEAD><TITLE>Paper Help</TITLE></HEAD>
<BODY>
<b><center>Crayon&Pen commands</center></b><br>
<br>
@@ -279,6 +279,9 @@
if(usr.stat || usr.restrained())
return
if(href_list["help"])
openhelp(usr)
return
if(href_list["write"])
var/id = href_list["write"]
var/t = stripped_multiline_input("Enter what you want to write:", "Write", no_trim=TRUE)
@@ -303,7 +306,7 @@
info += t // Oh, he wants to edit to the end of the file, let him.
updateinfolinks()
i.on_write(src,usr)
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_links]<HR>[stamps]</BODY></HTML>", "window=[name]") // Update the window
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_links]<HR>[stamps]</BODY><div align='right'style='position:fixed;bottom:0;font-style:bold;'><A href='?src=\ref[src];help=1'>\[?\]</A></div></HTML>", "window=[name]") // Update the window
update_icon()
@@ -318,7 +321,7 @@
if(istype(P, /obj/item/weapon/pen) || istype(P, /obj/item/toy/crayon))
if(user.is_literate())
user << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_links]<HR>[stamps]</BODY></HTML>", "window=[name]")
user << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_links]<HR>[stamps]</BODY><div align='right'style='position:fixed;bottom:0;font-style:bold;'><A href='?src=\ref[src];help=1'>\[?\]</A></div></HTML>", "window=[name]")
return
else
to_chat(user, "<span class='notice'>You don't know how to read or write.</span>")
+4
View File
@@ -89,6 +89,10 @@
c.fields = copy.fields
c.update_icon()
c.updateinfolinks()
c.stamps = copy.stamps
if(copy.stamped)
c.stamped = copy.stamped.Copy()
c.copy_overlays(copy, TRUE)
toner--
busy = 1
sleep(15)
+13 -6
View File
@@ -350,9 +350,7 @@
else
to_chat(user, "<span class='userdanger'>You stick \the [W] into the light socket!</span>")
if(has_power() && (W.flags & CONDUCT))
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(3, 1, src)
s.start()
do_sparks(3, TRUE, src)
if (prob(75))
electrocute_mob(user, get_area(src), src, rand(0.7,1.0), TRUE)
else
@@ -523,9 +521,7 @@
if(status == LIGHT_OK || status == LIGHT_BURNED)
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
if(on)
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(3, 1, src)
s.start()
do_sparks(3, TRUE, src)
status = LIGHT_BROKEN
update()
@@ -653,3 +649,14 @@
force = 5
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
update()
/obj/machinery/light/floor
name = "floor light"
icon = 'icons/obj/lighting.dmi'
base_state = "floor" // base description and icon_state
icon_state = "floor1"
brightness = 4
layer = 2.5
light_type = /obj/item/weapon/light/bulb
fitting = "bulb"
@@ -123,9 +123,7 @@
if(hasShocked)
return 0
hasShocked = 1
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(5, 1, AM.loc)
s.start()
do_sparks(5, TRUE, AM.loc)
var/atom/target = get_edge_target_turf(AM, get_dir(src, get_step_away(AM, src)))
AM.throw_at(target, 200, 4)
addtimer(CALLBACK(src, .proc/clear_shock), 5)
+210 -28
View File
@@ -1,5 +1,3 @@
/obj/machinery/power/emitter
name = "Emitter"
desc = "A heavy duty industrial laser.\n<span class='notice'>Alt-click to rotate it clockwise.</span>"
@@ -9,6 +7,11 @@
anchored = 0
density = 1
req_access = list(GLOB.access_engine_equip)
// The following 3 vars are mostly for the prototype
var/manual = FALSE
var/charge = 0
var/atom/target = null
use_power = 0
idle_power_usage = 10
@@ -28,6 +31,8 @@
var/projectile_sound = 'sound/weapons/emitter.ogg'
var/datum/effect_system/spark_spread/sparks
/obj/machinery/power/emitter/New()
..()
var/obj/item/weapon/circuitboard/machine/B = new /obj/item/weapon/circuitboard/machine/emitter(null)
@@ -87,11 +92,15 @@
if(state == 2 && anchored)
connect_to_network()
sparks = new
sparks.set_up(5, TRUE, src)
/obj/machinery/power/emitter/Destroy()
if(SSticker && SSticker.current_state == GAME_STATE_PLAYING)
message_admins("Emitter deleted at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Emitter deleted at ([x],[y],[z])")
investigate_log("<font color='red'>deleted</font> at ([x],[y],[z]) at [get_area(src)]","singulo")
QDEL_NULL(sparks)
return ..()
/obj/machinery/power/emitter/update_icon()
@@ -168,9 +177,11 @@
investigate_log("lost power and turned <font color='red'>off</font> at [get_area(src)]","singulo")
log_game("Emitter lost power in ([x],[y],[z])")
return
if(!check_delay())
if(charge <=80)
charge+=5
if(!check_delay() || manual == TRUE)
return FALSE
fire_beam()
fire_beam(target)
/obj/machinery/power/emitter/proc/check_delay()
if((src.last_shot + src.fire_delay) <= world.time)
@@ -186,36 +197,62 @@
add_load(active_power_usage)
fire_beam()
/obj/machinery/power/emitter/proc/fire_beam()
src.last_shot = world.time
if(src.shot_number < 3)
src.fire_delay = 20
src.shot_number ++
else
src.fire_delay = rand(minimum_fire_delay,maximum_fire_delay)
src.shot_number = 0
var/obj/item/projectile/A = new projectile_type(src.loc)
A.setDir(src.dir)
playsound(src.loc, projectile_sound, 25, 1)
/obj/machinery/power/emitter/proc/fire_beam(atom/targeted_atom, mob/user)
var/turf/targets_from = get_turf(src)
if(targeted_atom == user|| targeted_atom == targets_from)
return
var/obj/item/projectile/P = new projectile_type(targets_from)
playsound(src.loc, projectile_sound, 50, 1)
if(prob(35))
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(5, 1, src)
s.start()
sparks.start()
switch(dir)
if(NORTH)
A.yo = 20
A.xo = 0
P.yo = 20
P.xo = 0
if(NORTHEAST)
P.yo = 20
P.xo = 20
if(EAST)
A.yo = 0
A.xo = 20
P.yo = 0
P.xo = 20
if(SOUTHEAST)
P.yo = -20
P.xo = 20
if(WEST)
A.yo = 0
A.xo = -20
P.yo = 0
P.xo = -20
if(SOUTHWEST)
P.yo = -20
P.xo = -20
if(NORTHWEST)
P.yo = 20
P.xo = -20
else // Any other
A.yo = -20
A.xo = 0
A.starting = loc
A.fire()
P.yo = -20
P.xo = 0
if(target)
P.yo = targeted_atom.y - targets_from.y
P.xo = targeted_atom.x - targets_from.x
P.current = targets_from
P.starting = targets_from
P.firer = src
P.original = targeted_atom
if(!manual)
last_shot = world.time
if(shot_number < 3)
fire_delay = 20
shot_number ++
else
fire_delay = rand(minimum_fire_delay,maximum_fire_delay)
shot_number = 0
if(!target)
P.setDir(src.dir)
P.starting = loc
else
if(QDELETED(target))
target = null
P.fire()
return P
/obj/machinery/power/emitter/can_be_unfasten_wrench(mob/user, silent)
if(state == EM_WELDED)
@@ -308,3 +345,148 @@
emagged = 1
if(user)
user.visible_message("[user.name] emags the [src.name].","<span class='notice'>You short out the lock.</span>")
/obj/machinery/power/emitter/prototype
name = "Prototype Emitter"
icon = 'icons/obj/turrets.dmi'
icon_state = "protoemitter"
icon_state_on = "protoemitter_+a"
can_buckle = TRUE
buckle_lying = 0
var/view_range = 12
var/datum/action/innate/protoemitter/firing/auto
//BUCKLE HOOKS
/obj/machinery/power/emitter/prototype/unbuckle_mob(mob/living/buckled_mob,force = 0)
playsound(src,'sound/mecha/mechmove01.ogg', 50, 1)
manual = FALSE
for(var/obj/item/I in buckled_mob.held_items)
if(istype(I, /obj/item/weapon/turret_control))
qdel(I)
if(istype(buckled_mob))
buckled_mob.pixel_x = 0
buckled_mob.pixel_y = 0
if(buckled_mob.client)
buckled_mob.client.change_view(world.view)
auto.Remove(buckled_mob)
. = ..()
/obj/machinery/power/emitter/prototype/user_buckle_mob(mob/living/M, mob/living/carbon/user)
if(user.incapacitated() || !istype(user))
return
for(var/atom/movable/A in get_turf(src))
if(A.density && (A != src && A != M))
return
M.forceMove(get_turf(src))
..()
playsound(src,'sound/mecha/mechmove01.ogg', 50, 1)
M.pixel_y = 14
layer = 4.1
if(M.client)
M.client.change_view(view_range)
if(!auto)
auto = new()
auto.Grant(M, src)
/datum/action/innate/protoemitter
check_flags = AB_CHECK_RESTRAINED | AB_CHECK_STUNNED | AB_CHECK_CONSCIOUS
var/obj/machinery/power/emitter/prototype/PE
var/mob/living/carbon/U
/datum/action/innate/protoemitter/Grant(mob/living/carbon/L, obj/machinery/power/emitter/prototype/proto)
PE = proto
U = L
. = ..()
/datum/action/innate/protoemitter/firing
name = "Switch to Manual Firing"
desc = "The emitter will only fire on your command and at your designated target"
button_icon_state = "mech_zoom_on"
/datum/action/innate/protoemitter/firing/Activate()
if(PE.manual)
playsound(PE,'sound/mecha/mechmove01.ogg', 50, 1)
PE.manual = FALSE
name = "Switch to Manual Firing"
desc = "The emitter will only fire on your command and at your designated target"
button_icon_state = "mech_zoom_on"
for(var/obj/item/I in U.held_items)
if(istype(I, /obj/item/weapon/turret_control))
qdel(I)
UpdateButtonIcon()
return
else
playsound(PE,'sound/mecha/mechmove01.ogg', 50, 1)
name = "Switch to Automatic Firing"
desc = "Emitters will switch to periodic firing at your last target"
button_icon_state = "mech_zoom_off"
PE.manual = TRUE
for(var/V in U.held_items)
var/obj/item/I = V
if(istype(I))
if(U.dropItemToGround(I))
var/obj/item/weapon/turret_control/TC = new /obj/item/weapon/turret_control()
U.put_in_hands(TC)
else //Entries in the list should only ever be items or null, so if it's not an item, we can assume it's an empty hand
var/obj/item/weapon/turret_control/TC = new /obj/item/weapon/turret_control()
U.put_in_hands(TC)
UpdateButtonIcon()
/obj/item/weapon/turret_control
name = "turret controls"
icon_state = "offhand"
w_class = WEIGHT_CLASS_HUGE
flags = ABSTRACT | NODROP
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF | NOBLUDGEON
var/delay = 0
/obj/item/weapon/turret_control/afterattack(atom/targeted_atom, mob/user)
..()
var/obj/machinery/power/emitter/E = user.buckled
E.setDir(get_dir(E,targeted_atom))
user.setDir(E.dir)
switch(E.dir)
if(NORTH)
E.layer = 3.9
user.pixel_x = 0
user.pixel_y = -14
if(NORTHEAST)
E.layer = 3.9
user.pixel_x = -8
user.pixel_y = -12
if(EAST)
E.layer = 4.1
user.pixel_x = -14
user.pixel_y = 0
if(SOUTHEAST)
E.layer = 3.9
user.pixel_x = -8
user.pixel_y = 12
if(SOUTH)
E.layer = 4.1
user.pixel_x = 0
user.pixel_y = 14
if(SOUTHWEST)
E.layer = 3.9
user.pixel_x = 8
user.pixel_y = 12
if(WEST)
E.layer = 4.1
user.pixel_x = 14
user.pixel_y = 0
if(NORTHWEST)
E.layer = 3.9
user.pixel_x = 8
user.pixel_y = -12
if(E.charge >= 10 && world.time > delay)
E.charge -= 10
E.target = targeted_atom
E.fire_beam(targeted_atom, user)
delay = world.time + 10
else if (E.charge < 10)
playsound(get_turf(user),'sound/machines/buzz-sigh.ogg', 50, 1)
+1 -3
View File
@@ -152,9 +152,7 @@
return
var/obj/structure/cable/N = T.get_cable_node() //get the connecting node cable, if there's one
if (prob(50) && electrocute_mob(usr, N, N, 1, TRUE)) //animate the electrocution if uncautious and unlucky
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(5, 1, src)
s.start()
do_sparks(5, TRUE, src)
return
C.use(10)
+1 -3
View File
@@ -62,9 +62,7 @@
if(do_after(user, 50*W.toolspeed, target = src))
if(!master || master.can_terminal_dismantle())
if(prob(50) && electrocute_mob(user, powernet, src, 1, TRUE))
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(5, 1, master)
s.start()
do_sparks(5, TRUE, master)
return
new /obj/item/stack/cable_coil(loc, 10)
to_chat(user, "<span class='notice'>You cut the cables and dismantle the power terminal.</span>")
+2 -3
View File
@@ -95,9 +95,8 @@
var/obj/item/weapon/implant/req_implant = null
/obj/item/device/firing_pin/implant/pin_auth(mob/living/user)
if(iscarbon(user))
var/mob/living/carbon/C = user
for(var/obj/item/weapon/implant/I in C.implants)
if(istype(user))
for(var/obj/item/weapon/implant/I in user.implants)
if(req_implant && I.type == req_implant)
return 1
return 0
@@ -49,10 +49,8 @@
..()
/obj/item/projectile/bullet/pellet/weak/on_range()
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
sparks.set_up(1, 1, src)
sparks.start()
..()
do_sparks(1, TRUE, src)
..()
/obj/item/projectile/bullet/pellet/overload
damage = 3
@@ -66,11 +64,9 @@
explosion(target, 0, 0, 2)
/obj/item/projectile/bullet/pellet/overload/on_range()
explosion(src, 0, 0, 2)
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
sparks.set_up(3, 3, src)
sparks.start()
..()
explosion(src, 0, 0, 2)
do_sparks(3, TRUE, src)
..()
/obj/item/projectile/bullet/midbullet
damage = 20
+20 -29
View File
@@ -21,9 +21,7 @@
/obj/item/projectile/energy/electrode/on_hit(atom/target, blocked = 0)
. = ..()
if(!ismob(target) || blocked >= 100) //Fully blocked by mob or collided with dense object - burst into sparks!
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
sparks.set_up(1, 1, src)
sparks.start()
do_sparks(1, TRUE, src)
else if(iscarbon(target))
var/mob/living/carbon/C = target
if(C.dna && C.dna.check_mutation(HULK))
@@ -32,9 +30,7 @@
addtimer(CALLBACK(C, /mob/living/carbon.proc/do_jitter_animation, jitter), 5)
/obj/item/projectile/energy/electrode/on_range() //to ensure the bolt sparks when it reaches the end of its range if it didn't hit a target yet
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
sparks.set_up(1, 1, src)
sparks.start()
do_sparks(1, TRUE, src)
..()
/obj/item/projectile/energy/net
@@ -45,7 +41,7 @@
hitsound = 'sound/weapons/taserhit.ogg'
range = 10
/obj/item/projectile/energy/net/New()
/obj/item/projectile/energy/net/Initialize()
..()
SpinAnimation()
@@ -53,13 +49,11 @@
if(isliving(target))
var/turf/Tloc = get_turf(target)
if(!locate(/obj/effect/nettingportal) in Tloc)
new/obj/effect/nettingportal(Tloc)
new /obj/effect/nettingportal(Tloc)
..()
/obj/item/projectile/energy/net/on_range()
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
sparks.set_up(1, 1, src)
sparks.start()
do_sparks(1, TRUE, src)
..()
/obj/effect/nettingportal
@@ -69,7 +63,7 @@
icon_state = "dragnetfield"
anchored = 1
/obj/effect/nettingportal/New()
/obj/effect/nettingportal/Initialize()
..()
set_light(3)
var/obj/item/device/radio/beacon/teletarget = null
@@ -77,16 +71,18 @@
if(com.target)
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
teletarget = com.target
addtimer(CALLBACK(src, .proc/pop, teletarget), 30)
/obj/effect/nettingportal/proc/pop(teletarget)
if(teletarget)
spawn(30)
for(var/mob/living/L in get_turf(src))
do_teleport(L, teletarget, 2)//teleport what's in the tile to the beacon
qdel(src)
for(var/mob/living/L in get_turf(src))
do_teleport(L, teletarget, 2)//teleport what's in the tile to the beacon
else
spawn(30)
for(var/mob/living/L in get_turf(src))
do_teleport(L, L, 15) //Otherwise it just warps you off somewhere.
qdel(src)
for(var/mob/living/L in get_turf(src))
do_teleport(L, L, 15) //Otherwise it just warps you off somewhere.
qdel(src)
/obj/item/projectile/energy/trap
@@ -106,7 +102,7 @@
..()
/obj/item/projectile/energy/trap/on_range()
new/obj/item/weapon/restraints/legcuffs/beartrap/energy(loc)
new /obj/item/weapon/restraints/legcuffs/beartrap/energy(loc)
..()
/obj/item/projectile/energy/trap/cyborg
@@ -119,21 +115,16 @@
/obj/item/projectile/energy/trap/cyborg/on_hit(atom/target, blocked = 0)
if(!ismob(target) || blocked >= 100)
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
sparks.set_up(1, 1, src)
sparks.start()
do_sparks(1, TRUE, src)
qdel(src)
if(iscarbon(target))
var/obj/item/weapon/restraints/legcuffs/beartrap/B = new /obj/item/weapon/restraints/legcuffs/beartrap/energy/cyborg(get_turf(target))
B.Crossed(target)
spawn(10)
qdel(src)
QDEL_IN(src, 10)
..()
/obj/item/projectile/energy/trap/cyborg/on_range()
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
sparks.set_up(1, 1, src)
sparks.start()
do_sparks(1, TRUE, src)
qdel(src)
/obj/item/projectile/energy/declone
@@ -261,7 +261,6 @@
color = "#EFD65A"
complementary_color = "#00E5B1"
message_living = ", and you feel a horrible tingling sensation"
var/datum/effect_system/spark_spread/spark_system = new/datum/effect_system/spark_spread()
/datum/reagent/blob/energized_jelly/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O)
reac_volume = ..()
@@ -272,8 +271,7 @@
/datum/reagent/blob/energized_jelly/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag)
if((damage_flag == "melee" || damage_flag == "bullet" || damage_flag == "laser") && B.obj_integrity - damage <= 0 && prob(10))
spark_system.set_up(rand(2, 4), 0, B)
spark_system.start()
do_sparks(rand(2, 4), FALSE, B)
return ..()
/datum/reagent/blob/energized_jelly/tesla_reaction(obj/structure/blob/B, power)
@@ -216,9 +216,7 @@
if(holder.has_reagent("stabilizing_agent"))
return
var/location = get_turf(holder.my_atom)
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(2, 1, location)
s.start()
do_sparks(2, TRUE, location)
for(var/mob/living/carbon/C in get_hearers_in_view(created_volume/3, location))
if(C.flash_act())
if(get_dist(C, location) < 4)
@@ -235,9 +233,7 @@
/datum/chemical_reaction/flash_powder_flash/on_reaction(datum/reagents/holder, created_volume)
var/location = get_turf(holder.my_atom)
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(2, 1, location)
s.start()
do_sparks(2, TRUE, location)
for(var/mob/living/carbon/C in get_hearers_in_view(created_volume/10, location))
if(C.flash_act())
if(get_dist(C, location) < 4)
@@ -402,4 +398,4 @@
required_reagents = list("nitrous_oxide" = 1)
strengthdiv = 7
required_temp = 575
modifier = 1
modifier = 1
@@ -1,8 +1,11 @@
/datum/chemical_reaction/slime
var/deletes_extract = TRUE
/datum/chemical_reaction/slime/on_reaction(datum/reagents/holder)
delete_extract(holder)
feedback_add_details("slime_cores_used","[type]")
if(deletes_extract)
delete_extract(holder)
/datum/chemical_reaction/slime/proc/delete_extract(datum/reagents/holder)
var/obj/item/slime_extract/M = holder.my_atom
@@ -19,12 +22,9 @@
required_other = 1
/datum/chemical_reaction/slime/slimespawn/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/mob/living/simple_animal/slime/S
S = new(get_turf(holder.my_atom), "grey")
S.visible_message("<span class='danger'>Infused with plasma, the \
core begins to quiver and grow, and soon a new baby slime \
emerges from it!</span>")
S.visible_message("<span class='danger'>Infused with plasma, the core begins to quiver and grow, and a new baby slime emerges from it!</span>")
..()
/datum/chemical_reaction/slime/slimeinaprov
@@ -35,10 +35,6 @@
required_other = 1
required_container = /obj/item/slime_extract/grey
/datum/chemical_reaction/slime/slimeinaprov/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
..()
/datum/chemical_reaction/slime/slimemonkey
name = "Slime Monkey"
id = "m_monkey"
@@ -47,10 +43,8 @@
required_other = 1
/datum/chemical_reaction/slime/slimemonkey/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
for(var/i = 1, i <= 3, i++)
var /obj/item/weapon/reagent_containers/food/snacks/monkeycube/M = new /obj/item/weapon/reagent_containers/food/snacks/monkeycube
M.loc = get_turf(holder.my_atom)
for(var/i in 1 to 3)
new /obj/item/weapon/reagent_containers/food/snacks/monkeycube(get_turf(holder.my_atom))
..()
//Green
@@ -62,10 +56,6 @@
required_other = 1
required_container = /obj/item/slime_extract/green
/datum/chemical_reaction/slime/slimemutate/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
..()
//Mutated Green
/datum/chemical_reaction/slime/slimemutate_unstable
name = "Unstable Mutation Toxin"
@@ -76,10 +66,6 @@
required_container = /obj/item/slime_extract/green
mix_message = "<span class='info'>The mixture rapidly expands and contracts, its appearance shifting into a sickening green.</span>"
/datum/chemical_reaction/slime/slimemutate_unstable/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
..()
//Metal
/datum/chemical_reaction/slime/slimemetal
name = "Slime Metal"
@@ -89,10 +75,9 @@
required_other = 1
/datum/chemical_reaction/slime/slimemetal/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/turf/location = get_turf(holder.my_atom)
new /obj/item/stack/sheet/plasteel (location, 5)
new /obj/item/stack/sheet/metal (location, 15)
new /obj/item/stack/sheet/plasteel(location, 5)
new /obj/item/stack/sheet/metal(location, 15)
..()
/datum/chemical_reaction/slime/slimeglass
@@ -103,60 +88,49 @@
required_other = 1
/datum/chemical_reaction/slime/slimeglass/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/turf/location = get_turf(holder.my_atom)
new /obj/item/stack/sheet/rglass (location, 5)
new /obj/item/stack/sheet/glass (location, 15)
new /obj/item/stack/sheet/rglass(location, 5)
new /obj/item/stack/sheet/glass(location, 15)
..()
//Gold
/datum/chemical_reaction/slime/slimecrit
/datum/chemical_reaction/slime/slimemobspawn
name = "Slime Crit"
id = "m_tele"
required_reagents = list("plasma" = 1)
required_container = /obj/item/slime_extract/gold
required_other = 1
deletes_extract = FALSE //we do delete, but we don't do so instantly
/datum/chemical_reaction/slime/slimecrit/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
/datum/chemical_reaction/slime/slimemobspawn/on_reaction(datum/reagents/holder)
var/turf/T = get_turf(holder.my_atom)
T.visible_message("<span class='danger'>The slime extract begins to vibrate violently !</span>")
addtimer(CALLBACK(src, .proc/chemical_mob_spawn, holder, 5, "Gold Slime"), 50)
summon_mobs(T)
var/obj/item/slime_extract/M = holder.my_atom
deltimer(M.qdel_timer)
..()
M.qdel_timer = addtimer(CALLBACK(src, .proc/delete_extract, holder), 55, TIMER_STOPPABLE)
/datum/chemical_reaction/slime/slimecritlesser
/datum/chemical_reaction/slime/slimemobspawn/proc/summon_mobs(datum/reagents/holder, turf/T)
T.visible_message("<span class='danger'>The slime extract begins to vibrate violently!</span>")
addtimer(CALLBACK(src, .proc/chemical_mob_spawn, holder, 5, "Gold Slime"), 50)
/datum/chemical_reaction/slime/slimemobspawn/lesser
name = "Slime Crit Lesser"
id = "m_tele3"
required_reagents = list("blood" = 1)
required_container = /obj/item/slime_extract/gold
required_other = 1
/datum/chemical_reaction/slime/slimecritlesser/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/turf/T = get_turf(holder.my_atom)
T.visible_message("<span class='danger'>The slime extract begins to vibrate violently !</span>")
/datum/chemical_reaction/slime/slimemobspawn/lesser/summon_mobs(datum/reagents/holder, turf/T)
T.visible_message("<span class='danger'>The slime extract begins to vibrate violently!</span>")
addtimer(CALLBACK(src, .proc/chemical_mob_spawn, holder, 3, "Lesser Gold Slime", "neutral"), 50)
var/obj/item/slime_extract/M = holder.my_atom
deltimer(M.qdel_timer)
M.qdel_timer = addtimer(CALLBACK(src, .proc/delete_extract, holder), 55, TIMER_STOPPABLE)
/datum/chemical_reaction/slime/slimecritfriendly
/datum/chemical_reaction/slime/slimemobspawn/friendly
name = "Slime Crit Friendly"
id = "m_tele5"
required_reagents = list("water" = 1)
required_container = /obj/item/slime_extract/gold
required_other = 1
/datum/chemical_reaction/slime/slimecritfriendly/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/turf/T = get_turf(holder.my_atom)
T.visible_message("<span class='danger'>The slime extract begins to vibrate adorably !</span>")
/datum/chemical_reaction/slime/slimemobspawn/friendly/summon_mobs(datum/reagents/holder, turf/T)
T.visible_message("<span class='danger'>The slime extract begins to vibrate adorably!</span>")
addtimer(CALLBACK(src, .proc/chemical_mob_spawn, holder, 1, "Friendly Gold Slime", "neutral"), 50)
var/obj/item/slime_extract/M = holder.my_atom
deltimer(M.qdel_timer)
M.qdel_timer = addtimer(CALLBACK(src, .proc/delete_extract, holder), 55, TIMER_STOPPABLE)
//Silver
/datum/chemical_reaction/slime/slimebork
@@ -167,8 +141,24 @@
required_other = 1
/datum/chemical_reaction/slime/slimebork/on_reaction(datum/reagents/holder)
//BORK BORK BORK
var/list/borks = getborks()
var/turf/T = get_turf(holder.my_atom)
feedback_add_details("slime_cores_used","[type]")
playsound(T, 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/C in viewers(T, null))
C.flash_act()
for(var/i in 1 to 4 + rand(1,2))
var/chosen = pick(borks)
var/obj/B = new chosen(T)
if(prob(50))
for(var/j in 1 to rand(1, 3))
step(B, pick(NORTH,SOUTH,EAST,WEST))
..()
/datum/chemical_reaction/slime/slimebork/proc/getborks()
var/list/blocked = list(/obj/item/weapon/reagent_containers/food/snacks,
/obj/item/weapon/reagent_containers/food/snacks/store/bread,
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
@@ -188,53 +178,15 @@
)
blocked |= typesof(/obj/item/weapon/reagent_containers/food/snacks/customizable)
var/list/borks = typesof(/obj/item/weapon/reagent_containers/food/snacks) - blocked
// BORK BORK BORK
return typesof(/obj/item/weapon/reagent_containers/food/snacks) - blocked
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/C in viewers(get_turf(holder.my_atom), null))
C.flash_act()
for(var/i = 1, i <= 4 + rand(1,2), i++)
var/chosen = pick(borks)
var/obj/B = new chosen
if(B)
B.loc = get_turf(holder.my_atom)
if(prob(50))
for(var/j = 1, j <= rand(1, 3), j++)
step(B, pick(NORTH,SOUTH,EAST,WEST))
..()
/datum/chemical_reaction/slime/slimebork2
/datum/chemical_reaction/slime/slimebork/drinks
name = "Slime Bork 2"
id = "m_tele4"
required_reagents = list("water" = 1)
required_container = /obj/item/slime_extract/silver
required_other = 1
/datum/chemical_reaction/slime/slimebork2/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/list/borks = subtypesof(/obj/item/weapon/reagent_containers/food/drinks)
// BORK BORK BORK
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/M in viewers(get_turf(holder.my_atom), null))
M.flash_act()
for(var/i = 1, i <= 4 + rand(1,2), i++)
var/chosen = pick(borks)
var/obj/B = new chosen
if(B)
B.loc = get_turf(holder.my_atom)
if(prob(50))
for(var/j = 1, j <= rand(1, 3), j++)
step(B, pick(NORTH,SOUTH,EAST,WEST))
..()
/datum/chemical_reaction/slime/slimebork/drinks/getborks()
return subtypesof(/obj/item/weapon/reagent_containers/food/drinks)
//Blue
/datum/chemical_reaction/slime/slimefrost
@@ -245,11 +197,6 @@
required_container = /obj/item/slime_extract/blue
required_other = 1
/datum/chemical_reaction/slime/slimefrost/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
..()
/datum/chemical_reaction/slime/slimestabilizer
name = "Slime Stabilizer"
id = "m_slimestabilizer"
@@ -258,12 +205,9 @@
required_other = 1
/datum/chemical_reaction/slime/slimestabilizer/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/obj/item/slimepotion/stabilizer/P = new /obj/item/slimepotion/stabilizer
P.loc = get_turf(holder.my_atom)
new /obj/item/slimepotion/stabilizer(get_turf(holder.my_atom))
..()
/datum/chemical_reaction/slime/slimefoam
name = "Slime Foam"
id = "m_foam"
@@ -272,11 +216,6 @@
required_container = /obj/item/slime_extract/blue
required_other = 1
/datum/chemical_reaction/slime/slimefoam/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
..()
//Dark Blue
/datum/chemical_reaction/slime/slimefreeze
name = "Slime Freeze"
@@ -286,12 +225,12 @@
required_other = 1
/datum/chemical_reaction/slime/slimefreeze/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/turf/T = get_turf(holder.my_atom)
T.visible_message("<span class='danger'>The slime extract begins to vibrate adorably!</span>")
addtimer(CALLBACK(src, .proc/freeze, holder), 50)
var/obj/item/slime_extract/M = holder.my_atom
deltimer(M.qdel_timer)
..()
M.qdel_timer = addtimer(CALLBACK(src, .proc/delete_extract, holder), 55, TIMER_STOPPABLE)
/datum/chemical_reaction/slime/slimefreeze/proc/freeze(datum/reagents/holder)
@@ -300,8 +239,6 @@
if(istype(T))
T.atmos_spawn_air("freon=50;TEMP=120")
/datum/chemical_reaction/slime/slimefireproof
name = "Slime Fireproof"
id = "m_fireproof"
@@ -310,9 +247,7 @@
required_other = 1
/datum/chemical_reaction/slime/slimefireproof/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/obj/item/slimepotion/fireproof/P = new /obj/item/slimepotion/fireproof
P.loc = get_turf(holder.my_atom)
new /obj/item/slimepotion/fireproof(get_turf(holder.my_atom))
..()
//Orange
@@ -324,24 +259,21 @@
required_container = /obj/item/slime_extract/orange
required_other = 1
/datum/chemical_reaction/slime/slimecasp/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
..()
/datum/chemical_reaction/slime/slimefire
name = "Slime fire"
id = "m_fire"
required_reagents = list("plasma" = 1)
required_container = /obj/item/slime_extract/orange
required_other = 1
deletes_extract = FALSE
/datum/chemical_reaction/slime/slimefire/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/turf/TU = get_turf(holder.my_atom)
TU.visible_message("<span class='danger'>The slime extract begins to vibrate adorably!</span>")
var/turf/T = get_turf(holder.my_atom)
T.visible_message("<span class='danger'>The slime extract begins to vibrate adorably!</span>")
addtimer(CALLBACK(src, .proc/slime_burn, holder), 50)
var/obj/item/slime_extract/M = holder.my_atom
deltimer(M.qdel_timer)
..()
M.qdel_timer = addtimer(CALLBACK(src, .proc/delete_extract, holder), 55, TIMER_STOPPABLE)
/datum/chemical_reaction/slime/slimefire/proc/slime_burn(datum/reagents/holder)
@@ -359,12 +291,7 @@
required_container = /obj/item/slime_extract/orange
required_other = 1
/datum/chemical_reaction/slime/slimesmoke/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
..()
//Yellow
/datum/chemical_reaction/slime/slimeoverload
name = "Slime EMP"
id = "m_emp"
@@ -373,11 +300,9 @@
required_other = 1
/datum/chemical_reaction/slime/slimeoverload/on_reaction(datum/reagents/holder, created_volume)
feedback_add_details("slime_cores_used","[type]")
empulse(get_turf(holder.my_atom), 3, 7)
..()
/datum/chemical_reaction/slime/slimecell
name = "Slime Powercell"
id = "m_cell"
@@ -386,9 +311,7 @@
required_other = 1
/datum/chemical_reaction/slime/slimecell/on_reaction(datum/reagents/holder, created_volume)
feedback_add_details("slime_cores_used","[type]")
var/obj/item/weapon/stock_parts/cell/high/slime/P = new /obj/item/weapon/stock_parts/cell/high/slime
P.loc = get_turf(holder.my_atom)
new /obj/item/weapon/stock_parts/cell/high/slime(get_turf(holder.my_atom))
..()
/datum/chemical_reaction/slime/slimeglow
@@ -399,15 +322,12 @@
required_other = 1
/datum/chemical_reaction/slime/slimeglow/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/turf/T = get_turf(holder.my_atom)
T.visible_message("<span class='danger'>The slime begins to emit a soft light. Squeezing it will cause it to grow brightly.</span>")
var/obj/item/device/flashlight/slime/F = new /obj/item/device/flashlight/slime
F.loc = get_turf(holder.my_atom)
new /obj/item/device/flashlight/slime(T)
..()
//Purple
/datum/chemical_reaction/slime/slimepsteroid
name = "Slime Steroid"
id = "m_steroid"
@@ -416,9 +336,7 @@
required_other = 1
/datum/chemical_reaction/slime/slimepsteroid/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/obj/item/slimepotion/steroid/P = new /obj/item/slimepotion/steroid
P.loc = get_turf(holder.my_atom)
new /obj/item/slimepotion/steroid(get_turf(holder.my_atom))
..()
/datum/chemical_reaction/slime/slimejam
@@ -429,11 +347,6 @@
required_container = /obj/item/slime_extract/purple
required_other = 1
/datum/chemical_reaction/slime/slimejam/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
..()
//Dark Purple
/datum/chemical_reaction/slime/slimeplasma
name = "Slime Plasma"
@@ -443,9 +356,7 @@
required_other = 1
/datum/chemical_reaction/slime/slimeplasma/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/turf/location = get_turf(holder.my_atom)
new /obj/item/stack/sheet/mineral/plasma (location, 3)
new /obj/item/stack/sheet/mineral/plasma(get_turf(holder.my_atom), 3)
..()
//Red
@@ -458,9 +369,7 @@
required_other = 1
/datum/chemical_reaction/slime/slimemutator/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/obj/item/slimepotion/mutator/P = new /obj/item/slimepotion/mutator
P.loc = get_turf(holder.my_atom)
new /obj/item/slimepotion/mutator(get_turf(holder.my_atom))
..()
/datum/chemical_reaction/slime/slimebloodlust
@@ -471,13 +380,11 @@
required_other = 1
/datum/chemical_reaction/slime/slimebloodlust/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
for(var/mob/living/simple_animal/slime/slime in viewers(get_turf(holder.my_atom), null))
slime.rabid = 1
slime.visible_message("<span class='danger'>The [slime] is driven into a frenzy!</span>")
..()
/datum/chemical_reaction/slime/slimespeed
name = "Slime Speed"
id = "m_speed"
@@ -486,12 +393,9 @@
required_other = 1
/datum/chemical_reaction/slime/slimespeed/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/obj/item/slimepotion/speed/P = new /obj/item/slimepotion/speed
P.loc = get_turf(holder.my_atom)
new /obj/item/slimepotion/speed(get_turf(holder.my_atom))
..()
//Pink
/datum/chemical_reaction/slime/docility
name = "Docility Potion"
@@ -501,9 +405,7 @@
required_other = 1
/datum/chemical_reaction/slime/docility/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/obj/item/slimepotion/docility/P = new /obj/item/slimepotion/docility
P.loc = get_turf(holder.my_atom)
new /obj/item/slimepotion/docility(get_turf(holder.my_atom))
..()
/datum/chemical_reaction/slime/gender
@@ -514,9 +416,7 @@
required_other = 1
/datum/chemical_reaction/slime/gender/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/obj/item/slimepotion/genderchange/G = new /obj/item/slimepotion/genderchange
G.loc = get_turf(holder.my_atom)
new /obj/item/slimepotion/genderchange(get_turf(holder.my_atom))
..()
//Black
@@ -528,10 +428,6 @@
required_other = 1
required_container = /obj/item/slime_extract/black
/datum/chemical_reaction/slime/slimemutate2/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
..()
//Oil
/datum/chemical_reaction/slime/slimeexplosion
name = "Slime Explosion"
@@ -539,9 +435,9 @@
required_reagents = list("plasma" = 1)
required_container = /obj/item/slime_extract/oil
required_other = 1
deletes_extract = FALSE
/datum/chemical_reaction/slime/slimeexplosion/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/turf/T = get_turf(holder.my_atom)
var/lastkey = holder.my_atom.fingerprintslast
var/touch_msg = "N/A"
@@ -554,6 +450,7 @@
addtimer(CALLBACK(src, .proc/boom, holder), 50)
var/obj/item/slime_extract/M = holder.my_atom
deltimer(M.qdel_timer)
..()
M.qdel_timer = addtimer(CALLBACK(src, .proc/delete_extract, holder), 55, TIMER_STOPPABLE)
/datum/chemical_reaction/slime/slimeexplosion/proc/boom(datum/reagents/holder)
@@ -569,10 +466,6 @@
required_container = /obj/item/slime_extract/oil
required_other = 1
/datum/chemical_reaction/slime/slimecornoil/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
..()
//Light Pink
/datum/chemical_reaction/slime/slimepotion2
name = "Slime Potion 2"
@@ -582,9 +475,7 @@
required_other = 1
/datum/chemical_reaction/slime/slimepotion2/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/obj/item/slimepotion/sentience/P = new /obj/item/slimepotion/sentience
P.loc = get_turf(holder.my_atom)
new /obj/item/slimepotion/sentience
..()
//Adamantine
@@ -596,10 +487,7 @@
required_other = 1
/datum/chemical_reaction/slime/slimegolem/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/obj/effect/golemrune/Z = new /obj/effect/golemrune
Z.loc = get_turf(holder.my_atom)
notify_ghosts("Golem rune created in [get_area(Z)].", 'sound/effects/ghost2.ogg', source = Z)
new /obj/effect/golemrune(get_turf(holder.my_atom))
..()
/datum/chemical_reaction/slime/slimegolem2
@@ -610,9 +498,7 @@
required_other = 1
/datum/chemical_reaction/slime/slimegolem2/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/obj/item/golem_shell/artificial/Z = new /obj/item/golem_shell/artificial
Z.loc = get_turf(holder.my_atom)
new /obj/item/golem_shell/artificial(get_turf(holder.my_atom))
..()
//Bluespace
@@ -624,10 +510,7 @@
required_other = 1
/datum/chemical_reaction/slime/slimefloor2/on_reaction(datum/reagents/holder, created_volume)
feedback_add_details("slime_cores_used","[type]")
var/obj/item/stack/tile/bluespace/P = new /obj/item/stack/tile/bluespace
P.amount = 25
P.loc = get_turf(holder.my_atom)
new /obj/item/stack/tile/bluespace(get_turf(holder.my_atom), 25)
..()
@@ -639,10 +522,8 @@
required_other = 1
/datum/chemical_reaction/slime/slimecrystal/on_reaction(datum/reagents/holder, created_volume)
feedback_add_details("slime_cores_used","[type]")
if(holder.my_atom)
var/obj/item/weapon/ore/bluespace_crystal/BC = new(get_turf(holder.my_atom))
BC.visible_message("<span class='notice'>The [BC.name] appears out of thin air!</span>")
var/obj/item/weapon/ore/bluespace_crystal/BC = new (get_turf(holder.my_atom))
BC.visible_message("<span class='notice'>The [BC.name] appears out of thin air!</span>")
..()
//Cerulean
@@ -654,12 +535,9 @@
required_other = 1
/datum/chemical_reaction/slime/slimepsteroid2/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/obj/item/slimepotion/enhancer/P = new /obj/item/slimepotion/enhancer
P.loc = get_turf(holder.my_atom)
new /obj/item/slimepotion/enhancer(get_turf(holder.my_atom))
..()
/datum/chemical_reaction/slime/slime_territory
name = "Slime Territory"
id = "s_territory"
@@ -668,9 +546,7 @@
required_other = 1
/datum/chemical_reaction/slime/slime_territory/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/obj/item/areaeditor/blueprints/slime/P = new /obj/item/areaeditor/blueprints/slime
P.loc = get_turf(holder.my_atom)
new /obj/item/areaeditor/blueprints/slime(get_turf(holder.my_atom))
..()
//Sepia
@@ -682,15 +558,12 @@
required_other = 1
/datum/chemical_reaction/slime/slimestop/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/mob/mob = get_mob_by_key(holder.my_atom.fingerprintslast)
var/obj/effect/timestop/T = new /obj/effect/timestop
T.loc = get_turf(holder.my_atom)
T.immune += mob
T.forceMove(get_turf(holder.my_atom))
T.immune += get_mob_by_key(holder.my_atom.fingerprintslast)
T.timestop()
..()
/datum/chemical_reaction/slime/slimecamera
name = "Slime Camera"
id = "m_camera"
@@ -699,11 +572,8 @@
required_other = 1
/datum/chemical_reaction/slime/slimecamera/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/obj/item/device/camera/P = new /obj/item/device/camera
P.loc = get_turf(holder.my_atom)
var/obj/item/device/camera_film/Z = new /obj/item/device/camera_film
Z.loc = get_turf(holder.my_atom)
new /obj/item/device/camera(get_turf(holder.my_atom))
new /obj/item/device/camera_film(get_turf(holder.my_atom))
..()
/datum/chemical_reaction/slime/slimefloor
@@ -714,16 +584,10 @@
required_other = 1
/datum/chemical_reaction/slime/slimefloor/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/obj/item/stack/tile/sepia/P = new /obj/item/stack/tile/sepia
P.amount = 25
P.loc = get_turf(holder.my_atom)
new /obj/item/stack/tile/sepia(get_turf(holder.my_atom), 25)
..()
//Pyrite
/datum/chemical_reaction/slime/slimepaint
name = "Slime Paint"
id = "s_paint"
@@ -732,15 +596,10 @@
required_other = 1
/datum/chemical_reaction/slime/slimepaint/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/list/paints = subtypesof(/obj/item/weapon/paint)
var/chosen = pick(paints)
var/obj/P = new chosen
if(P)
P.loc = get_turf(holder.my_atom)
var/chosen = pick(subtypesof(/obj/item/weapon/paint))
new chosen(get_turf(holder.my_atom))
..()
/datum/chemical_reaction/slime/slimecrayon
name = "Slime Crayon"
id = "s_crayon"
@@ -749,12 +608,8 @@
required_other = 1
/datum/chemical_reaction/slime/slimecrayon/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/list/crayons = difflist(subtypesof(/obj/item/toy/crayon),typesof(/obj/item/toy/crayon/spraycan))
var/chosen = pick(crayons)
var/obj/P = new chosen
if(P)
P.loc = get_turf(holder.my_atom)
var/chosen = pick(difflist(subtypesof(/obj/item/toy/crayon),typesof(/obj/item/toy/crayon/spraycan)))
new chosen(get_turf(holder.my_atom))
..()
//Rainbow :o)
@@ -766,12 +621,8 @@
required_container = /obj/item/slime_extract/rainbow
/datum/chemical_reaction/slime/slimeRNG/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/mob/living/simple_animal/slime/random/S
S = new(get_turf(holder.my_atom))
S.visible_message("<span class='danger'>Infused with plasma, the \
core begins to quiver and grow, and soon a new baby slime emerges \
from it!</span>")
var/mob/living/simple_animal/slime/random/S = new (get_turf(holder.my_atom))
S.visible_message("<span class='danger'>Infused with plasma, the core begins to quiver and grow, and a new baby slime emerges from it!</span>")
..()
/datum/chemical_reaction/slime/slime_transfer
@@ -782,9 +633,7 @@
required_container = /obj/item/slime_extract/rainbow
/datum/chemical_reaction/slime/slime_transfer/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/obj/item/slimepotion/transference/P = new /obj/item/slimepotion/transference
P.loc = get_turf(holder.my_atom)
new /obj/item/slimepotion/transference(get_turf(holder.my_atom))
..()
/datum/chemical_reaction/slime/flight_potion
@@ -795,7 +644,6 @@
required_container = /obj/item/slime_extract/rainbow
/datum/chemical_reaction/slime/flight_potion/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
new/obj/item/weapon/reagent_containers/glass/bottle/potion/flight(get_turf(holder.my_atom))
new /obj/item/weapon/reagent_containers/glass/bottle/potion/flight(get_turf(holder.my_atom))
..()
@@ -61,7 +61,7 @@
/obj/item/weapon/reagent_containers/spray/proc/spray(atom/A)
var/range = max(min(spray_range, get_dist(src, A)), 1)
var/range = max(min(current_range, get_dist(src, A)), 1)
var/obj/effect/decal/chempuff/D = new /obj/effect/decal/chempuff(get_turf(src))
D.create_reagents(amount_per_transfer_from_this)
var/puff_reagent_left = range //how many turf, mob or dense objet we can react with before we consider the chem puff consumed
@@ -169,6 +169,12 @@
amount_per_transfer_from_this = 5
list_reagents = list("condensedcapsaicin" = 40)
// Fix pepperspraying yourself
/obj/item/weapon/reagent_containers/spray/pepper/afterattack(atom/A as mob|obj, mob/user)
if (A.loc == user)
return
..()
//water flower
/obj/item/weapon/reagent_containers/spray/waterflower
name = "water flower"
@@ -200,6 +206,11 @@
volume = 600
origin_tech = "combat=3;materials=3;engineering=3"
/obj/item/weapon/reagent_containers/spray/chemsprayer/afterattack(atom/A as mob|obj, mob/user)
// Make it so the bioterror spray doesn't spray yourself when you click your inventory items
if (A.loc == user)
return
..()
/obj/item/weapon/reagent_containers/spray/chemsprayer/spray(atom/A)
var/direction = get_dir(src, A)
@@ -581,7 +581,7 @@
id = "rcd"
build_type = AUTOLATHE
materials = list(MAT_METAL = 30000)
build_path = /obj/item/weapon/rcd
build_path = /obj/item/weapon/construction/rcd
category = list("hacked", "Construction")
/datum/design/rpd
+1 -1
View File
@@ -73,7 +73,7 @@
valid_items += rand(1,max(2,35-probWeight))
valid_items += I
if(ispath(I,/obj/item/weapon/rcd) || ispath(I,/obj/item/weapon/grenade) || ispath(I,/obj/item/device/aicard) || ispath(I,/obj/item/weapon/storage/backpack/holding) || ispath(I,/obj/item/slime_extract) || ispath(I,/obj/item/device/onetankbomb) || ispath(I,/obj/item/device/transfer_valve))
if(ispath(I,/obj/item/weapon/construction/rcd) || ispath(I,/obj/item/weapon/grenade) || ispath(I,/obj/item/device/aicard) || ispath(I,/obj/item/weapon/storage/backpack/holding) || ispath(I,/obj/item/slime_extract) || ispath(I,/obj/item/device/onetankbomb) || ispath(I,/obj/item/device/transfer_valve))
var/obj/item/tempCheck = I
if(initial(tempCheck.icon_state) != null)
critical_items += I
+1 -3
View File
@@ -30,9 +30,7 @@
return 0
if(!prob(prb))
return 0
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(5, 1, src)
s.start()
do_sparks(5, TRUE, src)
if (electrocute_mob(user, get_area(src), src, 0.7, TRUE))
return 1
else
@@ -482,9 +482,14 @@
resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
layer = TURF_LAYER
/obj/effect/golemrune/New()
..()
/obj/effect/golemrune/Initialize()
. = ..()
START_PROCESSING(SSobj, src)
notify_ghosts("Golem rune created in [get_area(src)].", 'sound/effects/ghost2.ogg', source = src)
/obj/effect/golemrune/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/effect/golemrune/process()
var/mob/dead/observer/ghost
+1 -3
View File
@@ -295,9 +295,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
if(isliving(target) && message)
to_chat(target, text("[message]"))
if(sparks_spread)
var/datum/effect_system/spark_spread/sparks = new
sparks.set_up(sparks_amt, 0, location) //no idea what the 0 is
sparks.start()
do_sparks(sparks_amt, FALSE, location)
if(smoke_spread)
if(smoke_spread == 1)
var/datum/effect_system/smoke_spread/smoke = new
+2 -4
View File
@@ -50,9 +50,7 @@
if(!proximity || target == user || !ismob(target) || !iscarbon(user) || user.lying || user.handcuffed) //exploding after touching yourself would be bad
return
var/mob/M = target
var/datum/effect_system/spark_spread/sparks = new
sparks.set_up(4, 0, M.loc) //no idea what the 0 is
sparks.start()
do_sparks(4, FALSE, M.loc)
M.gib()
..()
@@ -73,4 +71,4 @@
var/mob/living/M = target
M.Stun(2)
M.petrify()
..()
..()
+8 -1
View File
@@ -183,13 +183,20 @@
//Change organ status
/obj/item/bodypart/proc/change_bodypart_status(new_limb_status, heal_limb)
/obj/item/bodypart/proc/change_bodypart_status(new_limb_status, heal_limb, change_icon_to_default)
status = new_limb_status
if(heal_limb)
burn_dam = 0
brute_dam = 0
brutestate = 0
burnstate = 0
if(change_icon_to_default)
if(status == BODYPART_ORGANIC)
icon = DEFAULT_BODYPART_ICON_ORGANIC
else if(status == BODYPART_ROBOTIC)
icon = DEFAULT_BODYPART_ICON_ROBOTIC
if(owner)
owner.updatehealth()
owner.update_body() //if our head becomes robotic, we remove the lizard horns and human hair.
@@ -187,5 +187,5 @@
name = "surplus prosthetic right leg"
desc = "A skeletal, robotic limb. Outdated and fragile, but it's still better than nothing."
icon = 'icons/mob/surplus_augments.dmi'
icon_state = "surplus_r_leg"
icon_state = "r_leg"
max_damage = 20
+1 -1
View File
@@ -50,7 +50,7 @@
/datum/surgery_step/add_limb/success(mob/user, mob/living/carbon/target, target_zone, obj/item/bodypart/tool, datum/surgery/surgery)
if(L)
user.visible_message("[user] successfully augments [target]'s [parse_zone(target_zone)]!", "<span class='notice'>You successfully augment [target]'s [parse_zone(target_zone)].</span>")
L.change_bodypart_status(BODYPART_ROBOTIC, 1)
L.change_bodypart_status(BODYPART_ROBOTIC, TRUE)
L.icon = tool.icon
L.max_damage = tool.max_damage
user.drop_item()
@@ -28,6 +28,8 @@
objects++
I.loc = get_turf(H)
L.embedded_objects -= I
if(!H.has_embedded_objects())
H.clear_alert("embeddedobject")
if(objects > 0)
user.visible_message("[user] sucessfully removes [objects] objects from [H]'s [L]!", "<span class='notice'>You successfully remove [objects] objects from [H]'s [L.name].</span>")
+2 -4
View File
@@ -167,8 +167,6 @@
/obj/item/weapon/rcs/emag_act(mob/user)
if(!emagged)
emagged = 1
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(5, 1, src)
s.start()
emagged = TRUE
do_sparks(5, TRUE, src)
to_chat(user, "<span class='caution'>You emag the RCS. Click on it to toggle between modes.</span>")
+3 -14
View File
@@ -139,20 +139,14 @@
var/datum/browser/popup = new(user, "telesci", name, 300, 500)
popup.set_content(t)
popup.open()
return
/obj/machinery/computer/telescience/proc/sparks()
if(telepad)
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(5, 1, get_turf(telepad))
s.start()
else
return
do_sparks(5, TRUE, get_turf(telepad))
/obj/machinery/computer/telescience/proc/telefail()
sparks()
visible_message("<span class='warning'>The telepad weakly fizzles.</span>")
return
/obj/machinery/computer/telescience/proc/doteleport(mob/user)
@@ -201,9 +195,7 @@
// use a lot of power
use_power(power * 10)
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(5, 1, get_turf(telepad))
s.start()
do_sparks(5, TRUE, get_turf(telepad))
temp_msg = "Teleport successful.<BR>"
if(teles_left < 10)
@@ -211,10 +203,7 @@
else
temp_msg += "Data printed below."
var/sparks = get_turf(target)
var/datum/effect_system/spark_spread/y = new /datum/effect_system/spark_spread
y.set_up(5, 1, sparks)
y.start()
do_sparks(5, TRUE, get_turf(target))
var/turf/source = target
var/turf/dest = get_turf(telepad)
+1 -2
View File
@@ -34,7 +34,6 @@ Notes:
/datum/tooltip
var/client/owner
var/control = "mainwindow.tooltip"
var/file = 'code/modules/tooltip/tooltip.html'
var/showing = 0
var/queueHide = 0
var/init = 0
@@ -43,7 +42,7 @@ Notes:
/datum/tooltip/New(client/C)
if (C)
src.owner = C
src.owner << browse(file2text(src.file), "window=[src.control]")
src.owner << browse(file2text('code/modules/tooltip/tooltip.html'), "window=[src.control]")
..()
+7 -5
View File
@@ -88,7 +88,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
/datum/uplink_item/proc/spawn_item(turf/loc, obj/item/device/uplink/U)
if(item)
feedback_add_details("traitor_uplink_items_bought", "[item]")
feedback_add_details("traitor_uplink_items_bought", "[name]|[cost]")
return new item(loc)
/datum/uplink_item/proc/buy(mob/user, obj/item/device/uplink/U)
@@ -127,7 +127,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
if(src in GLOB.uplink_items)
GLOB.uplink_items -= src //Take us out instead of leaving a null!
return ..()
//Discounts (dynamically filled above)
/datum/uplink_item/discounts
category = "Discounted Gear"
@@ -1158,6 +1158,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
/datum/uplink_item/cyber_implants/spawn_item(turf/loc, obj/item/device/uplink/U)
if(item)
if(istype(item, /obj/item/organ))
feedback_add_details("traitor_uplink_items_bought", "[item]|[cost]")
return new /obj/item/weapon/storage/box/cyber_implants(loc, item)
else
return ..()
@@ -1325,12 +1326,12 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
new I.item(C)
U.purchase_log += "<big>\icon[I.item]</big>"
feedback_add_details("traitor_uplink_items_bought", "[name]|[cost]")
return C
/datum/uplink_item/badass/random
name = "Random Item"
desc = "Picking this will purchase a random item. Useful if you have some TC to spare or if you haven't \
decided on a strategy yet."
desc = "Picking this will purchase a random item. Useful if you have some TC to spare or if you haven't decided on a strategy yet."
item = /obj/item/weapon/paper
cost = 0
cant_discount = TRUE
@@ -1351,5 +1352,6 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
var/datum/uplink_item/I = pick(possible_items)
U.telecrystals -= I.cost
U.spent_telecrystals += I.cost
feedback_add_details("traitor_uplink_items_bought","RN")
feedback_add_details("traitor_uplink_items_bought","[name]|[I.cost]")
feedback_add_details("traitor_random_uplink_items_gotten","[I.name]")
return new I.item(loc)