Merge branch 'dev' into ofChemistryAndStuff

Conflicts:
	code/datums/recipe.dm
	code/game/machinery/bots/farmbot.dm
	code/game/machinery/bots/medbot.dm
	code/game/mecha/equipment/tools/tools.dm
	code/game/objects/effects/chem/chemsmoke.dm
	code/game/objects/effects/effect_system.dm
	code/game/objects/items/toys.dm
	code/game/objects/items/weapons/extinguisher.dm
	code/game/objects/items/weapons/mop.dm
	code/modules/mob/living/carbon/human/human.dm
	code/modules/organs/organ_internal.dm
	code/modules/reagents/Chemistry-Holder.dm
	code/modules/reagents/Chemistry-Reagents.dm
	code/modules/reagents/Chemistry-Recipes.dm
	code/modules/reagents/reagent_containers/food/snacks.dm
	code/modules/reagents/reagent_containers/pill.dm
	code/modules/reagents/reagent_containers/spray.dm
	maps/exodus-1.dmm
This commit is contained in:
Kelenius
2015-04-28 10:49:26 +03:00
999 changed files with 26502 additions and 23206 deletions

View File

@@ -54,10 +54,10 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
/obj/machinery/r_n_d/circuit_imprinter/blob_act()
if(prob(50))
del(src)
qdel(src)
/obj/machinery/r_n_d/circuit_imprinter/meteorhit()
del(src)
qdel(src)
return
/obj/machinery/r_n_d/circuit_imprinter/proc/TotalMaterials()
@@ -104,46 +104,51 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
return 1
if(O.is_open_container())
return 0
if(!istype(O, /obj/item/stack/sheet/glass) && !istype(O, /obj/item/stack/sheet/mineral/gold) && !istype(O, /obj/item/stack/sheet/mineral/diamond) && !istype(O, /obj/item/stack/sheet/mineral/uranium))
user << "<span class='notice'>You cannot insert this item into \the [src]!</span>"
return 1
// if(!istype(O, /obj/item/stack/sheet/glass) && !istype(O, /obj/item/stack/sheet/mineral/gold) && !istype(O, /obj/item/stack/sheet/mineral/diamond) && !istype(O, /obj/item/stack/sheet/mineral/uranium))
// user << "<span class='notice'>You cannot insert this item into \the [src]!</span>"
// return 1
if(stat)
return 1
if(busy)
user << "<span class='notice'>\The [src] is busy. Please wait for completion of previous operation.</span>"
return 1
var/obj/item/stack/sheet/stack = O
if((TotalMaterials() + stack.perunit) > max_material_amount)
user << "<span class='notice'>\The [src] is full. Please remove glass from \the [src] in order to insert more.</span>"
return 1
var/amount = round(input("How many sheets do you want to add?") as num)
if(amount < 0)
amount = 0
if(amount == 0)
return
if(amount > stack.amount)
amount = min(stack.amount, round((max_material_amount - TotalMaterials()) / stack.perunit))
if(istype(O, /obj/item/stack/sheet/glass) || istype(O, /obj/item/stack/sheet/mineral/gold) || istype(O, /obj/item/stack/sheet/mineral/diamond) || istype(O, /obj/item/stack/sheet/mineral/uranium))
busy = 1
use_power(max(1000, (3750 * amount / 10)))
var/stacktype = stack.type
stack.use(amount)
if(do_after(usr, 16))
user << "<span class='notice'>You add [amount] sheets to \the [src].</span>"
switch(stacktype)
if(/obj/item/stack/sheet/glass)
g_amount += amount * 3750
if(/obj/item/stack/sheet/mineral/gold)
gold_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/diamond)
diamond_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/uranium)
uranium_amount += amount * 2000
else
new stacktype(loc, amount)
busy = 0
updateUsrDialog()
var/obj/item/stack/sheet/stack = O
if((TotalMaterials() + stack.perunit) > max_material_amount)
user << "<span class='notice'>\The [src] is full. Please remove glass from \the [src] in order to insert more.</span>"
return 1
var/amount = round(input("How many sheets do you want to add?") as num)
if(amount < 0)
amount = 0
if(amount == 0)
return
if(amount > stack.amount)
amount = min(stack.amount, round((max_material_amount - TotalMaterials()) / stack.perunit))
busy = 1
use_power(max(1000, (3750 * amount / 10)))
var/stacktype = stack.type
stack.use(amount)
if(do_after(usr, 16))
user << "<span class='notice'>You add [amount] sheets to \the [src].</span>"
switch(stacktype)
if(/obj/item/stack/sheet/glass)
g_amount += amount * 3750
if(/obj/item/stack/sheet/mineral/gold)
gold_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/diamond)
diamond_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/uranium)
uranium_amount += amount * 2000
else
new stacktype(loc, amount)
busy = 0
updateUsrDialog()
..()
//This is to stop these machines being hackable via clicking.
/obj/machinery/r_n_d/circuit_imprinter/attack_hand(mob/user as mob)

View File

@@ -485,6 +485,12 @@ datum/design/circuit/tcom/receiver
req_tech = list("programming" = 4, "engineering" = 3, "bluespace" = 2)
build_path = /obj/item/weapon/circuitboard/telecomms/receiver
datum/design/circuit/tcom/bluespacerelay
name = "emergency bluespace relay"
id = "bluespace-relay"
req_tech = list("programming" = 4, "bluespace" = 4)
build_path = /obj/item/weapon/circuitboard/bluespacerelay
///////////////////////////////////
////////////Mecha Modules//////////
///////////////////////////////////

View File

@@ -13,7 +13,7 @@ Note: Must be placed within 3 tiles of the R&D Console
var/obj/item/weapon/loaded_item = null
var/decon_mod = 1
var/min_reliability = 90
use_power = 1
idle_power_usage = 30
active_power_usage = 2500
@@ -35,15 +35,9 @@ Note: Must be placed within 3 tiles of the R&D Console
min_reliability = 93 - T
/obj/machinery/r_n_d/destructive_analyzer/meteorhit()
del(src)
qdel(src)
return
/obj/machinery/r_n_d/destructive_analyzer/proc/ConvertReqString2List(var/list/source_list)
var/list/temp_list = params2list(source_list)
for(var/O in temp_list)
temp_list[O] = text2num(temp_list[O])
return temp_list
/obj/machinery/r_n_d/destructive_analyzer/update_icon()
if(panel_open)
icon_state = "d_analyzer_t"

View File

@@ -75,7 +75,7 @@ var/global/list/obj/machinery/message_server/message_servers = list()
..()
return
/obj/machinery/message_server/Del()
/obj/machinery/message_server/Destroy()
message_servers -= src
..()
return
@@ -122,7 +122,7 @@ var/global/list/obj/machinery/message_server/message_servers = list()
istype(O,/obj/item/weapon/circuitboard/message_monitor))
spamfilter_limit += round(MESSAGE_SERVER_DEFAULT_SPAM_LIMIT / 2)
user.drop_item()
del(O)
qdel(O)
user << "You install additional memory and processors into message server. Its filtering capabilities been enhanced."
else
..(O, user)
@@ -221,14 +221,14 @@ var/obj/machinery/blackbox_recorder/blackbox
var/list/datum/feedback_variable/feedback = new()
//Only one can exsist in the world!
//Only one can exist in the world!
/obj/machinery/blackbox_recorder/New()
if(blackbox)
if(istype(blackbox,/obj/machinery/blackbox_recorder))
del(src)
qdel(src)
blackbox = src
/obj/machinery/blackbox_recorder/Del()
/obj/machinery/blackbox_recorder/Destroy()
var/turf/T = locate(1,1,2)
if(T)
blackbox = null

View File

@@ -116,9 +116,6 @@ Note: Must be placed west/left of and R&D console to function.
if(busy)
user << "<span class='notice'>\The [src] is busy. Please wait for completion of previous operation.</span>"
return 1
if(!istype(O, /obj/item/stack/sheet))
user << "<span class='notice'>You cannot insert this item into \the [src]!</span>"
return 1
if(stat)
return 1
if(istype(O,/obj/item/stack/sheet))
@@ -127,51 +124,52 @@ Note: Must be placed west/left of and R&D console to function.
user << "<span class='notice'>\The [src]'s material bin is full. Please remove material before adding more.</span>"
return 1
var/obj/item/stack/sheet/stack = O
var/amount = round(input("How many sheets do you want to add?") as num)//No decimals
if(!O)
return
if(amount < 0)//No negative numbers
amount = 0
if(amount == 0)
return
if(amount > stack.get_amount())
amount = stack.get_amount()
if(max_material_storage - TotalMaterials() < (amount * stack.perunit))//Can't overfill
amount = min(stack.amount, round((max_material_storage - TotalMaterials()) / stack.perunit))
var/obj/item/stack/sheet/stack = O
var/amount = round(input("How many sheets do you want to add?") as num)//No decimals
if(!O)
return
if(amount < 0)//No negative numbers
amount = 0
if(amount == 0)
return
if(amount > stack.get_amount())
amount = stack.get_amount()
if(max_material_storage - TotalMaterials() < (amount * stack.perunit))//Can't overfill
amount = min(stack.amount, round((max_material_storage - TotalMaterials()) / stack.perunit))
overlays += "protolathe_[stack.name]"
sleep(10)
overlays -= "protolathe_[stack.name]"
overlays += "protolathe_[stack.name]"
sleep(10)
overlays -= "protolathe_[stack.name]"
icon_state = "protolathe"
busy = 1
use_power(max(1000, (3750 * amount / 10)))
var/stacktype = stack.type
stack.use(amount)
if(do_after(user, 16))
user << "<span class='notice'>You add [amount] sheets to \the [src].</span>"
icon_state = "protolathe"
switch(stacktype)
if(/obj/item/stack/sheet/metal)
m_amount += amount * 3750
if(/obj/item/stack/sheet/glass)
g_amount += amount * 3750
if(/obj/item/stack/sheet/mineral/gold)
gold_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/silver)
silver_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/phoron)
phoron_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/uranium)
uranium_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/diamond)
diamond_amount += amount * 2000
else
new stacktype(loc, amount)
busy = 0
updateUsrDialog()
return
busy = 1
use_power(max(1000, (3750 * amount / 10)))
var/stacktype = stack.type
stack.use(amount)
if(do_after(user, 16))
user << "<span class='notice'>You add [amount] sheets to \the [src].</span>"
icon_state = "protolathe"
switch(stacktype)
if(/obj/item/stack/sheet/metal)
m_amount += amount * 3750
if(/obj/item/stack/sheet/glass)
g_amount += amount * 3750
if(/obj/item/stack/sheet/mineral/gold)
gold_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/silver)
silver_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/phoron)
phoron_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/uranium)
uranium_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/diamond)
diamond_amount += amount * 2000
else
new stacktype(loc, amount)
busy = 0
updateUsrDialog()
return
..()
//This is to stop these machines being hackable via clicking.
/obj/machinery/r_n_d/protolathe/attack_hand(mob/user as mob)

