Merge pull request #14418 from LetterN/perlin-genny

Updates openspace & enables perlin generation on alvaland & icebox/snaxi
This commit is contained in:
silicons
2021-04-06 04:10:00 -06:00
committed by GitHub
164 changed files with 303046 additions and 302956 deletions
+7 -4
View File
@@ -308,10 +308,10 @@
var/list/areas_with_LS = list()
var/list/areas_with_intercom = list()
var/list/areas_with_camera = list()
var/list/station_areas_blacklist = typecacheof(list(/area/holodeck/rec_center, /area/shuttle, /area/engine/supermatter, /area/science/test_area, /area/space, /area/solar, /area/mine, /area/ruin, /area/asteroid))
var/list/station_areas_blacklist = typecacheof(list(/area/holodeck/rec_center, /area/shuttle, /area/engineering/supermatter, /area/science/test_area, /area/space, /area/solars, /area/mine, /area/ruin, /area/asteroid))
if(SSticker.current_state == GAME_STATE_STARTUP)
to_chat(usr, "Game still loading, please hold!")
to_chat(usr, "Game still loading, please hold!", confidential = TRUE)
return
var/log_message
@@ -326,8 +326,11 @@
for(var/area/A in world)
if(on_station)
var/turf/picked = safepick(get_area_turfs(A.type))
if(picked && is_station_level(picked.z))
var/list/area_turfs = get_area_turfs(A.type)
if (!length(area_turfs))
continue
var/turf/picked = pick(area_turfs)
if(is_station_level(picked.z))
if(!(A.type in areas_all) && !is_type_in_typecache(A, station_areas_blacklist))
areas_all.Add(A.type)
else if(!(A.type in areas_all))
+1 -1
View File
@@ -349,7 +349,7 @@
return
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Egalitarian Station"))
for(var/obj/machinery/door/airlock/W in GLOB.machines)
if(is_station_level(W.z) && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
if(is_station_level(W.z) && !istype(get_area(W), /area/command) && !istype(get_area(W), /area/commons) && !istype(get_area(W), /area/service) && !istype(get_area(W), /area/command/heads_quarters) && !istype(get_area(W), /area/security/prison))
W.req_access = list()
message_admins("[key_name_admin(holder)] activated Egalitarian Station mode")
priority_announce("CentCom airlock control override activated. Please take this time to get acquainted with your coworkers.", null, "commandreport")
@@ -88,7 +88,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
/mob/camera/blob/proc/is_valid_turf(turf/T)
var/area/A = get_area(T)
if((A && !A.blob_allowed) || !T || !is_station_level(T.z) || isspaceturf(T))
if((A && !(A.area_flags & BLOBS_ALLOWED)) || !T || !is_station_level(T.z) || isspaceturf(T))
return FALSE
return TRUE
@@ -131,7 +131,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
var/area/Ablob = get_area(T)
if(!Ablob.blob_allowed)
if(!(Ablob.area_flags & BLOBS_ALLOWED))
continue
if(!(ROLE_BLOB in L.faction))
@@ -144,7 +144,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
for(var/area/A in GLOB.sortedAreas)
if(!(A.type in GLOB.the_station_areas))
continue
if(!A.blob_allowed)
if(!(A.area_flags & BLOBS_ALLOWED))
continue
A.color = blobstrain.color
A.name = "blob"
+1 -1
View File
@@ -211,7 +211,7 @@
to_chat(src, "<span class='userdanger'>You have no core and are about to die! May you rest in peace.</span>")
return
var/area/A = get_area(T)
if(isspaceturf(T) || A && !A.blob_allowed)
if(isspaceturf(T) || A && !(A.area_flags & BLOBS_ALLOWED))
to_chat(src, "<span class='warning'>You cannot relocate your core here!</span>")
return
if(!can_buy(80))
@@ -25,7 +25,7 @@
if(owner_overmind)
overmind = owner_overmind
var/area/Ablob = get_area(src)
if(Ablob.blob_allowed) //Is this area allowed for winning as blob?
if(Ablob.area_flags & BLOBS_ALLOWED) //Is this area allowed for winning as blob?
overmind.blobs_legit += src
GLOB.blobs += src //Keep track of the blob in the normal list either way
setDir(pick(GLOB.cardinals))
@@ -37,7 +37,7 @@
lastWarning = world.time
to_chat(src, "<span class='warning'>This turf is consecrated and can't be crossed!</span>")
return
if(istype(get_area(T), /area/chapel))
if(istype(get_area(T), /area/service/chapel))
if((world.time - lastWarning) >= 30)
lastWarning = world.time
to_chat(src, "<span class='warning'>The Chapel is hallowed ground under a heretical deity, and can't be accessed!</span>")
@@ -24,7 +24,8 @@
/datum/clockwork_scripture/create_object/stargazer/check_special_requirements()
var/area/A = get_area(invoker)
if(A.outdoors || A.map_name == "Space" || !A.blob_allowed)
var/turf/T = get_turf(invoker)
if(!is_station_level(invoker.z) || isspaceturf(T) || !(A.area_flags & VALID_TERRITORY))
to_chat(invoker, "<span class='danger'>Stargazers can't be built off-station.</span>")
return
return ..()
@@ -34,7 +34,7 @@
return FALSE
var/area/A = get_area(invoker)
var/turf/T = get_turf(invoker)
if(!T || !is_station_level(T.z) || istype(A, /area/shuttle) || !A.blob_allowed)
if(!is_station_level(T.z) || isspaceturf(T) || !(A.area_flags & VALID_TERRITORY) || isshuttleturf(T))
to_chat(invoker, "<span class='warning'>You must be on the station to activate the Ark!</span>")
return FALSE
if(GLOB.clockwork_gateway_activated)
@@ -52,7 +52,7 @@
break
if(has_starlight && anchored)
var/area/A = get_area(src)
if(A.outdoors || A.map_name == "Space" || !A.blob_allowed)
if(A.outdoors || A.map_name == "Space" || !(A.area_flags & VALID_TERRITORY))
has_starlight = FALSE
if(old_status != has_starlight)
if(has_starlight)
+1 -1
View File
@@ -419,7 +419,7 @@
var/sanity = 0
while(summon_spots.len < SUMMON_POSSIBILITIES && sanity < 100)
var/area/summon = pick(GLOB.sortedAreas - summon_spots)
if(summon && is_station_level(summon.z) && summon.valid_territory)
if(summon && is_station_level(summon.z) && !(summon.area_flags & VALID_TERRITORY))
summon_spots += summon
sanity++
update_explanation_text()
+1 -1
View File
@@ -148,7 +148,7 @@ This file contains the cult dagger and rune list code
to_chat(user, "<span class='cult'>There is already a rune here.</span>")
return FALSE
var/area/A = get_area(T)
if((!is_station_level(T.z) && !is_mining_level(T.z)) || (A && !A.blob_allowed))
if((!is_station_level(T.z) && !is_mining_level(T.z)) || !(A?.area_flags & VALID_TERRITORY))
to_chat(user, "<span class='warning'>The veil is not weak enough here.</span>")
return FALSE
return TRUE
+47 -31
View File
@@ -261,19 +261,26 @@
S.DisIntegrate(src)
return TRUE
/obj/machinery/door/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
var/isonshuttle = istype(get_area(src), /area/shuttle)
for(var/turf/T in range(1, src))
var/area/A = get_area(T)
if(isspaceturf(T) || (!isonshuttle && (istype(A, /area/shuttle) || istype(A, /area/space))) || (isonshuttle && !istype(A, /area/shuttle)))
to_chat(S, "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>")
S.target = null
/obj/machinery/door/swarmer_act(mob/living/simple_animal/hostile/swarmer/actor)
var/is_on_shuttle = istype(get_area(src), /area/shuttle)
for(var/turf/turf_in_range in range(1, src))
var/area/turf_area = get_area(turf_in_range)
//Check for dangerous pressure differences
// if (turf_in_range.return_turf_delta_p() > DANGEROUS_DELTA_P)
// to_chat(actor, "<span class='warning'>Destroying this object has the potential to cause an explosive pressure release. Aborting.</span>")
// actor.target = null
// return TRUE
//Check if breaking this door will expose the station to space/planetary atmos
if(isspaceturf(turf_in_range) || (!is_on_shuttle && (istype(turf_area, /area/shuttle) || istype(turf_area, /area/space))) || (is_on_shuttle && !istype(turf_area, /area/shuttle)))
to_chat(actor, "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>")
actor.target = null
return FALSE
else if(istype(A, /area/engine/supermatter))
to_chat(S, "<span class='warning'>Disrupting the containment of a supermatter crystal would not be to our benefit. Aborting.</span>")
S.target = null
//Check if this door is important in supermatter containment
else if(istype(turf_area, /area/engineering/supermatter))
to_chat(actor, "<span class='warning'>Disrupting the containment of a supermatter crystal would not be to our benefit. Aborting.</span>")
actor.target = null
return FALSE
S.DisIntegrate(src)
actor.DisIntegrate(src)
return TRUE
/obj/machinery/camera/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
@@ -342,31 +349,40 @@
to_chat(S, "<span class='warning'>This bluespace source will be important to us later. Aborting.</span>")
return FALSE
/turf/closed/wall/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
var/isonshuttle = istype(loc, /area/shuttle)
for(var/turf/T in range(1, src))
var/area/A = get_area(T)
if(isspaceturf(T) || (!isonshuttle && (istype(A, /area/shuttle) || istype(A, /area/space))) || (isonshuttle && !istype(A, /area/shuttle)))
to_chat(S, "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>")
S.target = null
/turf/closed/wall/swarmer_act(mob/living/simple_animal/hostile/swarmer/actor)
var/is_on_shuttle = istype(loc, /area/shuttle)
for(var/turf/turf_in_range in range(1, src))
var/area/turf_area = get_area(turf_in_range)
// if (turf_in_range.return_turf_delta_p() > DANGEROUS_DELTA_P)
// to_chat(actor, "<span class='warning'>Destroying this object has the potential to cause an explosive pressure release. Aborting.</span>")
// actor.target = null
// return TRUE
if(isspaceturf(turf_in_range) || (!is_on_shuttle && (istype(turf_area, /area/shuttle) || istype(turf_area, /area/space))) || (is_on_shuttle && !istype(turf_area, /area/shuttle)))
to_chat(actor, "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>")
actor.target = null
return TRUE
else if(istype(A, /area/engine/supermatter))
to_chat(S, "<span class='warning'>Disrupting the containment of a supermatter crystal would not be to our benefit. Aborting.</span>")
S.target = null
else if(istype(turf_area, /area/engineering/supermatter))
to_chat(actor, "<span class='warning'>Disrupting the containment of a supermatter crystal would not be to our benefit. Aborting.</span>")
actor.target = null
return TRUE
return ..()
/obj/structure/window/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
var/isonshuttle = istype(get_area(src), /area/shuttle)
for(var/turf/T in range(1, src))
var/area/A = get_area(T)
if(isspaceturf(T) || (!isonshuttle && (istype(A, /area/shuttle) || istype(A, /area/space))) || (isonshuttle && !istype(A, /area/shuttle)))
to_chat(S, "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>")
S.target = null
/obj/structure/window/swarmer_act(mob/living/simple_animal/hostile/swarmer/actor)
var/is_on_shuttle = istype(get_area(src), /area/shuttle)
for(var/t in RANGE_TURFS(1, src))
var/turf/turf_in_range = t
var/area/turf_area = get_area(turf_in_range)
// if (turf_in_range.return_turf_delta_p() > DANGEROUS_DELTA_P)
// to_chat(actor, "<span class='warning'>Destroying this object has the potential to cause an explosive pressure release. Aborting.</span>")
// actor.target = null
// return TRUE
if(isspaceturf(turf_in_range) || (!is_on_shuttle && (istype(turf_area, /area/shuttle) || istype(turf_area, /area/space))) || (is_on_shuttle && !istype(turf_area, /area/shuttle)))
to_chat(actor, "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>")
actor.target = null
return TRUE
else if(istype(A, /area/engine/supermatter))
to_chat(S, "<span class='warning'>Disrupting the containment of a supermatter crystal would not be to our benefit. Aborting.</span>")
S.target = null
else if(istype(turf_area, /area/engineering/supermatter))
to_chat(actor, "<span class='warning'>Disrupting the containment of a supermatter crystal would not be to our benefit. Aborting.</span>")
actor.target = null
return TRUE
return ..()
@@ -385,14 +385,10 @@
/obj/item/warpwhistle/attack_self(mob/living/carbon/user)
if(!istype(user) || on_cooldown)
return
var/turf/T = get_turf(user)
var/area/A = get_area(user)
if(!T || !A || A.noteleport)
to_chat(user, "<span class='warning'>You play \the [src], yet no sound comes out of it... Looks like it won't work here.</span>")
return
on_cooldown = TRUE
last_user = user
playsound(T,'sound/magic/warpwhistle.ogg', 200, 1)
var/turf/T = get_turf(user)
playsound(T,'sound/magic/warpwhistle.ogg', 200, TRUE)
ADD_TRAIT(user, TRAIT_MOBILITY_NOMOVE, src)
ADD_TRAIT(user, TRAIT_MOBILITY_NOUSE, src)
ADD_TRAIT(user, TRAIT_MOBILITY_NOPICKUP, src)
@@ -400,6 +396,10 @@
new /obj/effect/temp_visual/tornado(T)
sleep(20)
if(interrupted(user))
REMOVE_TRAIT(user, TRAIT_MOBILITY_NOMOVE, src)
REMOVE_TRAIT(user, TRAIT_MOBILITY_NOUSE, src)
REMOVE_TRAIT(user, TRAIT_MOBILITY_NOPICKUP, src)
user.update_mobility()
return
user.invisibility = INVISIBILITY_MAXIMUM
user.status_flags |= GODMODE
@@ -427,8 +427,7 @@
if(interrupted(user))
return
on_cooldown = 2
sleep(40)
on_cooldown = 0
addtimer(VARSET_CALLBACK(src, on_cooldown, 0), 4 SECONDS)
/obj/item/warpwhistle/Destroy()
if(on_cooldown == 1 && last_user) //Flute got dunked somewhere in the teleport
+3 -3
View File
@@ -20,7 +20,7 @@
var/printed_beacons = 0 //number of beacons printed. Used to determine beacon names.
var/list/meme_pack_data
var/obj/item/supplypod_beacon/beacon //the linked supplypod beacon
var/area/landingzone = /area/quartermaster/storage //where we droppin boys
var/area/landingzone = /area/cargo/storage //where we droppin boys
var/podType = /obj/structure/closet/supplypod
var/cooldown = 0 //cooldown to prevent printing supplypod beacon spam
var/locked = TRUE //is the console locked? unlock with ID
@@ -177,9 +177,9 @@
LZ = get_turf(beacon)
beacon.update_status(SP_LAUNCH)
else if (!usingBeacon)//find a suitable supplypod landing zone in cargobay
landingzone = GLOB.areas_by_type[/area/quartermaster/storage]
landingzone = GLOB.areas_by_type[/area/cargo/storage]
if (!landingzone)
WARNING("[src] couldnt find a Quartermaster/Storage (aka cargobay) area on the station, and as such it has set the supplypod landingzone to the area it resides in.")
WARNING("[src] couldnt find \"/area/cargo/storage\" (aka cargobay) area on the station, and as such it has set the supplypod landingzone to the area it resides in.")
landingzone = get_area(src)
for(var/turf/open/floor/T in landingzone.contents)//uses default landing zone
if(is_blocked_turf(T))
+9 -6
View File
@@ -19,18 +19,21 @@
var/list/safe_area_types = typecacheof(list(
/area/ai_monitored/turret_protected/ai,
/area/ai_monitored/turret_protected/ai_upload,
/area/engine,
/area/solar,
/area/engineering,
/area/solars,
/area/holodeck,
/area/shuttle)
/area/shuttle,
/area/maintenance,
/area/science/test_area)
)
//Subtypes from the above that actually should explode.
var/list/unsafe_area_subtypes = typecacheof(list(/area/engine/break_room))
var/list/unsafe_area_subtypes = typecacheof(list(/area/engineering/break_room))
allowed_areas = make_associative(GLOB.the_station_areas) - safe_area_types + unsafe_area_subtypes
return safepick(typecache_filter_list(GLOB.sortedAreas,allowed_areas))
var/list/possible_areas = typecache_filter_list(GLOB.sortedAreas,allowed_areas)
if (length(possible_areas))
return pick(possible_areas)
/datum/round_event/anomaly/setup()
impact_area = findEventArea()
+3 -4
View File
@@ -8,15 +8,14 @@
announceWhen = 50
endWhen = 20
var/list/area/areasToOpen = list()
var/list/potential_areas = list(/area/bridge,
/area/engine,
var/list/potential_areas = list(/area/command,
/area/engineering,
/area/medical,
/area/security,
/area/quartermaster,
/area/cargo,
/area/science)
var/severity = 1
/datum/round_event/grey_tide/setup()
announceWhen = rand(50, 60)
endWhen = rand(20, 30)
+2 -2
View File
@@ -71,12 +71,12 @@
var/list/safe_area_types = typecacheof(list(
/area/ai_monitored/turret_protected/ai,
/area/ai_monitored/turret_protected/ai_upload,
/area/engine,
/area/engineering,
/area/shuttle)
)
///Subtypes from the above that actually should explode.
var/list/unsafe_area_subtypes = typecacheof(list(/area/engine/break_room))
var/list/unsafe_area_subtypes = typecacheof(list(/area/engineering/break_room))
allowed_areas = make_associative(GLOB.the_station_areas) - safe_area_types + unsafe_area_subtypes
var/list/possible_areas = typecache_filter_list(GLOB.sortedAreas,allowed_areas)
if (length(possible_areas))
@@ -5,7 +5,8 @@
dynamic_lighting = DYNAMIC_LIGHTING_FORCED
requires_power = FALSE
has_gravity = STANDARD_GRAVITY
valid_territory = FALSE
area_flags = BLOBS_ALLOWED | UNIQUE_AREA
flags_1 = CAN_BE_DIRTY_1
//Survival Capsule
/obj/item/survivalcapsule
+107 -40
View File
@@ -16,29 +16,36 @@
singular_name = "ore chunk"
var/points = 0 //How many points this ore gets you from the ore redemption machine
var/refined_type = null //What this ore defaults to being refined into
var/mine_experience = 5 //How much experience do you get for mining this ore?
novariants = TRUE // Ore stacks handle their icon updates themselves to keep the illusion that there's more going
var/list/stack_overlays
var/scan_state = "" //Used by mineral turfs for their scan overlay.
var/spreadChance = 0 //Also used by mineral turfs for spreading veins
/obj/item/stack/ore/update_overlays()
. = ..()
var/difference = min(ORESTACK_OVERLAYS_MAX, amount) - (LAZYLEN(stack_overlays)+1)
if(difference == 0)
if(!difference)
return
else if(difference < 0 && LAZYLEN(stack_overlays)) //amount < stack_overlays, remove excess.
if (LAZYLEN(stack_overlays)-difference <= 0)
if(difference < 0 && LAZYLEN(stack_overlays)) //amount < stack_overlays, remove excess.
if(LAZYLEN(stack_overlays)-difference <= 0)
stack_overlays = null
else
stack_overlays.len += difference
else if(difference > 0) //amount > stack_overlays, add some.
return
stack_overlays.len += difference
else //amount > stack_overlays, add some.
for(var/i in 1 to difference)
var/mutable_appearance/newore = mutable_appearance(icon, icon_state)
newore.pixel_x = rand(-8,8)
newore.pixel_y = rand(-8,8)
LAZYADD(stack_overlays, newore)
if (stack_overlays)
if(stack_overlays)
. += stack_overlays
/obj/item/stack/ore/welder_act(mob/living/user, obj/item/I)
..()
if(!refined_type)
return TRUE
@@ -65,11 +72,16 @@
/obj/item/stack/ore/uranium
name = "uranium ore"
icon_state = "Uranium ore"
item_state = "Uranium ore"
// inhand_icon_state = "Uranium ore"
singular_name = "uranium ore chunk"
points = 30
// material_flags = MATERIAL_NO_EFFECTS
custom_materials = list(/datum/material/uranium=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/uranium
mine_experience = 6
scan_state = "rock_Uranium"
spreadChance = 5
// merge_type = /obj/item/stack/ore/uranium
/obj/item/stack/ore/iron
name = "iron ore"
@@ -79,6 +91,10 @@
points = 1
custom_materials = list(/datum/material/iron=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/metal
mine_experience = 1
scan_state = "rock_Iron"
spreadChance = 20
// merge_type = /obj/item/stack/ore/metal
/obj/item/stack/ore/glass
name = "sand pile"
@@ -89,10 +105,13 @@
custom_materials = list(/datum/material/glass=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/glass
w_class = WEIGHT_CLASS_TINY
mine_experience = 0 //its sand
// merge_type = /obj/item/stack/ore/glass
GLOBAL_LIST_INIT(sand_recipes, list(\
new/datum/stack_recipe("sandstone", /obj/item/stack/sheet/mineral/sandstone, 1, 1, 50),\
))
new /datum/stack_recipe("sandstone", /obj/item/stack/sheet/mineral/sandstone, 1, 1, 50)
))
/obj/item/stack/ore/glass/get_main_recipes()
. = ..()
@@ -111,7 +130,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
return ..()
var/mob/living/carbon/human/poorsod = M
visible_message("<span class='danger'>[user] throws the sand at [poorsod]'s face!</span>")
if(ishuman(user))
if(ishuman(user) && prob(80))
var/mob/living/carbon/human/sayer = user
sayer.forcesay("POCKET SAAND!!")
eyesand(poorsod)
@@ -133,7 +152,6 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
C.forcesay("*scream")
qdel(src)
/obj/item/stack/ore/glass/ex_act(severity, target)
if (severity == EXPLODE_NONE)
return
@@ -144,15 +162,21 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
icon_state = "volcanic_sand"
icon_state = "volcanic_sand"
singular_name = "volcanic ash pile"
mine_experience = 0
// merge_type = /obj/item/stack/ore/glass/basalt
/obj/item/stack/ore/plasma
name = "plasma ore"
icon_state = "Plasma ore"
item_state = "Plasma ore"
icon_state = "Plasma ore"
singular_name = "plasma ore chunk"
points = 15
custom_materials = list(/datum/material/plasma=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/plasma
mine_experience = 5
scan_state = "rock_Plasma"
spreadChance = 8
// merge_type = /obj/item/stack/ore/plasma
/obj/item/stack/ore/plasma/welder_act(mob/living/user, obj/item/I)
to_chat(user, "<span class='warning'>You can't hit a high enough temperature to smelt [src] properly!</span>")
@@ -164,8 +188,12 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
item_state = "Silver ore"
singular_name = "silver ore chunk"
points = 16
mine_experience = 3
custom_materials = list(/datum/material/silver=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/silver
scan_state = "rock_Silver"
spreadChance = 5
// merge_type = /obj/item/stack/ore/silver
/obj/item/stack/ore/gold
name = "gold ore"
@@ -173,8 +201,12 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
icon_state = "Gold ore"
singular_name = "gold ore chunk"
points = 18
mine_experience = 5
custom_materials = list(/datum/material/gold=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/gold
scan_state = "rock_Gold"
spreadChance = 5
// merge_type = /obj/item/stack/ore/gold
/obj/item/stack/ore/diamond
name = "diamond ore"
@@ -184,6 +216,9 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
points = 50
custom_materials = list(/datum/material/diamond=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/diamond
mine_experience = 10
scan_state = "rock_Diamond"
// merge_type = /obj/item/stack/ore/diamond
/obj/item/stack/ore/bananium
name = "bananium ore"
@@ -193,6 +228,9 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
points = 60
custom_materials = list(/datum/material/bananium=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/bananium
mine_experience = 15
scan_state = "rock_Bananium"
// merge_type = /obj/item/stack/ore/bananium
/obj/item/stack/ore/titanium
name = "titanium ore"
@@ -202,6 +240,10 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
points = 50
custom_materials = list(/datum/material/titanium=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/titanium
mine_experience = 3
scan_state = "rock_Titanium"
spreadChance = 5
// merge_type = /obj/item/stack/ore/titanium
/obj/item/stack/ore/slag
name = "slag"
@@ -209,6 +251,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
icon_state = "slag"
item_state = "slag"
singular_name = "slag chunk"
// merge_type = /obj/item/stack/ore/slag
/obj/item/gibtonite
name = "gibtonite ore"
@@ -235,7 +278,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
/obj/item/gibtonite/attackby(obj/item/I, mob/user, params)
if(!wires && istype(I, /obj/item/assembly/igniter))
user.visible_message("[user] attaches [I] to [src].", "<span class='notice'>You attach [I] to [src].</span>")
user.visible_message("<span class='notice'>[user] attaches [I] to [src].</span>", "<span class='notice'>You attach [I] to [src].</span>")
wires = new /datum/wires/explosive/gibtonite(src)
attacher = key_name(user)
qdel(I)
@@ -255,7 +298,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
primed = FALSE
if(det_timer)
deltimer(det_timer)
user.visible_message("The chain reaction was stopped! ...The ore's quality looks diminished.", "<span class='notice'>You stopped the chain reaction. ...The ore's quality looks diminished.</span>")
user.visible_message("<span class='notice'>The chain reaction stopped! ...The ore's quality looks diminished.</span>", "<span class='notice'>You stopped the chain reaction. ...The ore's quality looks diminished.</span>")
icon_state = "Gibtonite ore"
quality = GIBTONITE_QUALITY_LOW
return
@@ -269,34 +312,29 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
/obj/item/gibtonite/bullet_act(obj/item/projectile/P)
GibtoniteReaction(P.firer)
return ..()
. = ..()
/obj/item/gibtonite/ex_act()
GibtoniteReaction(null, 1)
/obj/item/gibtonite/proc/GibtoniteReaction(mob/user, triggered_by = 0)
if(!primed)
primed = TRUE
playsound(src,'sound/effects/hit_on_shattered_glass.ogg',50,1)
playsound(src,'sound/effects/hit_on_shattered_glass.ogg',50,TRUE)
icon_state = "Gibtonite active"
var/turf/bombturf = get_turf(src)
var/notify_admins = 0
var/notify_admins = FALSE
if(z != 5)//Only annoy the admins ingame if we're triggered off the mining zlevel
notify_admins = 1
notify_admins = TRUE
if(notify_admins)
if(triggered_by == 1)
message_admins("An explosion has triggered a [name] to detonate at [ADMIN_VERBOSEJMP(bombturf)].")
else if(triggered_by == 2)
message_admins("A signal has triggered a [name] to detonate at [ADMIN_VERBOSEJMP(bombturf)]. Igniter attacher: [ADMIN_LOOKUPFLW(attacher)]")
else
message_admins("[ADMIN_LOOKUPFLW(attacher)] has triggered a [name] to detonate at [ADMIN_VERBOSEJMP(bombturf)].")
if(triggered_by == 1)
log_game("An explosion has primed a [name] for detonation at [AREACOORD(bombturf)]")
message_admins("An explosion has triggered a [name] to detonate at [ADMIN_VERBOSEJMP(bombturf)].")
else if(triggered_by == 2)
log_game("A signal has primed a [name] for detonation at [AREACOORD(bombturf)]. Igniter attacher: [key_name(attacher)].")
if(notify_admins)
message_admins("A signal has triggered a [name] to detonate at [ADMIN_VERBOSEJMP(bombturf)]. Igniter attacher: [ADMIN_LOOKUPFLW(attacher)]")
var/bomb_message = "A signal has primed a [name] for detonation at [AREACOORD(bombturf)]. Igniter attacher: [key_name(attacher)]."
log_game(bomb_message)
GLOB.bombers += bomb_message
else
user.visible_message("<span class='warning'>[user] strikes \the [src], causing a chain reaction!</span>", "<span class='danger'>You strike \the [src], causing a chain reaction.</span>")
log_game("[key_name(user)] has primed a [name] for detonation at [AREACOORD(bombturf)]")
@@ -313,10 +351,10 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
explosion(src,0,1,3,adminlog = notify_admins)
qdel(src)
/obj/item/stack/ore/Initialize()
/obj/item/stack/ore/Initialize(mapload, new_amount, merge = TRUE)
. = ..()
pixel_x = rand(0,16)-8
pixel_y = rand(0,8)-8
pixel_x = initial(pixel_x) + rand(0, 16) - 8
pixel_y = initial(pixel_y) + rand(0, 8) - 8
/obj/item/stack/ore/ex_act(severity, target)
if (!severity || severity >= 2)
@@ -350,8 +388,8 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
. = ..()
coinflip = pick(sideslist)
icon_state = "coin_[coinflip]"
pixel_x = rand(0,16)-8
pixel_y = rand(0,8)-8
pixel_x = initial(pixel_x) + rand(0, 16) - 8
pixel_y = initial(pixel_y) + rand(0, 8) - 8
/obj/item/coin/set_custom_materials(list/materials, multiplier = 1)
. = ..()
@@ -377,6 +415,8 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
user.visible_message("<span class='suicide'>\the [src] lands on [coinflip]! [user] promptly falls over, dead!</span>")
user.adjustOxyLoss(200)
user.death(0)
// user.set_suicide(TRUE)
user.suicide_log()
else
user.visible_message("<span class='suicide'>\the [src] lands on [coinflip]! [user] keeps on living!</span>")
@@ -386,11 +426,12 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
/obj/item/coin/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/CC = W
if(string_attached)
to_chat(user, "<span class='warning'>There already is a string attached to this coin!</span>")
return
if (W.use_tool(src, user, 0, 1, skill_gain_mult = BARE_USE_TOOL_MULT))
if (CC.use(1))
add_overlay("coin_string_overlay")
string_attached = 1
to_chat(user, "<span class='notice'>You attach a string to the coin.</span>")
@@ -412,6 +453,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
..()
/obj/item/coin/wirecutter_act(mob/living/user, obj/item/I)
..()
if(!string_attached)
return TRUE
@@ -430,13 +472,13 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
flick("coin_[coinflip]_flip", src)
coinflip = pick(sideslist)
icon_state = "coin_[coinflip]"
playsound(user.loc, 'sound/items/coinflip.ogg', 50, 1)
playsound(user.loc, 'sound/items/coinflip.ogg', 50, TRUE)
var/oldloc = loc
sleep(15)
if(loc == oldloc && user && !user.incapacitated())
user.visible_message("[user] has flipped [src]. It lands on [coinflip].", \
"<span class='notice'>You flip [src]. It lands on [coinflip].</span>", \
"<span class='italics'>You hear the clattering of loose change.</span>")
user.visible_message("<span class='notice'>[user] flips [src]. It lands on [coinflip].</span>", \
"<span class='notice'>You flip [src]. It lands on [coinflip].</span>", \
"<span class='hear'>You hear the clattering of loose change.</span>")
return TRUE//did the coin flip? useful for suicide_act
/obj/item/coin/gold
@@ -486,4 +528,29 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
/obj/item/coin/iron
/obj/item/coin/gold/debug
custom_materials = list(/datum/material/gold = 400)
desc = "If you got this somehow, be aware that it will dust you. Almost certainly."
/obj/item/coin/gold/debug/attack_self(mob/user)
if(cooldown < world.time)
if(string_attached) //does the coin have a wire attached
to_chat(user, "<span class='warning'>The coin won't flip very well with something attached!</span>" )
return FALSE//do not flip the coin
cooldown = world.time + 15
flick("coin_[coinflip]_flip", src)
coinflip = pick(sideslist)
icon_state = "coin_[coinflip]"
playsound(user.loc, 'sound/items/coinflip.ogg', 50, TRUE)
var/oldloc = loc
sleep(15)
if(loc == oldloc && user && !user.incapacitated())
user.visible_message("<span class='notice'>[user] flips [src]. It lands on [coinflip].</span>", \
"<span class='notice'>You flip [src]. It lands on [coinflip].</span>", \
"<span class='hear'>You hear the clattering of loose change.</span>")
SSeconomy.fire()
// to_chat(user,"<span class='bounty'>[SSeconomy.inflation_value()] is the inflation value.</span>")
to_chat(user, "<span class='bounty'>Luckily, economical inflation is not yet included. So no, you cannot predict the market with this.</span>")
return TRUE//did the coin flip? useful for suicide_act
#undef ORESTACK_OVERLAYS_MAX
@@ -59,7 +59,7 @@
C.dust(FALSE, TRUE)
var/area/A = get_area(C)
if(istype(A, /area/chapel) && C.mind?.assigned_role != "Chaplain")
if(istype(A, /area/service/chapel) && C.mind?.assigned_role != "Chaplain")
to_chat(C, "<span class='danger'>You don't belong here!</span>")
C.adjustFireLoss(5)
C.adjust_fire_stacks(6)
@@ -92,12 +92,9 @@
name = "ai_multicam_room"
icon_state = "ai_camera_room"
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
valid_territory = FALSE
ambientsounds = list()
blob_allowed = FALSE
noteleport = TRUE
hidden = TRUE
safe = TRUE
area_flags = NOTELEPORT | HIDDEN_AREA | UNIQUE_AREA
ambientsounds = null
flags_1 = NONE
GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room)
@@ -1,4 +1,4 @@
/area/engine/engineering/poweralert(state, source)
/area/engineering/main/poweralert(state, source)
if (state != poweralm)
investigate_log("has a power alarm!", INVESTIGATE_SINGULO)
..()
@@ -329,9 +329,7 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337)
icon_state = "hilbertshotel"
requires_power = FALSE
has_gravity = TRUE
noteleport = TRUE
hidden = TRUE
unique = FALSE
area_flags = NOTELEPORT | HIDDEN_AREA
dynamic_lighting = DYNAMIC_LIGHTING_FORCED
ambientsounds = list('sound/ambience/servicebell.ogg')
var/roomnumber = 0
@@ -408,8 +406,7 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337)
icon_state = "hilbertshotel"
requires_power = FALSE
has_gravity = TRUE
noteleport = TRUE
hidden = TRUE
area_flags = NOTELEPORT | HIDDEN_AREA
/obj/item/abstracthotelstorage
anchored = TRUE
@@ -21,10 +21,12 @@
/obj/effect/proc_holder/spell/targeted/area_teleport/before_cast(list/targets)
var/area/U = get_area(usr)
if(U.noteleport && !istype(U, /area/wizard_station)) // Wizard den special check for those complaining about being unable to tele on station.
if((U.area_flags & NOTELEPORT) && !istype(U, /area/wizard_station)) // Wizard den special check for those complaining about being unable to tele on station.
to_chat(usr, "<span class='warning'>Unseen forces prevent you from casting this spell in this area</span>")
return
var/A
var/A = null
if(!randomise_selection)
A = input("Area to teleport to", "Teleport", A) as null|anything in GLOB.teleportlocs
else