Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Delta SM Space Drop #685

Merged
merged 20 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
637 changes: 323 additions & 314 deletions _maps/map_files220/delta/delta.dmm

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions modular_ss220/modular_ss220.dme
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
#include "radio_sound/radio_sound.dme"
#include "screentip_change/_screentip_change.dme"
#include "smart_equip_targeted/_smart_equip_targeted.dme"
#include "sm_space_drop/sm_space_drop.dme"
#include "text_to_speech/_tts.dme"
#include "title_screen/_title_screen.dme"
#include "whitelist/_whitelist.dme"
Expand Down
23 changes: 23 additions & 0 deletions modular_ss220/sm_space_drop/code/paper_sm_info.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Инструкция пользование системы сброса СМ

/obj/item/paper/sm_paper
name = "\improper инструкция по использованию СБСКС"
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "paper"
info = {"<center><h1>Инструкция по использованию Системы Быстрого Сброса Кристала Суперматерии</h1></center>
<br>1. Ни при каких обстоятельствах не нажимать на кнопку ради проверки ее работоспособности.<br>

<br>2. Решение о сбросе кристала может принимать СЕ, или его ВРиО и выше.<br>
GREG-MAP marked this conversation as resolved.
Show resolved Hide resolved

<br>3. Если целостность кристала равна 10 или мение процентов, должен быть произведен сброс кристала в кратчайшее время.<br>

<br>4. В случае отсутствия СЕ и до назначения его ВРиО, решение о сбросе кристала принимает капитан.<br>

<br>5. Создание помехи при неообходимости сброса кристала квалифицируется статьей 400 Космического Закона.<br>

<br>Поздравляю! Теперь в случае вероятности взрыва кристала Супер Материи, вы в состоянии сохранить целостность станции.<br>

<br>ПРИМЕЧАНИЕ: Кнопка сброса СМ находится в его буферной зоне на стене возле правого вента.<br>
<hr>
<center><h1><div style='text-align:center;'><img src='ntlogo.png'></h1></center>
"}
dj-34 marked this conversation as resolved.
Show resolved Hide resolved
98 changes: 98 additions & 0 deletions modular_ss220/sm_space_drop/code/sm_button_NEW.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@

//////////////////////////////////////
// СБССМ Кнопки //
//////////////////////////////////////

/obj/machinery/driver_button/sm_drop_button
name = "supermatter launch trigger"
GREG-MAP marked this conversation as resolved.
Show resolved Hide resolved
desc = "<font color='red'>ВНИМАНИЕ:</font>Сброс кристала суперматерии. Неправомерное использование может привести к тюремному заключению."
GREG-MAP marked this conversation as resolved.
Show resolved Hide resolved
icon = 'modular_ss220/sm_space_drop/icons/sm_buttons.dmi'
icon_state = "button"
anchored = TRUE
armor = list(melee = 50, bullet = 50, laser = 50, energy = 50, bomb = 10, rad = 100, fire = 90, acid = 70)
idle_power_consumption = 2
active_power_consumption = 4
resistance_flags = LAVA_PROOF | FIRE_PROOF
id_tag = "SpaceDropSM"
req_access = list(ACCESS_CE)

var/glass = TRUE
var/launched = FALSE

// In case we're annihilated by a meteor
/obj/machinery/driver_button/sm_drop_button/Destroy()
if(!launched)
launch_sequence()
return ..()


/obj/machinery/driver_button/sm_drop_button/update_icon()
if(launched)
icon_state = "[initial(icon_state)]_launched"
else if(!glass)
icon_state = "[initial(icon_state)]_open"
else
icon_state = "[initial(icon_state)]"
..()

/obj/machinery/driver_button/sm_drop_button/attack_hand(mob/user)
if(stat & (NOPOWER|BROKEN))
return

if(active)
return

add_fingerprint(user)

if(!allowed(usr))
return

use_power(5)

// Already launched
if(launched)
to_chat(user, "<span class='warning'>Кнопку уже нажали.</span>")
GREG-MAP marked this conversation as resolved.
Show resolved Hide resolved

// Glass present
else if(glass)
if(user.a_intent == INTENT_HARM)
user.custom_emote(EMOTE_VISIBLE, "разбивает стекло [src.name]!")
glass = FALSE
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 100, 1)
update_icon()
else
user.custom_emote(EMOTE_VISIBLE, "дружески похлопывает по [src.name].")
to_chat(user, span_warning("Если вы пытаетесь разбить стекло, вам придется ударить по нему сильнее..."))
// Must be !glass and !launched
else
user.custom_emote(EMOTE_VISIBLE, "нажимает кнопку сброса [src.name]!")
visible_message(span_notice("Кнопка громко щелкает."))
launch_sequence()
GREG-MAP marked this conversation as resolved.
Show resolved Hide resolved
playsound(src, pick('modular_ss220/sm_space_drop/sound/button.ogg','modular_ss220/sm_space_drop/sound/button1.ogg','modular_ss220/sm_space_drop/sound/button2.ogg','modular_ss220/sm_space_drop/sound/button3.ogg','modular_ss220/sm_space_drop/sound/button4.ogg'), 100, 1)
update_icon()