View File

@@ -54,7 +54,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
check_tech = new T()
if(check_tech.id == ID)
return_name = check_tech.name
del(check_tech)
qdel(check_tech)
check_tech = null
break
@@ -86,7 +86,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
temp_reagent = new R()
if(temp_reagent.id == ID)
return_name = temp_reagent.name
del(temp_reagent)
qdel(temp_reagent)
temp_reagent = null
break
return return_name
@@ -256,7 +256,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
screen = 1.0
return
if(linked_destroy.loaded_item.reliability >= linked_destroy.min_reliability)
var/list/temp_tech = linked_destroy.ConvertReqString2List(linked_destroy.loaded_item.origin_tech)
var/list/temp_tech = ConvertReqString2List(linked_destroy.loaded_item.origin_tech)
for(var/T in temp_tech)
files.UpdateTech(T, temp_tech[T])
if(linked_destroy.loaded_item.reliability < 100 && linked_destroy.loaded_item.crit_fail)
@@ -274,11 +274,11 @@ won't update every console in existence) but it's more of a hassle to do. Also,
S.use(1)
linked_destroy.loaded_item = S
else
del(S)
qdel(S)
linked_destroy.icon_state = "d_analyzer"
else
if(!(I in linked_destroy.component_parts))
del(I)
qdel(I)
linked_destroy.icon_state = "d_analyzer"
use_power(linked_destroy.active_power_usage)
screen = 1.0
@@ -468,7 +468,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
sheet.amount = min(available_num_sheets, desired_num_sheets)
linked_lathe.vars[res_amount] = max(0, (linked_lathe.vars[res_amount]-sheet.amount * sheet.perunit))
else
del sheet
qdel(sheet)
else if(href_list["imprinter_ejectsheet"] && linked_imprinter) //Causes the protolathe to eject a sheet of material
var/desired_num_sheets = text2num(href_list["amount"])
var/res_amount, type
@@ -492,7 +492,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
sheet.amount = min(available_num_sheets, desired_num_sheets)
linked_imprinter.vars[res_amount] = max(0, (linked_imprinter.vars[res_amount]-sheet.amount * sheet.perunit))
else
del sheet
qdel(sheet)
else if(href_list["find_device"]) //The R&D console looks for devices nearby to link up with.
screen = 0.0
@@ -518,7 +518,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
var/choice = alert("R&D Console Database Reset", "Are you sure you want to reset the R&D console's database? Data lost cannot be recovered.", "Continue", "Cancel")
if(choice == "Continue")
screen = 0.0
del(files)
qdel(files)
files = new /datum/research(src)
spawn(20)
screen = 1.6
@@ -753,7 +753,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "Name: [linked_destroy.loaded_item.name]<BR>"
dat += "Origin Tech:"
dat += "<UL>"
var/list/temp_tech = linked_destroy.ConvertReqString2List(linked_destroy.loaded_item.origin_tech)
var/list/temp_tech = ConvertReqString2List(linked_destroy.loaded_item.origin_tech)
for(var/T in temp_tech)
dat += "<LI>[CallTechName(T)] [temp_tech[T]]"
for(var/datum/tech/F in files.known_tech)

View File

@@ -59,6 +59,12 @@ research holder datum.
possible_designs += new D(src)
RefreshResearch()
/datum/research/techonly
/datum/research/techonly/New()
for(var/T in typesof(/datum/tech) - /datum/tech)
possible_tech += new T(src)
RefreshResearch()
//Checks to see if tech has all the required pre-reqs.

View File

@@ -24,7 +24,7 @@
RefreshParts()
src.initialize(); //Agouri
/obj/machinery/r_n_d/server/Del()
/obj/machinery/r_n_d/server/Destroy()
griefProtection()
..()
@@ -149,7 +149,7 @@
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = src.loc
del(src)
qdel(src)
return 1
/obj/machinery/r_n_d/server/attack_hand(mob/user as mob)

View File

@@ -1,124 +1,124 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Large finds - (Potentially) active alien machinery from the dawn of time
/datum/artifact_find
var/artifact_id
var/artifact_find_type
var/artifact_detect_range
/datum/artifact_find/New()
artifact_detect_range = rand(5,300)
artifact_id = "[pick("kappa","sigma","antaeres","beta","omicron","iota","epsilon","omega","gamma","delta","tau","alpha")]-[rand(100,999)]"
artifact_find_type = pick(\
5;/obj/machinery/power/supermatter,\
5;/obj/structure/constructshell,\
5;/obj/machinery/syndicate_beacon,\
25;/obj/machinery/power/supermatter/shard,\
50;/obj/structure/cult/pylon,\
100;/obj/machinery/auto_cloner,\
100;/obj/machinery/giga_drill,\
100;/obj/machinery/replicator,\
150;/obj/structure/crystal,\
1000;/obj/machinery/artifact)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Boulders - sometimes turn up after excavating turf - excavate further to try and find large xenoarch finds
/obj/structure/boulder
name = "rocky debris"
desc = "Leftover rock from an excavation, it's been partially dug out already but there's still a lot to go."
icon = 'icons/obj/mining.dmi'
icon_state = "boulder1"
density = 1
opacity = 1
anchored = 1
var/excavation_level = 0
var/datum/geosample/geological_data
var/datum/artifact_find/artifact_find
var/last_act = 0
/obj/structure/boulder/New()
icon_state = "boulder[rand(1,4)]"
excavation_level = rand(5,50)
/obj/structure/boulder/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/device/core_sampler))
src.geological_data.artifact_distance = rand(-100,100) / 100
src.geological_data.artifact_id = artifact_find.artifact_id
var/obj/item/device/core_sampler/C = W
C.sample_item(src, user)
return
if (istype(W, /obj/item/device/depth_scanner))
var/obj/item/device/depth_scanner/C = W
C.scan_atom(user, src)
return
if (istype(W, /obj/item/device/measuring_tape))
var/obj/item/device/measuring_tape/P = W
user.visible_message("\blue[user] extends [P] towards [src].","\blue You extend [P] towards [src].")
if(do_after(user,40))
user << "\blue \icon[P] [src] has been excavated to a depth of [2*src.excavation_level]cm."
return
if (istype(W, /obj/item/weapon/pickaxe))
var/obj/item/weapon/pickaxe/P = W
if(last_act + P.digspeed > world.time)//prevents message spam
return
last_act = world.time
user << "\red You start [P.drill_verb] [src]."
if(!do_after(user,P.digspeed))
return
user << "\blue You finish [P.drill_verb] [src]."
excavation_level += P.excavation_amount
if(excavation_level > 100)
//failure
user.visible_message("<font color='red'><b>[src] suddenly crumbles away.</b></font>",\
"\red [src] has disintegrated under your onslaught, any secrets it was holding are long gone.")
del(src)
return
if(prob(excavation_level))
//success
if(artifact_find)
var/spawn_type = artifact_find.artifact_find_type
var/obj/O = new spawn_type(get_turf(src))
if(istype(O,/obj/machinery/artifact))
var/obj/machinery/artifact/X = O
if(X.my_effect)
X.my_effect.artifact_id = artifact_find.artifact_id
src.visible_message("<font color='red'><b>[src] suddenly crumbles away.</b></font>")
else
user.visible_message("<font color='red'><b>[src] suddenly crumbles away.</b></font>",\
"\blue [src] has been whittled away under your careful excavation, but there was nothing of interest inside.")
del(src)
/obj/structure/boulder/Bumped(AM)
. = ..()
if(istype(AM,/mob/living/carbon/human))
var/mob/living/carbon/human/H = AM
if((istype(H.l_hand,/obj/item/weapon/pickaxe)) && (!H.hand))
attackby(H.l_hand,H)
else if((istype(H.r_hand,/obj/item/weapon/pickaxe)) && H.hand)
attackby(H.r_hand,H)
else if(istype(AM,/mob/living/silicon/robot))
var/mob/living/silicon/robot/R = AM
if(istype(R.module_active,/obj/item/weapon/pickaxe))
attackby(R.module_active,R)
else if(istype(AM,/obj/mecha))
var/obj/mecha/M = AM
if(istype(M.selected,/obj/item/mecha_parts/mecha_equipment/tool/drill))
M.selected.action(src)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Large finds - (Potentially) active alien machinery from the dawn of time
/datum/artifact_find
var/artifact_id
var/artifact_find_type
var/artifact_detect_range
/datum/artifact_find/New()
artifact_detect_range = rand(5,300)
artifact_id = "[pick("kappa","sigma","antaeres","beta","omicron","iota","epsilon","omega","gamma","delta","tau","alpha")]-[rand(100,999)]"
artifact_find_type = pick(\
5;/obj/machinery/power/supermatter,\
5;/obj/structure/constructshell,\
5;/obj/machinery/syndicate_beacon,\
25;/obj/machinery/power/supermatter/shard,\
50;/obj/structure/cult/pylon,\
100;/obj/machinery/auto_cloner,\
100;/obj/machinery/giga_drill,\
100;/obj/machinery/replicator,\
150;/obj/structure/crystal,\
1000;/obj/machinery/artifact)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Boulders - sometimes turn up after excavating turf - excavate further to try and find large xenoarch finds
/obj/structure/boulder
name = "rocky debris"
desc = "Leftover rock from an excavation, it's been partially dug out already but there's still a lot to go."
icon = 'icons/obj/mining.dmi'
icon_state = "boulder1"
density = 1
opacity = 1
anchored = 1
var/excavation_level = 0
var/datum/geosample/geological_data
var/datum/artifact_find/artifact_find
var/last_act = 0
/obj/structure/boulder/New()
icon_state = "boulder[rand(1,4)]"
excavation_level = rand(5,50)
/obj/structure/boulder/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/device/core_sampler))
src.geological_data.artifact_distance = rand(-100,100) / 100
src.geological_data.artifact_id = artifact_find.artifact_id
var/obj/item/device/core_sampler/C = W
C.sample_item(src, user)
return
if (istype(W, /obj/item/device/depth_scanner))
var/obj/item/device/depth_scanner/C = W
C.scan_atom(user, src)
return
if (istype(W, /obj/item/device/measuring_tape))
var/obj/item/device/measuring_tape/P = W
user.visible_message("\blue[user] extends [P] towards [src].","\blue You extend [P] towards [src].")
if(do_after(user,40))
user << "\blue \icon[P] [src] has been excavated to a depth of [2*src.excavation_level]cm."
return
if (istype(W, /obj/item/weapon/pickaxe))
var/obj/item/weapon/pickaxe/P = W
if(last_act + P.digspeed > world.time)//prevents message spam
return
last_act = world.time
user << "\red You start [P.drill_verb] [src]."
if(!do_after(user,P.digspeed))
return
user << "\blue You finish [P.drill_verb] [src]."
excavation_level += P.excavation_amount
if(excavation_level > 100)
//failure
user.visible_message("<font color='red'><b>[src] suddenly crumbles away.</b></font>",\
"\red [src] has disintegrated under your onslaught, any secrets it was holding are long gone.")
qdel(src)
return
if(prob(excavation_level))
//success
if(artifact_find)
var/spawn_type = artifact_find.artifact_find_type
var/obj/O = new spawn_type(get_turf(src))
if(istype(O,/obj/machinery/artifact))
var/obj/machinery/artifact/X = O
if(X.my_effect)
X.my_effect.artifact_id = artifact_find.artifact_id
src.visible_message("<font color='red'><b>[src] suddenly crumbles away.</b></font>")
else
user.visible_message("<font color='red'><b>[src] suddenly crumbles away.</b></font>",\
"\blue [src] has been whittled away under your careful excavation, but there was nothing of interest inside.")
qdel(src)
/obj/structure/boulder/Bumped(AM)
. = ..()
if(istype(AM,/mob/living/carbon/human))
var/mob/living/carbon/human/H = AM
if((istype(H.l_hand,/obj/item/weapon/pickaxe)) && (!H.hand))
attackby(H.l_hand,H)
else if((istype(H.r_hand,/obj/item/weapon/pickaxe)) && H.hand)
attackby(H.r_hand,H)
else if(istype(AM,/mob/living/silicon/robot))
var/mob/living/silicon/robot/R = AM
if(istype(R.module_active,/obj/item/weapon/pickaxe))
attackby(R.module_active,R)
else if(istype(AM,/obj/mecha))
var/obj/mecha/M = AM
if(istype(M.selected,/obj/item/mecha_parts/mecha_equipment/tool/drill))
M.selected.action(src)

