Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Ghommie-cit685
This commit is contained in:
@@ -131,7 +131,7 @@
|
||||
if(C.get_amount() >= 5)
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start to add cables to the frame...</span>")
|
||||
if(do_after(user, 20, target = src) && state == SCREWED_CORE && C.use(5))
|
||||
if(do_after(user, 20, target = src) && state == SCREWED_CORE && C.use_tool(src, user, 0, 5))
|
||||
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
|
||||
state = CABLED_CORE
|
||||
update_icon()
|
||||
|
||||
@@ -84,7 +84,6 @@
|
||||
panel_open = FALSE
|
||||
|
||||
else if(istype(I, /obj/item/stack/cable_coil) && panel_open)
|
||||
var/obj/item/stack/cable_coil/C = I
|
||||
if(obj_flags & EMAGGED) //Emagged, not broken by EMP
|
||||
to_chat(user, "<span class='warning'>Sign has been damaged beyond repair!</span>")
|
||||
return
|
||||
@@ -92,7 +91,7 @@
|
||||
to_chat(user, "<span class='warning'>This sign is functioning properly!</span>")
|
||||
return
|
||||
|
||||
if(C.use(2))
|
||||
if(I.use_tool(src, user, 0, 2))
|
||||
to_chat(user, "<span class='notice'>You replace the burnt wiring.</span>")
|
||||
broken = FALSE
|
||||
else
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
///Material chair
|
||||
/obj/structure/chair/greyscale
|
||||
icon_state = "chair_greyscale"
|
||||
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
|
||||
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS | MATERIAL_EFFECTS
|
||||
item_chair = /obj/item/chair/greyscale
|
||||
buildstacktype = null //Custom mats handle this
|
||||
|
||||
@@ -382,7 +382,7 @@
|
||||
/obj/item/chair/greyscale
|
||||
icon_state = "chair_greyscale_toppled"
|
||||
item_state = "chair_greyscale"
|
||||
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
|
||||
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS | MATERIAL_EFFECTS
|
||||
origin_type = /obj/structure/chair/greyscale
|
||||
|
||||
/obj/item/chair/stool
|
||||
|
||||
@@ -350,11 +350,28 @@
|
||||
icon = 'icons/obj/flora/rocks.dmi'
|
||||
resistance_flags = FIRE_PROOF
|
||||
density = TRUE
|
||||
/// Itemstack that is dropped when a rock is mined with a pickaxe
|
||||
var/obj/item/stack/mineResult = /obj/item/stack/ore/glass/basalt
|
||||
/// Amount of the itemstack to drop
|
||||
var/mineAmount = 20
|
||||
|
||||
/obj/structure/flora/rock/Initialize()
|
||||
. = ..()
|
||||
icon_state = "[icon_state][rand(1,3)]"
|
||||
|
||||
/obj/structure/flora/rock/attackby(obj/item/W, mob/user, params)
|
||||
if(!mineResult || W.tool_behaviour != TOOL_MINING)
|
||||
return ..()
|
||||
if(flags_1 & NODECONSTRUCT_1)
|
||||
return ..()
|
||||
to_chat(user, "<span class='notice'>You start mining...</span>")
|
||||
if(W.use_tool(src, user, 40, volume=50))
|
||||
to_chat(user, "<span class='notice'>You finish mining the rock.</span>")
|
||||
if(mineResult && mineAmount)
|
||||
new mineResult(get_turf(src), mineAmount)
|
||||
SSblackbox.record_feedback("tally", "pick_used_mining", 1, W.type)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/flora/rock/pile
|
||||
icon_state = "lavarocks"
|
||||
desc = "A pile of rocks."
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
new_spawn.undershirt = "Nude" //changing underwear/shirt/socks doesn't seem to function correctly right now because of some bug elsewhere?
|
||||
new_spawn.socks = "Nude"
|
||||
new_spawn.update_body(TRUE)
|
||||
new_spawn.language_holder.selected_language = /datum/language/sylvan
|
||||
|
||||
//Ash walker eggs: Spawns in ash walker dens in lavaland. Ghosts become unbreathing lizards that worship the Necropolis and are advised to retrieve corpses to create more ash walkers.
|
||||
|
||||
@@ -63,10 +64,6 @@
|
||||
else
|
||||
to_chat(new_spawn, "<span class='userdanger'>You have been born outside of your natural home! Whether you decide to return home, or make due with your new home is your own decision.</span>")
|
||||
|
||||
new_spawn.grant_language(/datum/language/draconic)
|
||||
var/datum/language_holder/holder = new_spawn.get_language_holder()
|
||||
holder.selected_default_language = /datum/language/draconic
|
||||
|
||||
//Ash walkers on birth understand how to make bone bows, bone arrows and ashen arrows
|
||||
|
||||
new_spawn.mind.teach_crafting_recipe(/datum/crafting_recipe/bone_arrow)
|
||||
|
||||
179
code/game/objects/structures/icemoon/cave_entrance.dm
Normal file
179
code/game/objects/structures/icemoon/cave_entrance.dm
Normal file
@@ -0,0 +1,179 @@
|
||||
GLOBAL_LIST_INIT(ore_probability, list(/obj/item/stack/ore/uranium = 50,
|
||||
/obj/item/stack/ore/iron = 100,
|
||||
/obj/item/stack/ore/plasma = 75,
|
||||
/obj/item/stack/ore/silver = 50,
|
||||
/obj/item/stack/ore/gold = 50,
|
||||
/obj/item/stack/ore/diamond = 25,
|
||||
/obj/item/stack/ore/bananium = 5,
|
||||
/obj/item/stack/ore/titanium = 75))
|
||||
|
||||
/obj/structure/spawner/ice_moon
|
||||
name = "cave entrance"
|
||||
desc = "A hole in the ground, filled with monsters ready to defend it."
|
||||
icon = 'icons/mob/nest.dmi'
|
||||
icon_state = "hole"
|
||||
faction = list("mining")
|
||||
max_mobs = 3
|
||||
max_integrity = 250
|
||||
mob_types = list(/mob/living/simple_animal/hostile/asteroid/wolf)
|
||||
move_resist = INFINITY
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/spawner/ice_moon/Initialize()
|
||||
. = ..()
|
||||
clear_rock()
|
||||
|
||||
/**
|
||||
* Clears rocks around the spawner when it is created
|
||||
*
|
||||
*/
|
||||
/obj/structure/spawner/ice_moon/proc/clear_rock()
|
||||
for(var/turf/F in RANGE_TURFS(2, src))
|
||||
if(abs(src.x - F.x) + abs(src.y - F.y) > 3)
|
||||
continue
|
||||
if(ismineralturf(F))
|
||||
var/turf/closed/mineral/M = F
|
||||
M.ScrapeAway(null, CHANGETURF_IGNORE_AIR)
|
||||
|
||||
/obj/structure/spawner/ice_moon/deconstruct(disassembled)
|
||||
destroy_effect()
|
||||
drop_loot()
|
||||
return ..()
|
||||
|
||||
/**
|
||||
* Effects and messages created when the spawner is destroyed
|
||||
*
|
||||
*/
|
||||
/obj/structure/spawner/ice_moon/proc/destroy_effect()
|
||||
playsound(loc,'sound/effects/explosionfar.ogg', 200, TRUE)
|
||||
visible_message("<span class='boldannounce'>[src] collapses, sealing everything inside!</span>\n<span class='warning'>Ores fall out of the cave as it is destroyed!</span>")
|
||||
|
||||
/**
|
||||
* Drops items after the spawner is destroyed
|
||||
*
|
||||
*/
|
||||
/obj/structure/spawner/ice_moon/proc/drop_loot()
|
||||
for(var/type in GLOB.ore_probability)
|
||||
var/chance = GLOB.ore_probability[type]
|
||||
if(!prob(chance))
|
||||
continue
|
||||
new type(loc, rand(5, 10))
|
||||
|
||||
/obj/structure/spawner/ice_moon/polarbear
|
||||
max_mobs = 1
|
||||
spawn_time = 60 SECONDS
|
||||
mob_types = list(/mob/living/simple_animal/hostile/asteroid/polarbear)
|
||||
|
||||
/obj/structure/spawner/ice_moon/polarbear/clear_rock()
|
||||
for(var/turf/F in RANGE_TURFS(1, src))
|
||||
if(ismineralturf(F))
|
||||
var/turf/closed/mineral/M = F
|
||||
M.ScrapeAway(null, CHANGETURF_IGNORE_AIR)
|
||||
|
||||
/obj/structure/spawner/ice_moon/demonic_portal
|
||||
name = "demonic portal"
|
||||
desc = "A portal that goes to another world, normal creatures couldn't survive there."
|
||||
icon_state = "nether"
|
||||
mob_types = list(/mob/living/simple_animal/hostile/asteroid/ice_demon)
|
||||
light_range = 1
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/structure/spawner/ice_moon/demonic_portal/clear_rock()
|
||||
for(var/turf/F in RANGE_TURFS(3, src))
|
||||
if(abs(src.x - F.x) + abs(src.y - F.y) > 5)
|
||||
continue
|
||||
if(ismineralturf(F))
|
||||
var/turf/closed/mineral/M = F
|
||||
M.ScrapeAway(null, CHANGETURF_IGNORE_AIR)
|
||||
|
||||
/obj/structure/spawner/ice_moon/demonic_portal/destroy_effect()
|
||||
new /obj/effect/collapsing_demonic_portal(loc)
|
||||
|
||||
/obj/structure/spawner/ice_moon/demonic_portal/drop_loot()
|
||||
return
|
||||
|
||||
/obj/structure/spawner/ice_moon/demonic_portal/ice_whelp
|
||||
mob_types = list(/mob/living/simple_animal/hostile/asteroid/ice_whelp)
|
||||
|
||||
/obj/structure/spawner/ice_moon/demonic_portal/snowlegion
|
||||
mob_types = list(/mob/living/simple_animal/hostile/asteroid/hivelord/legion/snow/tendril)
|
||||
|
||||
/obj/effect/collapsing_demonic_portal
|
||||
name = "collapsing demonic portal"
|
||||
desc = "It's slowly fading!"
|
||||
layer = TABLE_LAYER
|
||||
icon = 'icons/mob/nest.dmi'
|
||||
icon_state = "nether"
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
|
||||
/obj/effect/collapsing_demonic_portal/Initialize()
|
||||
. = ..()
|
||||
playsound(loc,'sound/effects/tendril_destroyed.ogg', 200, FALSE, 50, TRUE, TRUE)
|
||||
visible_message("<span class='boldannounce'>[src] begins to collapse, cutting it off from this world!</span>")
|
||||
animate(src, transform = matrix().Scale(0, 1), alpha = 50, time = 5 SECONDS)
|
||||
addtimer(CALLBACK(src, .proc/collapse), 5 SECONDS)
|
||||
|
||||
/obj/effect/collapsing_demonic_portal/proc/collapse()
|
||||
visible_message("<span class='warning'>Something slips out of [src]!</span>")
|
||||
var/loot = rand(1, 28)
|
||||
switch(loot)
|
||||
if(1)
|
||||
new /obj/item/clothing/suit/space/hardsuit/cult(loc)
|
||||
if(2)
|
||||
new /obj/item/clothing/glasses/godeye(loc)
|
||||
if(3)
|
||||
new /obj/item/reagent_containers/glass/bottle/potion/flight(loc)
|
||||
if(4)
|
||||
new /obj/item/organ/heart/cursed/wizard(loc)
|
||||
if(5)
|
||||
new /obj/item/jacobs_ladder(loc)
|
||||
if(6)
|
||||
new /obj/item/rod_of_asclepius(loc)
|
||||
if(7)
|
||||
new /obj/item/warp_cube/red(loc)
|
||||
if(8)
|
||||
new /obj/item/wisp_lantern(loc)
|
||||
if(9)
|
||||
new /obj/item/immortality_talisman(loc)
|
||||
if(10)
|
||||
new /obj/item/book/granter/spell/summonitem(loc)
|
||||
if(11)
|
||||
new /obj/item/clothing/neck/necklace/memento_mori(loc)
|
||||
if(12)
|
||||
new /obj/item/borg/upgrade/modkit/lifesteal(loc)
|
||||
new /obj/item/bedsheet/cult(loc)
|
||||
if(13)
|
||||
new /obj/item/disk/design_disk/modkit_disc/mob_and_turf_aoe(loc)
|
||||
if(14)
|
||||
new /obj/item/disk/design_disk/modkit_disc/bounty(loc)
|
||||
if(15)
|
||||
new /obj/item/ship_in_a_bottle(loc)
|
||||
new /obj/item/oar(loc)
|
||||
if(16)
|
||||
new /obj/item/seeds/gatfruit(loc)
|
||||
if(17)
|
||||
new /obj/item/reagent_containers/food/drinks/drinkingglass/filled/nuka_cola(loc)
|
||||
if(18)
|
||||
new /obj/item/assembly/signaler/anomaly/bluespace(loc)
|
||||
if(19)
|
||||
new /obj/item/disk/design_disk/modkit_disc/resonator_blast(loc)
|
||||
if(20)
|
||||
new /obj/item/disk/design_disk/modkit_disc/rapid_repeater(loc)
|
||||
if(21)
|
||||
new /obj/item/slimepotion/transference(loc)
|
||||
if(22)
|
||||
new /obj/item/slime_extract/adamantine(loc)
|
||||
if(23)
|
||||
new /obj/item/weldingtool/abductor(loc)
|
||||
if(24)
|
||||
new /obj/structure/elite_tumor(loc)
|
||||
if(25)
|
||||
new /mob/living/simple_animal/hostile/retaliate/clown/clownhulk(loc)
|
||||
if(26)
|
||||
new /obj/item/clothing/shoes/winterboots/ice_boots(loc)
|
||||
if(27)
|
||||
new /obj/item/book/granter/spell/sacredflame(loc)
|
||||
if(28)
|
||||
new /mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/doom(loc)
|
||||
qdel(src)
|
||||
@@ -32,7 +32,6 @@
|
||||
/obj/structure/janitorialcart/proc/put_in_cart(obj/item/I, mob/user)
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
updateUsrDialog()
|
||||
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
|
||||
return
|
||||
|
||||
@@ -96,70 +95,82 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
|
||||
var/list/items = list()
|
||||
if(mybag)
|
||||
dat += "<a href='?src=[REF(src)];garbage=1'>[mybag.name]</a><br>"
|
||||
items += list("Trash bag" = image(icon = mybag.icon, icon_state = mybag.icon_state))
|
||||
if(mymop)
|
||||
dat += "<a href='?src=[REF(src)];mop=1'>[mymop.name]</a><br>"
|
||||
items += list("Mop" = image(icon = mymop.icon, icon_state = mymop.icon_state))
|
||||
if(mybroom)
|
||||
dat += "<a href='?src=[REF(src)];broom=1'>[mybroom.name]</a><br>"
|
||||
items += list("Broom" = image(icon = mybroom.icon, icon_state = mybroom.icon_state))
|
||||
if(myspray)
|
||||
dat += "<a href='?src=[REF(src)];spray=1'>[myspray.name]</a><br>"
|
||||
items += list("Spray bottle" = image(icon = myspray.icon, icon_state = myspray.icon_state))
|
||||
if(myreplacer)
|
||||
dat += "<a href='?src=[REF(src)];replacer=1'>[myreplacer.name]</a><br>"
|
||||
if(signs)
|
||||
dat += "<a href='?src=[REF(src)];sign=1'>[signs] sign\s</a><br>"
|
||||
var/datum/browser/popup = new(user, "janicart", name, 240, 160)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
items += list("Light replacer" = image(icon = myreplacer.icon, icon_state = myreplacer.icon_state))
|
||||
var/obj/item/caution/sign = locate() in src
|
||||
if(sign)
|
||||
items += list("Sign" = image(icon = sign.icon, icon_state = sign.icon_state))
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/Topic(href, href_list)
|
||||
if(!in_range(src, usr))
|
||||
if(!length(items))
|
||||
return
|
||||
if(!isliving(usr))
|
||||
items = sortList(items)
|
||||
var/pick = show_radial_menu(user, src, items, custom_check = CALLBACK(src, .proc/check_menu, user), radius = 38, require_near = TRUE)
|
||||
if(!pick)
|
||||
return
|
||||
var/mob/living/user = usr
|
||||
if(href_list["garbage"])
|
||||
if(mybag)
|
||||
switch(pick)
|
||||
if("Trash bag")
|
||||
if(!mybag)
|
||||
return
|
||||
user.put_in_hands(mybag)
|
||||
to_chat(user, "<span class='notice'>You take [mybag] from [src].</span>")
|
||||
mybag = null
|
||||
if(href_list["mop"])
|
||||
if(mymop)
|
||||
if("Mop")
|
||||
if(!mymop)
|
||||
return
|
||||
user.put_in_hands(mymop)
|
||||
to_chat(user, "<span class='notice'>You take [mymop] from [src].</span>")
|
||||
mymop = null
|
||||
if(href_list["broom"])
|
||||
if(mybroom)
|
||||
if("Broom")
|
||||
if(!mybroom)
|
||||
return
|
||||
user.put_in_hands(mybroom)
|
||||
to_chat(user, "<span class='notice'>You take [mybroom] from [src].</span>")
|
||||
mybroom = null
|
||||
if(href_list["spray"])
|
||||
if(myspray)
|
||||
if("Spray bottle")
|
||||
if(!myspray)
|
||||
return
|
||||
user.put_in_hands(myspray)
|
||||
to_chat(user, "<span class='notice'>You take [myspray] from [src].</span>")
|
||||
myspray = null
|
||||
if(href_list["replacer"])
|
||||
if(myreplacer)
|
||||
if("Light replacer")
|
||||
if(!myreplacer)
|
||||
return
|
||||
user.put_in_hands(myreplacer)
|
||||
to_chat(user, "<span class='notice'>You take [myreplacer] from [src].</span>")
|
||||
myreplacer = null
|
||||
if(href_list["sign"])
|
||||
if(signs)
|
||||
var/obj/item/caution/Sign = locate() in src
|
||||
if(Sign)
|
||||
user.put_in_hands(Sign)
|
||||
to_chat(user, "<span class='notice'>You take \a [Sign] from [src].</span>")
|
||||
signs--
|
||||
else
|
||||
WARNING("Signs ([signs]) didn't match contents")
|
||||
signs = 0
|
||||
if("Sign")
|
||||
if(signs <= 0)
|
||||
return
|
||||
user.put_in_hands(sign)
|
||||
to_chat(user, "<span class='notice'>You take \a [sign] from [src].</span>")
|
||||
signs--
|
||||
else
|
||||
return
|
||||
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
|
||||
/**
|
||||
* check_menu: Checks if we are allowed to interact with a radial menu
|
||||
*
|
||||
* Arguments:
|
||||
* * user The mob interacting with a menu
|
||||
*/
|
||||
/obj/structure/janitorialcart/proc/check_menu(mob/living/user)
|
||||
if(!istype(user))
|
||||
return FALSE
|
||||
if(user.incapacitated())
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/janitorialcart/update_overlays()
|
||||
. = ..()
|
||||
|
||||
@@ -91,8 +91,13 @@
|
||||
if (!is_ghost && !in_range(src, user))
|
||||
return
|
||||
|
||||
var/list/tool_list = list(
|
||||
"Up" = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = NORTH),
|
||||
"Down" = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = SOUTH)
|
||||
)
|
||||
|
||||
if (up && down)
|
||||
var/result = alert("Go up or down [src]?", "Ladder", "Up", "Down", "Cancel")
|
||||
var/result = show_radial_menu(user, src, tool_list, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE, tooltips = TRUE)
|
||||
if (!is_ghost && !in_range(src, user))
|
||||
return // nice try
|
||||
switch(result)
|
||||
@@ -112,6 +117,11 @@
|
||||
if(!is_ghost)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/ladder/proc/check_menu(mob/user)
|
||||
if(user.incapacitated() || !user.Adjacent(src))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/ladder/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
|
||||
86
code/game/objects/structures/lavaland/geyser.dm
Normal file
86
code/game/objects/structures/lavaland/geyser.dm
Normal file
@@ -0,0 +1,86 @@
|
||||
//If you look at the "geyser_soup" overlay icon_state, you'll see that the first frame has 25 ticks.
|
||||
//That's because the first 18~ ticks are completely skipped for some ungodly weird fucking byond reason
|
||||
|
||||
/obj/structure/geyser
|
||||
name = "geyser"
|
||||
icon = 'icons/obj/lavaland/terrain.dmi'
|
||||
icon_state = "geyser"
|
||||
anchored = TRUE
|
||||
|
||||
var/erupting_state = null //set to null to get it greyscaled from "[icon_state]_soup". Not very usable with the whole random thing, but more types can be added if you change the spawn prob
|
||||
var/activated = FALSE //whether we are active and generating chems
|
||||
var/reagent_id = /datum/reagent/fuel/oil
|
||||
var/potency = 2 //how much reagents we add every process (2 seconds)
|
||||
var/max_volume = 500
|
||||
var/start_volume = 50
|
||||
|
||||
/obj/structure/geyser/proc/start_chemming()
|
||||
activated = TRUE
|
||||
create_reagents(max_volume, DRAINABLE)
|
||||
reagents.add_reagent(reagent_id, start_volume)
|
||||
START_PROCESSING(SSfluids, src) //It's main function is to be plumbed, so use SSfluids
|
||||
if(erupting_state)
|
||||
icon_state = erupting_state
|
||||
else
|
||||
var/mutable_appearance/I = mutable_appearance('icons/obj/lavaland/terrain.dmi', "[icon_state]_soup")
|
||||
I.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(I)
|
||||
|
||||
/obj/structure/geyser/process()
|
||||
if(activated && reagents.total_volume <= reagents.maximum_volume) //this is also evaluated in add_reagent, but from my understanding proc calls are expensive
|
||||
reagents.add_reagent(reagent_id, potency)
|
||||
|
||||
/obj/structure/geyser/plunger_act(obj/item/plunger/P, mob/living/user, _reinforced)
|
||||
if(!_reinforced)
|
||||
to_chat(user, "<span class='warning'>The [P.name] isn't strong enough!</span>")
|
||||
return
|
||||
if(activated)
|
||||
to_chat(user, "<span class'warning'>The [name] is already active!</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You start vigorously plunging [src]!</span>")
|
||||
if(do_after(user, 50 * P.plunge_mod, target = src) && !activated)
|
||||
start_chemming()
|
||||
|
||||
/obj/structure/geyser/random
|
||||
erupting_state = null
|
||||
var/list/options = list(/datum/reagent/clf3 = 10, /datum/reagent/water/hollowwater = 10, /datum/reagent/medicine/omnizine/protozine = 6, /datum/reagent/wittel = 1)
|
||||
|
||||
/obj/structure/geyser/random/Initialize()
|
||||
. = ..()
|
||||
reagent_id = pickweight(options)
|
||||
|
||||
/obj/item/plunger
|
||||
name = "plunger"
|
||||
desc = "It's a plunger for plunging."
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "plunger"
|
||||
|
||||
slot_flags = ITEM_SLOT_MASK
|
||||
|
||||
var/plunge_mod = 1 //time*plunge_mod = total time we take to plunge an object
|
||||
var/reinforced = FALSE //whether we do heavy duty stuff like geysers
|
||||
|
||||
/obj/item/plunger/attack_obj(obj/O, mob/living/user)
|
||||
if(!O.plunger_act(src, user, reinforced))
|
||||
return ..()
|
||||
|
||||
/obj/item/plunger/throw_impact(atom/hit_atom, datum/thrownthing/tt)
|
||||
. = ..()
|
||||
if(tt.target_zone != BODY_ZONE_HEAD)
|
||||
return
|
||||
if(iscarbon(hit_atom))
|
||||
var/mob/living/carbon/H = hit_atom
|
||||
if(!H.wear_mask)
|
||||
H.equip_to_slot_if_possible(src, ITEM_SLOT_MASK)
|
||||
H.visible_message("<span class='warning'>The plunger slams into [H]'s face!</span>", "<span class='warning'>The plunger suctions to your face!</span>")
|
||||
|
||||
/obj/item/plunger/reinforced
|
||||
name = "reinforced plunger"
|
||||
desc = "It's an M. 7 Reinforced Plunger© for heavy duty plunging."
|
||||
icon_state = "reinforced_plunger"
|
||||
|
||||
reinforced = TRUE
|
||||
plunge_mod = 0.8
|
||||
|
||||
custom_premium_price = 1200
|
||||
@@ -25,6 +25,9 @@
|
||||
/obj/structure/spawner/lavaland/legion
|
||||
mob_types = list(/mob/living/simple_animal/hostile/asteroid/hivelord/legion/tendril)
|
||||
|
||||
/obj/structure/spawner/lavaland/icewatcher
|
||||
mob_types = list(/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/icewing)
|
||||
|
||||
GLOBAL_LIST_INIT(tendrils, list())
|
||||
/obj/structure/spawner/lavaland/Initialize()
|
||||
. = ..()
|
||||
@@ -94,4 +97,4 @@ GLOBAL_LIST_INIT(tendrils, list())
|
||||
for(var/turf/T in range(2,src))
|
||||
if(!T.density)
|
||||
T.TerraformTurf(/turf/open/chasm/lavaland, /turf/open/chasm/lavaland, flags = CHANGETURF_INHERIT_AIR)
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -38,7 +38,4 @@
|
||||
user.show_message("<span class='notice'>You weave \the [S.name] into a workable fabric.</span>", MSG_VISUAL)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/loom/unanchored
|
||||
anchored = FALSE
|
||||
|
||||
#undef FABRIC_PER_SHEET
|
||||
66
code/game/objects/structures/loot_pile.dm
Normal file
66
code/game/objects/structures/loot_pile.dm
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Loot piles structures, somewhat inspired from Polaris 13 ones but without the one search per pile ckey/mind restriction
|
||||
* because the actual code is located its own element and has enough variables already. the piles themselves merely cosmetical.
|
||||
*/
|
||||
/obj/structure/loot_pile
|
||||
name = "pile of junk"
|
||||
desc = "Lots of junk lying around. They say one man's trash is another man's treasure."
|
||||
icon = 'icons/obj/loot_piles.dmi'
|
||||
icon_state = "randompile"
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
var/loot_amount = 5
|
||||
var/delete_on_depletion = FALSE
|
||||
var/can_use_hands = TRUE
|
||||
var/scavenge_time = 12 SECONDS
|
||||
var/allowed_tools = list(TOOL_SHOVEL = 0.6) //list of tool_behaviours with associated speed multipliers (lower is better)
|
||||
var/icon_states_to_use = list("junk_pile1", "junk_pile2", "junk_pile3", "junk_pile4", "junk_pile5")
|
||||
var/list/loot
|
||||
|
||||
/*
|
||||
* Associated values in this list are not weights but numbers of times the kery can be rolled
|
||||
* before being removed from ALL piles with same kind. This is why I wanted 'scavenging' to be an element and not a component.
|
||||
*/
|
||||
var/list/unique_loot
|
||||
|
||||
/*
|
||||
* used for restrictions such as "one per mind", "one per ckey". Depending on the setting, these can be either limited to
|
||||
* the current pile or shared throughout all atoms attached to this element.
|
||||
*/
|
||||
var/loot_restriction = NO_LOOT_RESTRICTION
|
||||
var/maximum_loot_per_player = 1
|
||||
|
||||
/obj/structure/loot_pile/Initialize()
|
||||
. = ..()
|
||||
icon_state = pick(icon_states_to_use)
|
||||
|
||||
/obj/structure/loot_pile/ComponentInitialize()
|
||||
. = ..()
|
||||
if(loot)
|
||||
AddElement(/datum/element/scavenging, loot_amount, loot, unique_loot, scavenge_time, can_use_hands, allowed_tools, null, delete_on_depletion, loot_restriction, maximum_loot_per_player)
|
||||
|
||||
//uses the maintenance_loot global list, mostly boring stuff and mices.
|
||||
/obj/structure/loot_pile/maint
|
||||
name = "trash pile"
|
||||
desc = "A heap of garbage, but maybe there's something interesting inside?"
|
||||
density = TRUE
|
||||
layer = TABLE_LAYER
|
||||
climbable = TRUE
|
||||
pass_flags = LETPASSTHROW
|
||||
loot = list(
|
||||
SCAVENGING_FOUND_NOTHING = 50,
|
||||
SCAVENGING_SPAWN_MOUSE = 10,
|
||||
SCAVENGING_SPAWN_MICE = 5,
|
||||
SCAVENGING_SPAWN_TOM = 1,
|
||||
/obj/item/clothing/gloves/color/yellow = 0.5)
|
||||
unique_loot = list(/obj/item/clothing/gloves/color/yellow = 5, SCAVENGING_SPAWN_TOM = 1)
|
||||
|
||||
/obj/structure/loot_pile/maint/ComponentInitialize()
|
||||
var/static/safe_maint_items
|
||||
if(!safe_maint_items)
|
||||
safe_maint_items = list()
|
||||
for(var/A in GLOB.maintenance_loot)
|
||||
if(ispath(A, /obj/item))
|
||||
safe_maint_items[A] = GLOB.maintenance_loot[A]
|
||||
loot += safe_maint_items
|
||||
return ..()
|
||||
@@ -211,7 +211,7 @@
|
||||
/obj/structure/table/greyscale
|
||||
icon = 'icons/obj/smooth_structures/table_greyscale.dmi'
|
||||
icon_state = "table"
|
||||
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
|
||||
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS | MATERIAL_EFFECTS
|
||||
buildstack = null //No buildstack, so generate from mat datums
|
||||
|
||||
/*
|
||||
|
||||
@@ -152,8 +152,8 @@
|
||||
pod_moving = 0
|
||||
if(!QDELETED(pod))
|
||||
var/datum/gas_mixture/floor_mixture = loc.return_air()
|
||||
ARCHIVE_TEMPERATURE(floor_mixture)
|
||||
ARCHIVE_TEMPERATURE(pod.air_contents)
|
||||
ARCHIVE(floor_mixture)
|
||||
ARCHIVE(pod.air_contents)
|
||||
pod.air_contents.share(floor_mixture, 1) //mix the pod's gas mixture with the tile it's on
|
||||
air_update_turf()
|
||||
|
||||
|
||||
@@ -169,8 +169,7 @@
|
||||
if(do_after(user, 40, target = src))
|
||||
if(!src || !anchored || src.state != "01")
|
||||
return
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if(!CC.use(1))
|
||||
if(!W.use_tool(src, user, 0, 1))
|
||||
to_chat(user, "<span class='warning'>You need more cable to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You wire the windoor.</span>")
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
#define NOT_ELECTROCHROMATIC 0
|
||||
#define ELECTROCHROMATIC_OFF 1
|
||||
#define ELECTROCHROMATIC_DIMMED 2
|
||||
|
||||
GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
|
||||
/proc/do_electrochromatic_toggle(new_status, id)
|
||||
var/list/windows = GLOB.electrochromatic_window_lookup["[id]"]
|
||||
if(!windows)
|
||||
return
|
||||
var/obj/structure/window/W //define outside for performance because obviously this matters.
|
||||
for(var/i in windows)
|
||||
W = i
|
||||
new_status? W.electrochromatic_dim() : W.electrochromatic_off()
|
||||
|
||||
/obj/structure/window
|
||||
name = "window"
|
||||
desc = "A window."
|
||||
@@ -28,8 +43,15 @@
|
||||
rad_insulation = RAD_VERY_LIGHT_INSULATION
|
||||
rad_flags = RAD_PROTECT_CONTENTS
|
||||
|
||||
/// Electrochromatic status
|
||||
var/electrochromatic_status = NOT_ELECTROCHROMATIC
|
||||
/// Electrochromatic ID. Set the first character to ! to replace with a SSmapping generated pseudorandom obfuscated ID for mapping purposes.
|
||||
var/electrochromatic_id
|
||||
|
||||
/obj/structure/window/examine(mob/user)
|
||||
. = ..()
|
||||
if(electrochromatic_status != NOT_ELECTROCHROMATIC)
|
||||
. += "<span class='notice'>The window has electrochromatic circuitry on it.</span>"
|
||||
if(reinf)
|
||||
if(anchored && state == WINDOW_SCREWED_TO_FRAME)
|
||||
. += "<span class='notice'>The window is <b>screwed</b> to the frame.</span>"
|
||||
@@ -52,6 +74,10 @@
|
||||
if(reinf && anchored)
|
||||
state = WINDOW_SCREWED_TO_FRAME
|
||||
|
||||
if(mapload && electrochromatic_id)
|
||||
if(copytext(electrochromatic_id, 1, 2) == "!")
|
||||
electrochromatic_id = SSmapping.get_obfuscated_id(electrochromatic_id)
|
||||
|
||||
ini_dir = dir
|
||||
air_update_turf(1)
|
||||
|
||||
@@ -62,6 +88,12 @@
|
||||
real_explosion_block = explosion_block
|
||||
explosion_block = EXPLOSION_BLOCK_PROC
|
||||
|
||||
if(electrochromatic_status != NOT_ELECTROCHROMATIC)
|
||||
var/old = electrochromatic_status
|
||||
make_electrochromatic()
|
||||
if(old == ELECTROCHROMATIC_DIMMED)
|
||||
electrochromatic_dim()
|
||||
|
||||
/obj/structure/window/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS ,null,CALLBACK(src, .proc/can_be_rotated),CALLBACK(src,.proc/after_rotation))
|
||||
@@ -177,6 +209,24 @@
|
||||
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/electronics/electrochromatic_kit) && user.a_intent == INTENT_HELP)
|
||||
var/obj/item/electronics/electrochromatic_kit/K = I
|
||||
if(electrochromatic_status != NOT_ELECTROCHROMATIC)
|
||||
to_chat(user, "<span class='warning'>[src] is already electrochromatic!</span>")
|
||||
return
|
||||
if(anchored)
|
||||
to_chat(user, "<span class='warning'>[src] must not be attached to the floor!</span>")
|
||||
return
|
||||
if(!K.id)
|
||||
to_chat(user, "<span class='warning'>[K] has no ID set!</span>")
|
||||
return
|
||||
if(!user.temporarilyRemoveItemFromInventory(K))
|
||||
to_chat(user, "<span class='warning'>[K] is stuck to your hand!</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] upgrades [src] with [I].</span>", "<span class='notice'>You upgrade [src] with [I].</span>")
|
||||
make_electrochromatic(K.id)
|
||||
qdel(K)
|
||||
|
||||
if(!(flags_1&NODECONSTRUCT_1))
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
I.play_tool_sound(src, 75)
|
||||
@@ -224,6 +274,91 @@
|
||||
air_update_turf(TRUE)
|
||||
update_nearby_icons()
|
||||
|
||||
/obj/structure/window/proc/spraycan_paint(paint_color)
|
||||
if(color_hex2num(paint_color) < 255)
|
||||
set_opacity(255)
|
||||
else
|
||||
set_opacity(initial(opacity))
|
||||
add_atom_colour(paint_color, WASHABLE_COLOUR_PRIORITY)
|
||||
|
||||
/obj/structure/window/proc/electrochromatic_dim()
|
||||
if(electrochromatic_status == ELECTROCHROMATIC_DIMMED)
|
||||
return
|
||||
electrochromatic_status = ELECTROCHROMATIC_DIMMED
|
||||
animate(src, color = "#222222", time = 2)
|
||||
set_opacity(TRUE)
|
||||
|
||||
/obj/structure/window/proc/electrochromatic_off()
|
||||
if(electrochromatic_status == ELECTROCHROMATIC_OFF)
|
||||
return
|
||||
electrochromatic_status = ELECTROCHROMATIC_OFF
|
||||
var/current = color
|
||||
update_atom_colour()
|
||||
var/newcolor = color
|
||||
color = current
|
||||
animate(src, color = newcolor, time = 2)
|
||||
|
||||
/obj/structure/window/proc/remove_electrochromatic()
|
||||
electrochromatic_off()
|
||||
electrochromatic_status = NOT_ELECTROCHROMATIC
|
||||
if(!electrochromatic_id)
|
||||
return
|
||||
var/list/L = GLOB.electrochromatic_window_lookup["[electrochromatic_id]"]
|
||||
if(L)
|
||||
L -= src
|
||||
electrochromatic_id = null
|
||||
|
||||
/obj/structure/window/vv_edit_var(var_name, var_value)
|
||||
var/check_status
|
||||
if(var_name == NAMEOF(src, electrochromatic_id))
|
||||
if(electrochromatic_id && GLOB.electrochromatic_window_lookup["[electrochromatic_id]"])
|
||||
GLOB.electrochromatic_window_lookup[electrochromatic_id] -= src
|
||||
if(var_name == NAMEOF(src, electrochromatic_status))
|
||||
check_status = TRUE
|
||||
. = ..() //do this first incase it runtimes.
|
||||
if(var_name == NAMEOF(src, electrochromatic_id))
|
||||
if((electrochromatic_status != NOT_ELECTROCHROMATIC) && electrochromatic_id)
|
||||
LAZYINITLIST(GLOB.electrochromatic_window_lookup[electrochromatic_id])
|
||||
GLOB.electrochromatic_window_lookup[electrochromatic_id] += src
|
||||
if(check_status)
|
||||
if(electrochromatic_status == NOT_ELECTROCHROMATIC)
|
||||
remove_electrochromatic()
|
||||
return
|
||||
else if(electrochromatic_status == ELECTROCHROMATIC_OFF)
|
||||
if(!electrochromatic_id)
|
||||
return
|
||||
else
|
||||
make_electrochromatic()
|
||||
electrochromatic_off()
|
||||
return
|
||||
else if(electrochromatic_status == ELECTROCHROMATIC_DIMMED)
|
||||
if(!electrochromatic_id)
|
||||
return
|
||||
else
|
||||
make_electrochromatic()
|
||||
electrochromatic_dim()
|
||||
return
|
||||
else
|
||||
remove_electrochromatic()
|
||||
|
||||
/obj/structure/window/proc/make_electrochromatic(new_id = electrochromatic_id)
|
||||
remove_electrochromatic()
|
||||
if(!new_id)
|
||||
CRASH("Attempted to make electrochromatic with null ID.")
|
||||
electrochromatic_id = new_id
|
||||
electrochromatic_status = ELECTROCHROMATIC_OFF
|
||||
LAZYINITLIST(GLOB.electrochromatic_window_lookup["[electrochromatic_id]"])
|
||||
GLOB.electrochromatic_window_lookup[electrochromatic_id] |= src
|
||||
|
||||
/obj/structure/window/update_atom_colour()
|
||||
if((electrochromatic_status != ELECTROCHROMATIC_OFF) && (electrochromatic_status != ELECTROCHROMATIC_DIMMED))
|
||||
return FALSE
|
||||
. = ..()
|
||||
if(color && (color_hex2num(color) < 255))
|
||||
set_opacity(255)
|
||||
else
|
||||
set_opacity(FALSE)
|
||||
|
||||
/obj/structure/window/proc/check_state(checked_state)
|
||||
if(state == checked_state)
|
||||
return TRUE
|
||||
@@ -263,7 +398,6 @@
|
||||
if(BURN)
|
||||
playsound(src, 'sound/items/Welder.ogg', 100, 1)
|
||||
|
||||
|
||||
/obj/structure/window/deconstruct(disassembled = TRUE)
|
||||
if(QDELETED(src))
|
||||
return
|
||||
@@ -272,6 +406,9 @@
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
for(var/obj/item/shard/debris in spawnDebris(drop_location()))
|
||||
transfer_fingerprints_to(debris) // transfer fingerprints to shards only
|
||||
if(electrochromatic_status != NOT_ELECTROCHROMATIC) //eh fine keep your kit.
|
||||
new /obj/item/electronics/electrochromatic_kit(drop_location())
|
||||
// Intentionally not setting the ID so you can't decon one to know all of the IDs.
|
||||
qdel(src)
|
||||
update_nearby_icons()
|
||||
|
||||
@@ -315,9 +452,9 @@
|
||||
density = FALSE
|
||||
air_update_turf(1)
|
||||
update_nearby_icons()
|
||||
remove_electrochromatic()
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/window/Move()
|
||||
var/turf/T = loc
|
||||
. = ..()
|
||||
@@ -731,7 +868,6 @@
|
||||
set_opacity(TRUE)
|
||||
queue_smooth(src)
|
||||
|
||||
|
||||
/obj/structure/window/paperframe/attackby(obj/item/W, mob/user)
|
||||
if(W.get_temperature())
|
||||
fire_act(W.get_temperature())
|
||||
@@ -749,3 +885,7 @@
|
||||
return
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
#undef NOT_ELECTROCHROMATIC
|
||||
#undef ELECTROCHROMATIC_OFF
|
||||
#undef ELECTROCHROMATIC_DIMMED
|
||||
|
||||
Reference in New Issue
Block a user