if(SSticker && SSticker.current_state == GAME_STATE_PLAYING)
var/area/area = get_area(src)
if(area)
message_admins("Supermatter crystal reset activated(<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>[area.name]</a>)")
GREG-MAP marked this conversation as resolved.
Show resolved Hide resolved
log_game("Supermatter crystal reset activated([area.name])")
GREG-MAP marked this conversation as resolved.
Show resolved Hide resolved
investigate_log("<font color='red'>active</font> at ([area.name])","supermatter")
GREG-MAP marked this conversation as resolved.
Show resolved Hide resolved

/obj/machinery/driver_button/sm_drop_button/launch_sequence()
if(launched)
return
launched = TRUE
update_icon()

for(var/obj/machinery/atmospherics/supermatter_crystal/engine/crystal in SSair.atmos_machinery)
if(crystal.id_tag == id_tag)
crystal.anchored = FALSE
break

..()

/obj/machinery/driver_button/sm_drop_button/rearm()
active = FALSE

/obj/machinery/driver_button/drop_sm/multitool_act(mob/user, obj/item/I)
return FALSE
14 changes: 14 additions & 0 deletions modular_ss220/sm_space_drop/code/sm_mass_driver.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/obj/machinery/mass_driver/sm_mass_driver
name = "\improper пусковая установка СМ"
desc = "Запускает СМ бороздить просторы космоса."
icon = 'icons/obj/objects.dmi'
icon_state = "mass_driver"
anchored = TRUE
idle_power_consumption = 2
active_power_consumption = 50
resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF

id_tag = "SpaceDropSM"

/obj/machinery/sm_mass_driver/multitool_act(mob/user, obj/item/I)
return FALSE
4 changes: 4 additions & 0 deletions modular_ss220/sm_space_drop/code/sm_space_drop.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/obj/machinery/atmospherics/supermatter_crystal/engine
is_main_engine = TRUE
anchored = TRUE
var/id_tag = "SpaceDropSM"
Binary file added modular_ss220/sm_space_drop/icons/sm_buttons.dmi
Binary file not shown.
4 changes: 4 additions & 0 deletions modular_ss220/sm_space_drop/sm_space_drop.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/datum/modpack/sm_space_drop
name = "Система сброса СМ"
desc = "Позволяет сбросить СМ в критической ситуации."
author = "GREG"
6 changes: 6 additions & 0 deletions modular_ss220/sm_space_drop/sm_space_drop.dme
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "sm_space_drop.dm"

#include "code/sm_button_NEW.dm"
#include "code/sm_space_drop.dm"
#include "code/sm_mass_driver.dm"
#include "code/paper_sm_info.dm"
Binary file added modular_ss220/sm_space_drop/sound/button.ogg
Binary file not shown.
Binary file added modular_ss220/sm_space_drop/sound/button1.ogg
Binary file not shown.
Binary file added modular_ss220/sm_space_drop/sound/button2.ogg
Binary file not shown.
Binary file added modular_ss220/sm_space_drop/sound/button3.ogg
Binary file not shown.
Binary file added modular_ss220/sm_space_drop/sound/button4.ogg
Binary file not shown.