View File

@@ -1,36 +1,36 @@
/obj/structure/crystal
name = "large crystal"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "crystal"
density = 1
/obj/structure/crystal/New()
..()
icon_state = pick("ano70","ano80")
desc = pick(\
"It shines faintly as it catches the light.",\
"It appears to have a faint inner glow.",\
"It seems to draw you inward as you look it at.",\
"Something twinkles faintly as you look at it.",\
"It's mesmerizing to behold.")
/obj/structure/crystal/Del()
src.visible_message("\red<b>[src] shatters!</b>")
if(prob(75))
new /obj/item/weapon/shard/phoron(src.loc)
if(prob(50))
new /obj/item/weapon/shard/phoron(src.loc)
if(prob(25))
new /obj/item/weapon/shard/phoron(src.loc)
if(prob(75))
new /obj/item/weapon/shard(src.loc)
if(prob(50))
new /obj/item/weapon/shard(src.loc)
if(prob(25))
new /obj/item/weapon/shard(src.loc)
..()
//todo: laser_act
/obj/structure/crystal
name = "large crystal"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "crystal"
density = 1
/obj/structure/crystal/New()
..()
icon_state = pick("ano70","ano80")
desc = pick(\
"It shines faintly as it catches the light.",\
"It appears to have a faint inner glow.",\
"It seems to draw you inward as you look it at.",\
"Something twinkles faintly as you look at it.",\
"It's mesmerizing to behold.")
/obj/structure/crystal/Destroy()
src.visible_message("\red<b>[src] shatters!</b>")
if(prob(75))
new /obj/item/weapon/shard/phoron(src.loc)
if(prob(50))
new /obj/item/weapon/shard/phoron(src.loc)
if(prob(25))
new /obj/item/weapon/shard/phoron(src.loc)
if(prob(75))
new /obj/item/weapon/shard(src.loc)
if(prob(50))
new /obj/item/weapon/shard(src.loc)
if(prob(25))
new /obj/item/weapon/shard(src.loc)
..()
//todo: laser_act

View File

@@ -102,7 +102,7 @@
spawned_obj.desc += " It is made of [source_material]."
else
spawned_obj.desc = "It is made of [source_material]."
del(source_material)
qdel(source_material)
spawn_progress_time = 0
max_spawn_time = rand(30,100)

View File

@@ -1,366 +1,366 @@
#define EFFECT_TOUCH 0
#define EFFECT_AURA 1
#define EFFECT_PULSE 2
#define MAX_EFFECT 2
#define TRIGGER_TOUCH 0
#define TRIGGER_WATER 1
#define TRIGGER_ACID 2
#define TRIGGER_VOLATILE 3
#define TRIGGER_TOXIN 4
#define TRIGGER_FORCE 5
#define TRIGGER_ENERGY 6
#define TRIGGER_HEAT 7
#define TRIGGER_COLD 8
#define TRIGGER_PHORON 9
#define TRIGGER_OXY 10
#define TRIGGER_CO2 11
#define TRIGGER_NITRO 12
#define MAX_TRIGGER 12
/*
//sleeping gas appears to be bugged, currently
var/list/valid_primary_effect_types = list(\
/datum/artifact_effect/cellcharge,\
/datum/artifact_effect/celldrain,\
/datum/artifact_effect/forcefield,\
/datum/artifact_effect/gasoxy,\
/datum/artifact_effect/gasplasma,\
/* /datum/artifact_effect/gassleeping,\*/
/datum/artifact_effect/heal,\
/datum/artifact_effect/hurt,\
/datum/artifact_effect/emp,\
/datum/artifact_effect/teleport,\
/datum/artifact_effect/robohurt,\
/datum/artifact_effect/roboheal)
var/list/valid_secondary_effect_types = list(\
/datum/artifact_effect/cold,\
/datum/artifact_effect/badfeeling,\
/datum/artifact_effect/cellcharge,\
/datum/artifact_effect/celldrain,\
/datum/artifact_effect/dnaswitch,\
/datum/artifact_effect/emp,\
/datum/artifact_effect/gasco2,\
/datum/artifact_effect/gasnitro,\
/datum/artifact_effect/gasoxy,\
/datum/artifact_effect/gasphoron,\
/* /datum/artifact_effect/gassleeping,\*/
/datum/artifact_effect/goodfeeling,\
/datum/artifact_effect/heal,\
/datum/artifact_effect/hurt,\
/datum/artifact_effect/radiate,\
/datum/artifact_effect/roboheal,\
/datum/artifact_effect/robohurt,\
/datum/artifact_effect/sleepy,\
/datum/artifact_effect/stun,\
/datum/artifact_effect/teleport)
*/
/obj/machinery/artifact
name = "alien artifact"
desc = "A large alien device."
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "ano00"
var/icon_num = 0
density = 1
var/datum/artifact_effect/my_effect
var/datum/artifact_effect/secondary_effect
var/being_used = 0
/obj/machinery/artifact/New()
..()
//setup primary effect - these are the main ones (mixed)
var/effecttype = pick(typesof(/datum/artifact_effect) - /datum/artifact_effect)
my_effect = new effecttype(src)
//75% chance to have a secondary stealthy (and mostly bad) effect
if(prob(75))
effecttype = pick(typesof(/datum/artifact_effect) - /datum/artifact_effect)
secondary_effect = new effecttype(src)
if(prob(75))
secondary_effect.ToggleActivate(0)
icon_num = rand(0,11)
icon_state = "ano[icon_num]0"
if(icon_num == 7 || icon_num == 8)
name = "large crystal"
desc = pick("It shines faintly as it catches the light.",\
"It appears to have a faint inner glow.",\
"It seems to draw you inward as you look it at.",\
"Something twinkles faintly as you look at it.",\
"It's mesmerizing to behold.")
if(prob(50))
my_effect.trigger = TRIGGER_ENERGY
else if(icon_num == 9)
name = "alien computer"
desc = "It is covered in strange markings."
if(prob(75))
my_effect.trigger = TRIGGER_TOUCH
else if(icon_num == 10)
desc = "A large alien device, there appear to be some kind of vents in the side."
if(prob(50))
my_effect.trigger = rand(6,12)
else if(icon_num == 11)
name = "sealed alien pod"
desc = "A strange alien device."
if(prob(25))
my_effect.trigger = rand(1,4)
#define TRIGGER_PHORON 9
#define TRIGGER_OXY 10
#define TRIGGER_CO2 11
#define TRIGGER_NITRO 12
/obj/machinery/artifact/process()
var/turf/L = loc
if(isnull(L) || !istype(L)) // We're inside a container or on null turf, either way stop processing effects
return
if(my_effect)
my_effect.process()
if(secondary_effect)
secondary_effect.process()
if(pulledby)
Bumped(pulledby)
//if either of our effects rely on environmental factors, work that out
var/trigger_cold = 0
var/trigger_hot = 0
var/trigger_phoron = 0
var/trigger_oxy = 0
var/trigger_co2 = 0
var/trigger_nitro = 0
if( (my_effect.trigger >= TRIGGER_HEAT && my_effect.trigger <= TRIGGER_NITRO) || (my_effect.trigger >= TRIGGER_HEAT && my_effect.trigger <= TRIGGER_NITRO) )
var/turf/T = get_turf(src)
var/datum/gas_mixture/env = T.return_air()
if(env)
if(env.temperature < 225)
trigger_cold = 1
else if(env.temperature > 375)
trigger_hot = 1
if(env.gas["phoron"] >= 10)
trigger_phoron = 1
if(env.gas["oxygen"] >= 10)
trigger_oxy = 1
if(env.gas["carbon_dioxide"] >= 10)
trigger_co2 = 1
if(env.gas["nitrogen"] >= 10)
trigger_nitro = 1
//COLD ACTIVATION
if(trigger_cold)
if(my_effect.trigger == TRIGGER_COLD && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_COLD && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_COLD && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_COLD && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
//HEAT ACTIVATION
if(trigger_hot)
if(my_effect.trigger == TRIGGER_HEAT && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_HEAT && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_HEAT && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_HEAT && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
//PHORON GAS ACTIVATION
if(trigger_phoron)
if(my_effect.trigger == TRIGGER_PHORON && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_PHORON && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_PHORON && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_PHORON && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
//OXYGEN GAS ACTIVATION
if(trigger_oxy)
if(my_effect.trigger == TRIGGER_OXY && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_OXY && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_OXY && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_OXY && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
//CO2 GAS ACTIVATION
if(trigger_co2)
if(my_effect.trigger == TRIGGER_CO2 && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_CO2 && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_CO2 && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_CO2 && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
//NITROGEN GAS ACTIVATION
if(trigger_nitro)
if(my_effect.trigger == TRIGGER_NITRO && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_NITRO && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_NITRO && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_NITRO && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
/obj/machinery/artifact/attack_hand(var/mob/user as mob)
if (get_dist(user, src) > 1)
user << "\red You can't reach [src] from here."
return
if(ishuman(user) && user:gloves)
user << "<b>You touch [src]</b> with your gloved hands, [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")]."
return
src.add_fingerprint(user)
if(my_effect.trigger == TRIGGER_TOUCH)
user << "<b>You touch [src].<b>"
my_effect.ToggleActivate()
else
user << "<b>You touch [src],</b> [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")]."
if(prob(25) && secondary_effect && secondary_effect.trigger == TRIGGER_TOUCH)
secondary_effect.ToggleActivate(0)
if (my_effect.effect == EFFECT_TOUCH)
my_effect.DoEffectTouch(user)
if(secondary_effect && secondary_effect.effect == EFFECT_TOUCH && secondary_effect.activated)
secondary_effect.DoEffectTouch(user)
/obj/machinery/artifact/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
if (istype(W, /obj/item/weapon/reagent_containers/))
if(W.reagents.has_reagent("hydrogen", 1) || W.reagents.has_reagent("water", 1))
if(my_effect.trigger == TRIGGER_WATER)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_WATER && prob(25))
secondary_effect.ToggleActivate(0)
else if(W.reagents.has_reagent("acid", 1) || W.reagents.has_reagent("pacid", 1) || W.reagents.has_reagent("diethylamine", 1))
if(my_effect.trigger == TRIGGER_ACID)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_ACID && prob(25))
secondary_effect.ToggleActivate(0)
else if(W.reagents.has_reagent("phoron", 1) || W.reagents.has_reagent("thermite", 1))
if(my_effect.trigger == TRIGGER_VOLATILE)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_VOLATILE && prob(25))
secondary_effect.ToggleActivate(0)
else if(W.reagents.has_reagent("toxin", 1) || W.reagents.has_reagent("cyanide", 1) || W.reagents.has_reagent("amanitin", 1) || W.reagents.has_reagent("neurotoxin", 1))
if(my_effect.trigger == TRIGGER_TOXIN)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_TOXIN && prob(25))
secondary_effect.ToggleActivate(0)
else if(istype(W,/obj/item/weapon/melee/baton) && W:status ||\
istype(W,/obj/item/weapon/melee/energy) ||\
istype(W,/obj/item/weapon/melee/cultblade) ||\
istype(W,/obj/item/weapon/card/emag) ||\
istype(W,/obj/item/device/multitool))
if (my_effect.trigger == TRIGGER_ENERGY)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_ENERGY && prob(25))
secondary_effect.ToggleActivate(0)
else if (istype(W,/obj/item/weapon/flame) && W:lit ||\
istype(W,/obj/item/weapon/weldingtool) && W:welding)
if(my_effect.trigger == TRIGGER_HEAT)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_HEAT && prob(25))
secondary_effect.ToggleActivate(0)
else
..()
if (my_effect.trigger == TRIGGER_FORCE && W.force >= 10)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25))
secondary_effect.ToggleActivate(0)
/obj/machinery/artifact/Bumped(M as mob|obj)
..()
if(istype(M,/obj))
if(M:throwforce >= 10)
if(my_effect.trigger == TRIGGER_FORCE)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25))
secondary_effect.ToggleActivate(0)
else if(ishuman(M) && !istype(M:gloves,/obj/item/clothing/gloves))
var/warn = 0
if (my_effect.trigger == TRIGGER_TOUCH && prob(50))
my_effect.ToggleActivate()
warn = 1
if(secondary_effect && secondary_effect.trigger == TRIGGER_TOUCH && prob(25))
secondary_effect.ToggleActivate(0)
warn = 1
if (my_effect.effect == EFFECT_TOUCH && prob(50))
my_effect.DoEffectTouch(M)
warn = 1
if(secondary_effect && secondary_effect.effect == EFFECT_TOUCH && secondary_effect.activated && prob(50))
secondary_effect.DoEffectTouch(M)
warn = 1
if(warn)
M << "<b>You accidentally touch [src].<b>"
..()
/obj/machinery/artifact/bullet_act(var/obj/item/projectile/P)
if(istype(P,/obj/item/projectile/bullet) ||\
istype(P,/obj/item/projectile/hivebotbullet))
if(my_effect.trigger == TRIGGER_FORCE)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25))
secondary_effect.ToggleActivate(0)
else if(istype(P,/obj/item/projectile/beam) ||\
istype(P,/obj/item/projectile/ion) ||\
istype(P,/obj/item/projectile/energy))
if(my_effect.trigger == TRIGGER_ENERGY)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_ENERGY && prob(25))
secondary_effect.ToggleActivate(0)
/obj/machinery/artifact/ex_act(severity)
switch(severity)
if(1.0) del src
if(2.0)
if (prob(50))
del src
else
if(my_effect.trigger == TRIGGER_FORCE || my_effect.trigger == TRIGGER_HEAT)
my_effect.ToggleActivate()
if(secondary_effect && (secondary_effect.trigger == TRIGGER_FORCE || secondary_effect.trigger == TRIGGER_HEAT) && prob(25))
secondary_effect.ToggleActivate(0)
if(3.0)
if (my_effect.trigger == TRIGGER_FORCE || my_effect.trigger == TRIGGER_HEAT)
my_effect.ToggleActivate()
if(secondary_effect && (secondary_effect.trigger == TRIGGER_FORCE || secondary_effect.trigger == TRIGGER_HEAT) && prob(25))
secondary_effect.ToggleActivate(0)
return
/obj/machinery/artifact/Move()
..()
if(my_effect)
my_effect.UpdateMove()
if(secondary_effect)
secondary_effect.UpdateMove()
#define EFFECT_TOUCH 0
#define EFFECT_AURA 1
#define EFFECT_PULSE 2
#define MAX_EFFECT 2
#define TRIGGER_TOUCH 0
#define TRIGGER_WATER 1
#define TRIGGER_ACID 2
#define TRIGGER_VOLATILE 3
#define TRIGGER_TOXIN 4
#define TRIGGER_FORCE 5
#define TRIGGER_ENERGY 6
#define TRIGGER_HEAT 7
#define TRIGGER_COLD 8
#define TRIGGER_PHORON 9
#define TRIGGER_OXY 10
#define TRIGGER_CO2 11
#define TRIGGER_NITRO 12
#define MAX_TRIGGER 12
/*
//sleeping gas appears to be bugged, currently
var/list/valid_primary_effect_types = list(\
/datum/artifact_effect/cellcharge,\
/datum/artifact_effect/celldrain,\
/datum/artifact_effect/forcefield,\
/datum/artifact_effect/gasoxy,\
/datum/artifact_effect/gasplasma,\
/* /datum/artifact_effect/gassleeping,\*/
/datum/artifact_effect/heal,\
/datum/artifact_effect/hurt,\
/datum/artifact_effect/emp,\
/datum/artifact_effect/teleport,\
/datum/artifact_effect/robohurt,\
/datum/artifact_effect/roboheal)
var/list/valid_secondary_effect_types = list(\
/datum/artifact_effect/cold,\
/datum/artifact_effect/badfeeling,\
/datum/artifact_effect/cellcharge,\
/datum/artifact_effect/celldrain,\
/datum/artifact_effect/dnaswitch,\
/datum/artifact_effect/emp,\
/datum/artifact_effect/gasco2,\
/datum/artifact_effect/gasnitro,\
/datum/artifact_effect/gasoxy,\
/datum/artifact_effect/gasphoron,\
/* /datum/artifact_effect/gassleeping,\*/
/datum/artifact_effect/goodfeeling,\
/datum/artifact_effect/heal,\
/datum/artifact_effect/hurt,\
/datum/artifact_effect/radiate,\
/datum/artifact_effect/roboheal,\
/datum/artifact_effect/robohurt,\
/datum/artifact_effect/sleepy,\
/datum/artifact_effect/stun,\
/datum/artifact_effect/teleport)
*/
/obj/machinery/artifact
name = "alien artifact"
desc = "A large alien device."
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "ano00"
var/icon_num = 0
density = 1
var/datum/artifact_effect/my_effect
var/datum/artifact_effect/secondary_effect
var/being_used = 0
/obj/machinery/artifact/New()
..()
//setup primary effect - these are the main ones (mixed)
var/effecttype = pick(typesof(/datum/artifact_effect) - /datum/artifact_effect)
my_effect = new effecttype(src)
//75% chance to have a secondary stealthy (and mostly bad) effect
if(prob(75))
effecttype = pick(typesof(/datum/artifact_effect) - /datum/artifact_effect)
secondary_effect = new effecttype(src)
if(prob(75))
secondary_effect.ToggleActivate(0)
icon_num = rand(0,11)
icon_state = "ano[icon_num]0"
if(icon_num == 7 || icon_num == 8)
name = "large crystal"
desc = pick("It shines faintly as it catches the light.",\
"It appears to have a faint inner glow.",\
"It seems to draw you inward as you look it at.",\
"Something twinkles faintly as you look at it.",\
"It's mesmerizing to behold.")
if(prob(50))
my_effect.trigger = TRIGGER_ENERGY
else if(icon_num == 9)
name = "alien computer"
desc = "It is covered in strange markings."
if(prob(75))
my_effect.trigger = TRIGGER_TOUCH
else if(icon_num == 10)
desc = "A large alien device, there appear to be some kind of vents in the side."
if(prob(50))
my_effect.trigger = rand(6,12)
else if(icon_num == 11)
name = "sealed alien pod"
desc = "A strange alien device."
if(prob(25))
my_effect.trigger = rand(1,4)
#define TRIGGER_PHORON 9
#define TRIGGER_OXY 10
#define TRIGGER_CO2 11
#define TRIGGER_NITRO 12
/obj/machinery/artifact/process()
var/turf/L = loc
if(isnull(L) || !istype(L)) // We're inside a container or on null turf, either way stop processing effects
return
if(my_effect)
my_effect.process()
if(secondary_effect)
secondary_effect.process()
if(pulledby)
Bumped(pulledby)
//if either of our effects rely on environmental factors, work that out
var/trigger_cold = 0
var/trigger_hot = 0
var/trigger_phoron = 0
var/trigger_oxy = 0
var/trigger_co2 = 0
var/trigger_nitro = 0
if( (my_effect.trigger >= TRIGGER_HEAT && my_effect.trigger <= TRIGGER_NITRO) || (my_effect.trigger >= TRIGGER_HEAT && my_effect.trigger <= TRIGGER_NITRO) )
var/turf/T = get_turf(src)
var/datum/gas_mixture/env = T.return_air()
if(env)
if(env.temperature < 225)
trigger_cold = 1
else if(env.temperature > 375)
trigger_hot = 1
if(env.gas["phoron"] >= 10)
trigger_phoron = 1
if(env.gas["oxygen"] >= 10)
trigger_oxy = 1
if(env.gas["carbon_dioxide"] >= 10)
trigger_co2 = 1
if(env.gas["nitrogen"] >= 10)
trigger_nitro = 1
//COLD ACTIVATION
if(trigger_cold)
if(my_effect.trigger == TRIGGER_COLD && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_COLD && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_COLD && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_COLD && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
//HEAT ACTIVATION
if(trigger_hot)
if(my_effect.trigger == TRIGGER_HEAT && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_HEAT && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_HEAT && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_HEAT && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
//PHORON GAS ACTIVATION
if(trigger_phoron)
if(my_effect.trigger == TRIGGER_PHORON && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_PHORON && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_PHORON && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_PHORON && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
//OXYGEN GAS ACTIVATION
if(trigger_oxy)
if(my_effect.trigger == TRIGGER_OXY && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_OXY && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_OXY && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_OXY && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
//CO2 GAS ACTIVATION
if(trigger_co2)
if(my_effect.trigger == TRIGGER_CO2 && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_CO2 && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_CO2 && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_CO2 && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
//NITROGEN GAS ACTIVATION
if(trigger_nitro)
if(my_effect.trigger == TRIGGER_NITRO && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_NITRO && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_NITRO && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_NITRO && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
/obj/machinery/artifact/attack_hand(var/mob/user as mob)
if (get_dist(user, src) > 1)
user << "\red You can't reach [src] from here."
return
if(ishuman(user) && user:gloves)
user << "<b>You touch [src]</b> with your gloved hands, [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")]."
return
src.add_fingerprint(user)
if(my_effect.trigger == TRIGGER_TOUCH)
user << "<b>You touch [src].<b>"
my_effect.ToggleActivate()
else
user << "<b>You touch [src],</b> [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")]."
if(prob(25) && secondary_effect && secondary_effect.trigger == TRIGGER_TOUCH)
secondary_effect.ToggleActivate(0)
if (my_effect.effect == EFFECT_TOUCH)
my_effect.DoEffectTouch(user)
if(secondary_effect && secondary_effect.effect == EFFECT_TOUCH && secondary_effect.activated)
secondary_effect.DoEffectTouch(user)
/obj/machinery/artifact/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
if (istype(W, /obj/item/weapon/reagent_containers/))
if(W.reagents.has_reagent("hydrogen", 1) || W.reagents.has_reagent("water", 1))
if(my_effect.trigger == TRIGGER_WATER)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_WATER && prob(25))
secondary_effect.ToggleActivate(0)
else if(W.reagents.has_reagent("acid", 1) || W.reagents.has_reagent("pacid", 1) || W.reagents.has_reagent("diethylamine", 1))
if(my_effect.trigger == TRIGGER_ACID)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_ACID && prob(25))
secondary_effect.ToggleActivate(0)
else if(W.reagents.has_reagent("phoron", 1) || W.reagents.has_reagent("thermite", 1))
if(my_effect.trigger == TRIGGER_VOLATILE)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_VOLATILE && prob(25))
secondary_effect.ToggleActivate(0)
else if(W.reagents.has_reagent("toxin", 1) || W.reagents.has_reagent("cyanide", 1) || W.reagents.has_reagent("amanitin", 1) || W.reagents.has_reagent("neurotoxin", 1))
if(my_effect.trigger == TRIGGER_TOXIN)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_TOXIN && prob(25))
secondary_effect.ToggleActivate(0)
else if(istype(W,/obj/item/weapon/melee/baton) && W:status ||\
istype(W,/obj/item/weapon/melee/energy) ||\
istype(W,/obj/item/weapon/melee/cultblade) ||\
istype(W,/obj/item/weapon/card/emag) ||\
istype(W,/obj/item/device/multitool))
if (my_effect.trigger == TRIGGER_ENERGY)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_ENERGY && prob(25))
secondary_effect.ToggleActivate(0)
else if (istype(W,/obj/item/weapon/flame) && W:lit ||\
istype(W,/obj/item/weapon/weldingtool) && W:welding)
if(my_effect.trigger == TRIGGER_HEAT)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_HEAT && prob(25))
secondary_effect.ToggleActivate(0)
else
..()
if (my_effect.trigger == TRIGGER_FORCE && W.force >= 10)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25))
secondary_effect.ToggleActivate(0)
/obj/machinery/artifact/Bumped(M as mob|obj)
..()
if(istype(M,/obj))
if(M:throwforce >= 10)
if(my_effect.trigger == TRIGGER_FORCE)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25))
secondary_effect.ToggleActivate(0)
else if(ishuman(M) && !istype(M:gloves,/obj/item/clothing/gloves))
var/warn = 0
if (my_effect.trigger == TRIGGER_TOUCH && prob(50))
my_effect.ToggleActivate()
warn = 1
if(secondary_effect && secondary_effect.trigger == TRIGGER_TOUCH && prob(25))
secondary_effect.ToggleActivate(0)
warn = 1
if (my_effect.effect == EFFECT_TOUCH && prob(50))
my_effect.DoEffectTouch(M)
warn = 1
if(secondary_effect && secondary_effect.effect == EFFECT_TOUCH && secondary_effect.activated && prob(50))
secondary_effect.DoEffectTouch(M)
warn = 1
if(warn)
M << "<b>You accidentally touch [src].<b>"
..()
/obj/machinery/artifact/bullet_act(var/obj/item/projectile/P)
if(istype(P,/obj/item/projectile/bullet) ||\
istype(P,/obj/item/projectile/hivebotbullet))
if(my_effect.trigger == TRIGGER_FORCE)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25))
secondary_effect.ToggleActivate(0)
else if(istype(P,/obj/item/projectile/beam) ||\
istype(P,/obj/item/projectile/ion) ||\
istype(P,/obj/item/projectile/energy))
if(my_effect.trigger == TRIGGER_ENERGY)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_ENERGY && prob(25))
secondary_effect.ToggleActivate(0)
/obj/machinery/artifact/ex_act(severity)
switch(severity)
if(1.0) qdel(src)
if(2.0)
if (prob(50))
qdel(src)
else
if(my_effect.trigger == TRIGGER_FORCE || my_effect.trigger == TRIGGER_HEAT)
my_effect.ToggleActivate()
if(secondary_effect && (secondary_effect.trigger == TRIGGER_FORCE || secondary_effect.trigger == TRIGGER_HEAT) && prob(25))
secondary_effect.ToggleActivate(0)
if(3.0)
if (my_effect.trigger == TRIGGER_FORCE || my_effect.trigger == TRIGGER_HEAT)
my_effect.ToggleActivate()
if(secondary_effect && (secondary_effect.trigger == TRIGGER_FORCE || secondary_effect.trigger == TRIGGER_HEAT) && prob(25))
secondary_effect.ToggleActivate(0)
return
/obj/machinery/artifact/Move()
..()
if(my_effect)
my_effect.UpdateMove()
if(secondary_effect)
secondary_effect.UpdateMove()

View File

@@ -1,80 +1,80 @@
/datum/artifact_effect/forcefield
effecttype = "forcefield"
var/list/created_field = list()
effect_type = 4
/datum/artifact_effect/forcefield/New()
..()
trigger = TRIGGER_TOUCH
/datum/artifact_effect/forcefield/ToggleActivate()
..()
if(created_field.len)
for(var/obj/effect/energy_field/F in created_field)
created_field.Remove(F)
del F
else if(holder)
var/turf/T = get_turf(holder)
while(created_field.len < 16)
var/obj/effect/energy_field/E = new (locate(T.x,T.y,T.z))
created_field.Add(E)
E.strength = 1
E.density = 1
E.anchored = 1
E.invisibility = 0
spawn(10)
UpdateMove()
return 1
/datum/artifact_effect/forcefield/process()
..()
for(var/obj/effect/energy_field/E in created_field)
if(E.strength < 1)
E.Strengthen(0.15)
else if(E.strength < 5)
E.Strengthen(0.25)
/datum/artifact_effect/forcefield/UpdateMove()
if(created_field.len && holder)
var/turf/T = get_turf(holder)
while(created_field.len < 16)
//for now, just instantly respawn the fields when they get destroyed
var/obj/effect/energy_field/E = new (locate(T.x,T.y,T))
created_field.Add(E)
E.anchored = 1
E.density = 1
E.invisibility = 0
var/obj/effect/energy_field/E = created_field[1]
E.loc = locate(T.x + 2,T.y + 2,T.z)
E = created_field[2]
E.loc = locate(T.x + 2,T.y + 1,T.z)
E = created_field[3]
E.loc = locate(T.x + 2,T.y,T.z)
E = created_field[4]
E.loc = locate(T.x + 2,T.y - 1,T.z)
E = created_field[5]
E.loc = locate(T.x + 2,T.y - 2,T.z)
E = created_field[6]
E.loc = locate(T.x + 1,T.y + 2,T.z)
E = created_field[7]
E.loc = locate(T.x + 1,T.y - 2,T.z)
E = created_field[8]
E.loc = locate(T.x,T.y + 2,T.z)
E = created_field[9]
E.loc = locate(T.x,T.y - 2,T.z)
E = created_field[10]
E.loc = locate(T.x - 1,T.y + 2,T.z)
E = created_field[11]
E.loc = locate(T.x - 1,T.y - 2,T.z)
E = created_field[12]
E.loc = locate(T.x - 2,T.y + 2,T.z)
E = created_field[13]
E.loc = locate(T.x - 2,T.y + 1,T.z)
E = created_field[14]
E.loc = locate(T.x - 2,T.y,T.z)
E = created_field[15]
E.loc = locate(T.x - 2,T.y - 1,T.z)
E = created_field[16]
E.loc = locate(T.x - 2,T.y - 2,T.z)
/datum/artifact_effect/forcefield
effecttype = "forcefield"
var/list/created_field = list()
effect_type = 4
/datum/artifact_effect/forcefield/New()
..()
trigger = TRIGGER_TOUCH
/datum/artifact_effect/forcefield/ToggleActivate()
..()
if(created_field.len)
for(var/obj/effect/energy_field/F in created_field)
created_field.Remove(F)
qdel(F)
else if(holder)
var/turf/T = get_turf(holder)
while(created_field.len < 16)
var/obj/effect/energy_field/E = new (locate(T.x,T.y,T.z))
created_field.Add(E)
E.strength = 1
E.density = 1
E.anchored = 1
E.invisibility = 0
spawn(10)
UpdateMove()
return 1
/datum/artifact_effect/forcefield/process()
..()
for(var/obj/effect/energy_field/E in created_field)
if(E.strength < 1)
E.Strengthen(0.15)
else if(E.strength < 5)
E.Strengthen(0.25)
/datum/artifact_effect/forcefield/UpdateMove()
if(created_field.len && holder)
var/turf/T = get_turf(holder)
while(created_field.len < 16)
//for now, just instantly respawn the fields when they get destroyed
var/obj/effect/energy_field/E = new (locate(T.x,T.y,T))
created_field.Add(E)
E.anchored = 1
E.density = 1
E.invisibility = 0
var/obj/effect/energy_field/E = created_field[1]
E.loc = locate(T.x + 2,T.y + 2,T.z)
E = created_field[2]
E.loc = locate(T.x + 2,T.y + 1,T.z)
E = created_field[3]
E.loc = locate(T.x + 2,T.y,T.z)
E = created_field[4]
E.loc = locate(T.x + 2,T.y - 1,T.z)
E = created_field[5]
E.loc = locate(T.x + 2,T.y - 2,T.z)
E = created_field[6]
E.loc = locate(T.x + 1,T.y + 2,T.z)
E = created_field[7]
E.loc = locate(T.x + 1,T.y - 2,T.z)
E = created_field[8]
E.loc = locate(T.x,T.y + 2,T.z)
E = created_field[9]
E.loc = locate(T.x,T.y - 2,T.z)
E = created_field[10]
E.loc = locate(T.x - 1,T.y + 2,T.z)
E = created_field[11]
E.loc = locate(T.x - 1,T.y - 2,T.z)
E = created_field[12]
E.loc = locate(T.x - 2,T.y + 2,T.z)
E = created_field[13]
E.loc = locate(T.x - 2,T.y + 1,T.z)
E = created_field[14]
E.loc = locate(T.x - 2,T.y,T.z)
E = created_field[15]
E.loc = locate(T.x - 2,T.y - 1,T.z)
E = created_field[16]
E.loc = locate(T.x - 2,T.y - 2,T.z)

View File

@@ -57,7 +57,7 @@
else
for(var/mob/M in viewers(world.view, user))
M.show_message("<span class='info'>[src] burns away into nothing.</span>",1)
del(src)
qdel(src)
w.remove_fuel(4)
else
for(var/mob/M in viewers(world.view, user))
@@ -73,7 +73,7 @@
..()
if(prob(33))
src.visible_message("<span class='warning'>[src] crumbles away, leaving some dust and gravel behind.</span>")
del(src)
qdel(src)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Archaeological finds
@@ -301,7 +301,7 @@
//arcane clothing
apply_prefix = 0
var/list/possible_spawns = list(/obj/item/clothing/head/culthood,
/obj/item/clothing/head/magus,
/obj/item/clothing/head/culthood/magus,
/obj/item/clothing/head/culthood/alt,
/obj/item/clothing/head/helmet/space/cult)
@@ -548,7 +548,7 @@
if(talkative)
new_item.talking_atom = new(new_item)
del(src)
qdel(src)
else if(talkative)
src.talking_atom = new(src)

View File

@@ -17,7 +17,7 @@
var/turf/T = get_turf(src)
if(istype(T, /turf/simulated/mineral))
T:last_find = W
del src
qdel(src)
/obj/item/weapon/fossil/bone
name = "Fossilised bone"
@@ -40,8 +40,8 @@
var/b = new src.type
o.contents.Add(a)
o.contents.Add(b)
del W
del src
qdel(W)
qdel(src)
/obj/skeleton
name = "Incomplete skeleton"
@@ -62,7 +62,7 @@
if(!bstate)
bnum++
src.contents.Add(new/obj/item/weapon/fossil/bone)
del W
qdel(W)
if(bnum==breq)
usr = user
icon_state = "skel"

View File

@@ -1,74 +1,74 @@
/obj/item/weapon/shard/phoron
name = "phoron shard"
desc = "A shard of phoron glass. Considerably tougher then normal glass shards. Apparently not tough enough to be a window."
force = 8.0
throwforce = 15.0
icon_state = "phoronlarge"
sharp = 1
edge = 1
/obj/item/weapon/shard/phoron/New()
src.icon_state = pick("phoronlarge", "phoronmedium", "phoronsmall")
switch(src.icon_state)
if("phoronsmall")
src.pixel_x = rand(-12, 12)
src.pixel_y = rand(-12, 12)
if("phoronmedium")
src.pixel_x = rand(-8, 8)
src.pixel_y = rand(-8, 8)
if("phoronlarge")
src.pixel_x = rand(-5, 5)
src.pixel_y = rand(-5, 5)
else
return
/obj/item/weapon/shard/phoron/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if ( istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
var/obj/item/stack/sheet/glass/phoronglass/NG = new (user.loc)
for (var/obj/item/stack/sheet/glass/phoronglass/G in user.loc)
if(G==NG)
continue
if(G.amount>=G.max_amount)
continue
G.attackby(NG, user)
usr << "You add the newly-formed phoron glass to the stack. It now contains [NG.amount] sheets."
//SN src = null
del(src)
return
return ..()
//legacy crystal
/obj/machinery/crystal
name = "Crystal"
icon = 'icons/obj/mining.dmi'
icon_state = "crystal"
/obj/machinery/crystal/New()
if(prob(50))
icon_state = "crystal2"
//large finds
/*
/obj/machinery/syndicate_beacon
/obj/machinery/wish_granter
if(18)
item_type = "jagged green crystal"
additional_desc = pick("It shines faintly as it catches the light.","It appears to have a faint inner glow.","It seems to draw you inward as you look it at.","Something twinkles faintly as you look at it.","It's mesmerizing to behold.")
icon_state = "crystal"
apply_material_decorations = 0
if(prob(10))
apply_image_decorations = 1
if(19)
item_type = "jagged pink crystal"
additional_desc = pick("It shines faintly as it catches the light.","It appears to have a faint inner glow.","It seems to draw you inward as you look it at.","Something twinkles faintly as you look at it.","It's mesmerizing to behold.")
icon_state = "crystal2"
apply_material_decorations = 0
if(prob(10))
apply_image_decorations = 1
*/
//machinery type artifacts?
/obj/item/weapon/shard/phoron
name = "phoron shard"
desc = "A shard of phoron glass. Considerably tougher then normal glass shards. Apparently not tough enough to be a window."
force = 8.0
throwforce = 15.0
icon_state = "phoronlarge"
sharp = 1
edge = 1
/obj/item/weapon/shard/phoron/New()
src.icon_state = pick("phoronlarge", "phoronmedium", "phoronsmall")
switch(src.icon_state)
if("phoronsmall")
src.pixel_x = rand(-12, 12)
src.pixel_y = rand(-12, 12)
if("phoronmedium")
src.pixel_x = rand(-8, 8)
src.pixel_y = rand(-8, 8)
if("phoronlarge")
src.pixel_x = rand(-5, 5)
src.pixel_y = rand(-5, 5)
else
return
/obj/item/weapon/shard/phoron/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if ( istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
var/obj/item/stack/sheet/glass/phoronglass/NG = new (user.loc)
for (var/obj/item/stack/sheet/glass/phoronglass/G in user.loc)
if(G==NG)
continue
if(G.amount>=G.max_amount)
continue
G.attackby(NG, user)
usr << "You add the newly-formed phoron glass to the stack. It now contains [NG.amount] sheets."
//SN src = null
qdel(src)
return
return ..()
//legacy crystal
/obj/machinery/crystal
name = "Crystal"
icon = 'icons/obj/mining.dmi'
icon_state = "crystal"
/obj/machinery/crystal/New()
if(prob(50))
icon_state = "crystal2"
//large finds
/*
/obj/machinery/syndicate_beacon
/obj/machinery/wish_granter
if(18)
item_type = "jagged green crystal"
additional_desc = pick("It shines faintly as it catches the light.","It appears to have a faint inner glow.","It seems to draw you inward as you look it at.","Something twinkles faintly as you look at it.","It's mesmerizing to behold.")
icon_state = "crystal"
apply_material_decorations = 0
if(prob(10))
apply_image_decorations = 1
if(19)
item_type = "jagged pink crystal"
additional_desc = pick("It shines faintly as it catches the light.","It appears to have a faint inner glow.","It seems to draw you inward as you look it at.","Something twinkles faintly as you look at it.","It's mesmerizing to behold.")
icon_state = "crystal2"
apply_material_decorations = 0
if(prob(10))
apply_image_decorations = 1
*/
//machinery type artifacts?

View File

@@ -60,7 +60,7 @@ datum/genesequence
visible_message("\red \icon[src] [src] can not extract any more genetic data from new fossils.")
if(4)
src.visible_message("\blue \icon[src] [user] inserts [W] into [src], the fossil is consumed as [src] extracts genetic data from it.")
del(W)
qdel(W)
updateDialog()
else if (istype(W, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = W
@@ -77,7 +77,7 @@ datum/genesequence
if(SCANFOSSIL_RETVAL_SUCCESS)
numaccepted += 1
S.remove_from_storage(F, src) //This will move the item to this item's contents
del(F)
qdel(F)
updateDialog()
user.visible_message("[user] empties all the fossils from [S] into [src].", "\blue You empty all the fossils from [S] into [src].", "You hear the sound of rocks being poured into a container")

View File

@@ -156,7 +156,7 @@
//see if we can clear out an old effect
//delete it when the ids match to account for duplicate ids having different effects
if(inserted_battery.battery_effect && inserted_battery.stored_charge <= 0)
del(inserted_battery.battery_effect)
qdel(inserted_battery.battery_effect)
//
var/datum/artifact_effect/source_effect

View File

@@ -39,4 +39,4 @@
sleep(10)
if(src)
del(src)
qdel(src)

View File

@@ -1,145 +1,145 @@
/datum/controller/game_controller
var/list/all_animal_genesequences = list()
var/list/all_plant_genesequences = list()
var/list/genome_prefixes = null
var/list/artifact_spawning_turfs = list()
var/list/digsite_spawning_turfs = list()
var/list/spawn_types_animal = list("/mob/living/carbon/slime",\
"/mob/living/simple_animal/hostile/alien",\
"/mob/living/simple_animal/hostile/alien/drone",\
"/mob/living/simple_animal/hostile/alien/sentinel",\
"/mob/living/simple_animal/hostile/giant_spider",\
"/mob/living/simple_animal/hostile/giant_spider/hunter",\
"/mob/living/simple_animal/hostile/giant_spider/nurse",\
"/mob/living/simple_animal/hostile/creature",\
"/mob/living/simple_animal/hostile/samak",\
"/mob/living/simple_animal/hostile/diyaab",\
"/mob/living/simple_animal/hostile/shantak",\
"/mob/living/simple_animal/tindalos",\
"/mob/living/simple_animal/yithian")
var/list/spawn_types_plant = list("/obj/item/seeds/walkingmushroommycelium",\
"/obj/item/seeds/killertomatoseed",\
"/obj/item/seeds/shandseed",
"/obj/item/seeds/mtearseed",
"/obj/item/seeds/thaadra",\
"/obj/item/seeds/telriis",\
"/obj/item/seeds/jurlmah",\
"/obj/item/seeds/amauri",\
"/obj/item/seeds/gelthi",\
"/obj/item/seeds/vale",\
"/obj/item/seeds/surik")
#define XENOARCH_SPAWN_CHANCE 0.5
#define DIGSITESIZE_LOWER 4
#define DIGSITESIZE_UPPER 12
#define ARTIFACTSPAWNNUM_LOWER 6
#define ARTIFACTSPAWNNUM_UPPER 12
datum/controller/game_controller/proc/SetupXenoarch()
//create digsites
for(var/turf/simulated/mineral/M in block(locate(1,1,1), locate(world.maxx, world.maxy, world.maxz)))
if(isnull(M.geologic_data))
M.geologic_data = new/datum/geosample(M)
if(!prob(XENOARCH_SPAWN_CHANCE))
continue
digsite_spawning_turfs.Add(M)
var/digsite = get_random_digsite_type()
var/target_digsite_size = rand(DIGSITESIZE_LOWER, DIGSITESIZE_UPPER)
var/list/processed_turfs = list()
var/list/turfs_to_process = list(M)
while(turfs_to_process.len)
var/turf/simulated/mineral/archeo_turf = pop(turfs_to_process)
if(target_digsite_size > 1)
var/list/viable_adjacent_turfs = orange(1, archeo_turf)
for(var/turf/simulated/mineral/T in orange(1, archeo_turf))
if(T.finds)
continue
if(T in processed_turfs)
continue
viable_adjacent_turfs.Add(T)
for(var/turf/simulated/mineral/T in viable_adjacent_turfs)
if(prob(target_digsite_size/viable_adjacent_turfs.len))
turfs_to_process.Add(T)
target_digsite_size -= 1
if(target_digsite_size <= 0)
break
processed_turfs.Add(archeo_turf)
if(isnull(archeo_turf.finds))
archeo_turf.finds = list()
if(prob(50))
archeo_turf.finds.Add(new /datum/find(digsite, rand(5,95)))
else if(prob(75))
archeo_turf.finds.Add(new /datum/find(digsite, rand(5,45)))
archeo_turf.finds.Add(new /datum/find(digsite, rand(55,95)))
else
archeo_turf.finds.Add(new /datum/find(digsite, rand(5,30)))
archeo_turf.finds.Add(new /datum/find(digsite, rand(35,75)))
archeo_turf.finds.Add(new /datum/find(digsite, rand(75,95)))
//sometimes a find will be close enough to the surface to show
var/datum/find/F = archeo_turf.finds[1]
if(F.excavation_required <= F.view_range)
archeo_turf.archaeo_overlay = "overlay_archaeo[rand(1,3)]"
archeo_turf.overlays += archeo_turf.archaeo_overlay
//have a chance for an artifact to spawn here, but not in animal or plant digsites
if(isnull(M.artifact_find) && digsite != 1 && digsite != 2)
artifact_spawning_turfs.Add(archeo_turf)
//create artifact machinery
var/num_artifacts_spawn = rand(ARTIFACTSPAWNNUM_LOWER, ARTIFACTSPAWNNUM_UPPER)
while(artifact_spawning_turfs.len > num_artifacts_spawn)
pick_n_take(artifact_spawning_turfs)
var/list/artifacts_spawnturf_temp = artifact_spawning_turfs.Copy()
while(artifacts_spawnturf_temp.len > 0)
var/turf/simulated/mineral/artifact_turf = pop(artifacts_spawnturf_temp)
artifact_turf.artifact_find = new()
//make sure we have some prefixes for the gene sequences
if(!genome_prefixes)
genome_prefixes = alphabet_uppercase.Copy()
if(!genome_prefixes.len)
del genome_prefixes
genome_prefixes = alphabet_uppercase.Copy()
//create animal gene sequences
while(spawn_types_animal.len && genome_prefixes.len)
var/datum/genesequence/new_sequence = new/datum/genesequence()
new_sequence.spawned_type_text = pick(spawn_types_animal)
new_sequence.spawned_type = text2path(new_sequence.spawned_type_text)
spawn_types_animal -= new_sequence.spawned_type_text
var/prefixletter = pick(genome_prefixes)
genome_prefixes -= prefixletter
while(new_sequence.full_genome_sequence.len < 7)
new_sequence.full_genome_sequence.Add("[prefixletter][pick(alphabet_uppercase)][pick(alphabet_uppercase)][pick(1,2,3,4,5,6,7,8,9,0)][pick(1,2,3,4,5,6,7,8,9,0)]")
all_animal_genesequences.Add(new_sequence)
//create plant gene sequences
while(spawn_types_plant.len && genome_prefixes.len)
var/datum/genesequence/new_sequence = new/datum/genesequence()
new_sequence.spawned_type = pick(spawn_types_plant)
spawn_types_plant -= new_sequence.spawned_type_text
var/prefixletter = pick(genome_prefixes)
genome_prefixes -= prefixletter
while(new_sequence.full_genome_sequence.len < 7)
new_sequence.full_genome_sequence.Add("[prefixletter][pick(1,2,3,4,5,6,7,8,9,0)][pick(1,2,3,4,5,6,7,8,9,0)][pick(alphabet_uppercase)][pick(alphabet_uppercase)]")
all_plant_genesequences.Add(new_sequence)
#undef XENOARCH_SPAWN_CHANCE
#undef DIGSITESIZE_LOWER
#undef DIGSITESIZE_UPPER
#undef ARTIFACTSPAWNNUM_LOWER
#undef ARTIFACTSPAWNNUM_UPPER
/datum/controller/game_controller
var/list/all_animal_genesequences = list()
var/list/all_plant_genesequences = list()
var/list/genome_prefixes = null
var/list/artifact_spawning_turfs = list()
var/list/digsite_spawning_turfs = list()
var/list/spawn_types_animal = list("/mob/living/carbon/slime",\
"/mob/living/simple_animal/hostile/alien",\
"/mob/living/simple_animal/hostile/alien/drone",\
"/mob/living/simple_animal/hostile/alien/sentinel",\
"/mob/living/simple_animal/hostile/giant_spider",\
"/mob/living/simple_animal/hostile/giant_spider/hunter",\
"/mob/living/simple_animal/hostile/giant_spider/nurse",\
"/mob/living/simple_animal/hostile/creature",\
"/mob/living/simple_animal/hostile/samak",\
"/mob/living/simple_animal/hostile/diyaab",\
"/mob/living/simple_animal/hostile/shantak",\
"/mob/living/simple_animal/tindalos",\
"/mob/living/simple_animal/yithian")
var/list/spawn_types_plant = list("/obj/item/seeds/walkingmushroommycelium",\
"/obj/item/seeds/killertomatoseed",\
"/obj/item/seeds/shandseed",
"/obj/item/seeds/mtearseed",
"/obj/item/seeds/thaadra",\
"/obj/item/seeds/telriis",\
"/obj/item/seeds/jurlmah",\
"/obj/item/seeds/amauri",\
"/obj/item/seeds/gelthi",\
"/obj/item/seeds/vale",\
"/obj/item/seeds/surik")
#define XENOARCH_SPAWN_CHANCE 0.5
#define DIGSITESIZE_LOWER 4
#define DIGSITESIZE_UPPER 12
#define ARTIFACTSPAWNNUM_LOWER 6
#define ARTIFACTSPAWNNUM_UPPER 12
datum/controller/game_controller/proc/SetupXenoarch()
//create digsites
for(var/turf/simulated/mineral/M in block(locate(1,1,1), locate(world.maxx, world.maxy, world.maxz)))
if(isnull(M.geologic_data))
M.geologic_data = new/datum/geosample(M)
if(!prob(XENOARCH_SPAWN_CHANCE))
continue
digsite_spawning_turfs.Add(M)
var/digsite = get_random_digsite_type()
var/target_digsite_size = rand(DIGSITESIZE_LOWER, DIGSITESIZE_UPPER)
var/list/processed_turfs = list()
var/list/turfs_to_process = list(M)
while(turfs_to_process.len)
var/turf/simulated/mineral/archeo_turf = pop(turfs_to_process)
if(target_digsite_size > 1)
var/list/viable_adjacent_turfs = orange(1, archeo_turf)
for(var/turf/simulated/mineral/T in orange(1, archeo_turf))
if(T.finds)
continue
if(T in processed_turfs)
continue
viable_adjacent_turfs.Add(T)
for(var/turf/simulated/mineral/T in viable_adjacent_turfs)
if(prob(target_digsite_size/viable_adjacent_turfs.len))
turfs_to_process.Add(T)
target_digsite_size -= 1
if(target_digsite_size <= 0)
break
processed_turfs.Add(archeo_turf)
if(isnull(archeo_turf.finds))
archeo_turf.finds = list()
if(prob(50))
archeo_turf.finds.Add(new /datum/find(digsite, rand(5,95)))
else if(prob(75))
archeo_turf.finds.Add(new /datum/find(digsite, rand(5,45)))
archeo_turf.finds.Add(new /datum/find(digsite, rand(55,95)))
else
archeo_turf.finds.Add(new /datum/find(digsite, rand(5,30)))
archeo_turf.finds.Add(new /datum/find(digsite, rand(35,75)))
archeo_turf.finds.Add(new /datum/find(digsite, rand(75,95)))
//sometimes a find will be close enough to the surface to show
var/datum/find/F = archeo_turf.finds[1]
if(F.excavation_required <= F.view_range)
archeo_turf.archaeo_overlay = "overlay_archaeo[rand(1,3)]"
archeo_turf.overlays += archeo_turf.archaeo_overlay
//have a chance for an artifact to spawn here, but not in animal or plant digsites
if(isnull(M.artifact_find) && digsite != 1 && digsite != 2)
artifact_spawning_turfs.Add(archeo_turf)
//create artifact machinery
var/num_artifacts_spawn = rand(ARTIFACTSPAWNNUM_LOWER, ARTIFACTSPAWNNUM_UPPER)
while(artifact_spawning_turfs.len > num_artifacts_spawn)
pick_n_take(artifact_spawning_turfs)
var/list/artifacts_spawnturf_temp = artifact_spawning_turfs.Copy()
while(artifacts_spawnturf_temp.len > 0)
var/turf/simulated/mineral/artifact_turf = pop(artifacts_spawnturf_temp)
artifact_turf.artifact_find = new()
//make sure we have some prefixes for the gene sequences
if(!genome_prefixes)
genome_prefixes = alphabet_uppercase.Copy()
if(!genome_prefixes.len)
qdel(genome_prefixes)
genome_prefixes = alphabet_uppercase.Copy()
//create animal gene sequences
while(spawn_types_animal.len && genome_prefixes.len)
var/datum/genesequence/new_sequence = new/datum/genesequence()
new_sequence.spawned_type_text = pick(spawn_types_animal)
new_sequence.spawned_type = text2path(new_sequence.spawned_type_text)
spawn_types_animal -= new_sequence.spawned_type_text
var/prefixletter = pick(genome_prefixes)
genome_prefixes -= prefixletter
while(new_sequence.full_genome_sequence.len < 7)
new_sequence.full_genome_sequence.Add("[prefixletter][pick(alphabet_uppercase)][pick(alphabet_uppercase)][pick(1,2,3,4,5,6,7,8,9,0)][pick(1,2,3,4,5,6,7,8,9,0)]")
all_animal_genesequences.Add(new_sequence)
//create plant gene sequences
while(spawn_types_plant.len && genome_prefixes.len)
var/datum/genesequence/new_sequence = new/datum/genesequence()
new_sequence.spawned_type = pick(spawn_types_plant)
spawn_types_plant -= new_sequence.spawned_type_text
var/prefixletter = pick(genome_prefixes)
genome_prefixes -= prefixletter
while(new_sequence.full_genome_sequence.len < 7)
new_sequence.full_genome_sequence.Add("[prefixletter][pick(1,2,3,4,5,6,7,8,9,0)][pick(1,2,3,4,5,6,7,8,9,0)][pick(alphabet_uppercase)][pick(alphabet_uppercase)]")
all_plant_genesequences.Add(new_sequence)
#undef XENOARCH_SPAWN_CHANCE
#undef DIGSITESIZE_LOWER
#undef DIGSITESIZE_UPPER
#undef ARTIFACTSPAWNNUM_LOWER
#undef ARTIFACTSPAWNNUM_UPPER

View File

@@ -190,7 +190,7 @@
p = min(p, 100)
icon_state = "anodev[round(p,25)]"
/obj/item/weapon/anodevice/Del()
/obj/item/weapon/anodevice/Destroy()
processing_objects.Remove(src)
..()

View File

@@ -14,9 +14,8 @@
if(held_container)
user << "\red You must remove the [held_container] first."
else
user.drop_item(src)
held_container = W
held_container.loc = src
user.drop_from_inventory(held_container, src)
user << "\blue You put the [held_container] onto the [src]."
var/image/I = image("icon"=W, "layer"=FLOAT_LAYER)
underlays += I

View File

@@ -306,10 +306,10 @@
M.weakened = min(M.weakened, 3)
src.visible_message("\blue \icon[src] [src] deactivates with a gentle shudder.")
del(suspension_field)
qdel(suspension_field)
icon_state = "suspension2"
/obj/machinery/suspension_gen/Del()
/obj/machinery/suspension_gen/Destroy()
//safety checks: clear the field and drop anything it's holding
deactivate()
..()
@@ -341,7 +341,7 @@
density = 1
var/field_type = "chlorine"
/obj/effect/suspension_field/Del()
/obj/effect/suspension_field/Destroy()
for(var/obj/I in src)
I.loc = src.loc
..()

View File

@@ -32,7 +32,7 @@
/obj/item/device/core_sampler/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/evidencebag))
if(num_stored_bags < 10)
del(W)
qdel(W)
num_stored_bags += 1
user << "\blue You insert the [W] into the core sampler."
else

View File

@@ -118,11 +118,11 @@
if(index <= positive_locations.len)
var/datum/depth_scan/D = positive_locations[index]
positive_locations.Remove(D)
del(D)
qdel(D)
else
//GC will hopefully pick them up before too long
positive_locations = list()
del(current)
qdel(current)
else if(href_list["close"])
usr.unset_machine()
usr << browse(null, "window=depth_scanner")

View File

@@ -16,7 +16,7 @@
..()
processing_objects.Add(src)
/obj/item/device/beacon_locator/Del()
/obj/item/device/beacon_locator/Destroy()
processing_objects.Remove(src)
..()