Skip to content

Commit

Permalink
Починил Суперматерию, Хамелеонку, Бесконечный Отель для Гост-Ролей и …
Browse files Browse the repository at this point in the history
…Логи.
  • Loading branch information
SmiLeYre committed Jul 10, 2023
1 parent 9ce00e4 commit d5a00c6
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 47 deletions.
33 changes: 13 additions & 20 deletions code/__HELPERS/_logging.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,26 +50,19 @@


/* Items with ADMINPRIVATE prefixed are stripped from public logs. */
/proc/log_admin(text)
GLOB.admin_log.Add(text)
if (CONFIG_GET(flag/log_admin))
WRITE_LOG(GLOB.world_game_log, "ADMIN: [text]")
WRITE_LOG(GLOB.admin_log, "ADMIN: [text]")

/proc/log_admin_private(text)
GLOB.admin_log.Add(text)
if (CONFIG_GET(flag/log_admin))
WRITE_LOG(GLOB.world_game_log, "ADMINPRIVATE: [text]")
WRITE_LOG(GLOB.admin_log, "ADMIN: [text]")

/proc/log_adminsay(text)
GLOB.admin_log.Add(text)
if (CONFIG_GET(flag/log_adminchat))
WRITE_LOG(GLOB.world_game_log, "ADMINPRIVATE: ASAY: [text]")

/proc/log_dsay(text)
if (CONFIG_GET(flag/log_adminchat))
WRITE_LOG(GLOB.world_game_log, "ADMIN: DSAY: [text]")
/proc/log_admin(text, list/data)
WRITE_LOG(GLOB.world_game_log, "ADMIN: [text]")
WRITE_LOG(GLOB.admin_log, "ADMIN: [text]")

/proc/log_admin_private(text, list/data)
WRITE_LOG(GLOB.world_game_log, "ADMINPRIVATE: [text]")
WRITE_LOG(GLOB.admin_log, "ADMIN: [text]")

/proc/log_adminsay(text, list/data)
WRITE_LOG(GLOB.world_game_log, "ADMINPRIVATE: ASAY: [text]")

/proc/log_dsay(text, list/data)
WRITE_LOG(GLOB.world_game_log, "ADMIN: DSAY: [text]")

/proc/log_consent(text)
WRITE_LOG(GLOB.world_game_log, "CONSENT: [text]")
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/structures/ghost_role_spawners.dm
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@
/obj/effect/mob_spawn/human/hotel_staff/special(mob/living/carbon/human/new_spawn)
. = ..()
ADD_TRAIT(new_spawn,TRAIT_EXEMPT_HEALTH_EVENTS,GHOSTROLE_TRAIT)
new_spawn.mind.add_antag_datum(/datum/antagonist/ghost_role)

/obj/effect/mob_spawn/human/demonic_friend
name = "Essence of friendship"
Expand Down
1 change: 1 addition & 0 deletions code/modules/clothing/chameleon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ CHAMELEON_CLOTHING_DEFINE(/obj/item/clothing/suit/chameleon)
item_state = "armor"
blood_overlay_type = "armor"
resistance_flags = NONE
mutantrace_variation = STYLE_NO_ANTHRO_ICON | STYLE_DIGITIGRADE
armor = list(MELEE = 10, BULLET = 10, LASER = 10, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 50)

var/datum/action/item_action/chameleon/change/chameleon_action
Expand Down
16 changes: 8 additions & 8 deletions code/modules/power/supermatter/supermatter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
var/damage_penalty_point = 550

///A scaling value that affects the severity of explosions.
var/explosion_power = 40
var/explosion_power = 35
///Time in 1/10th of seconds since the last sent warning
var/lastwarning = 0
///Refered to as eer on the moniter. This value effects gas output, heat, damage, and radiation.
Expand Down Expand Up @@ -291,7 +291,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)

var/integrity = get_integrity()
if(integrity < SUPERMATTER_DELAM_PERCENT)
//SSredbot.send_discord_message("admin","The supermatter has just delaminated.","round ending event")
SSredbot.send_discord_message("admin","The supermatter has just delaminated.","round ending event")
return SUPERMATTER_DELAMINATING

if(integrity < SUPERMATTER_EMERGENCY_PERCENT)
Expand Down Expand Up @@ -789,7 +789,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
else
murder = S.attack_verb_continuous
dust_mob(S, \
"<span class='danger'>[S] unwisely [murder] [src], and [S.ru_ego()] body burns brilliantly before flashing into ash!</span>", \
"<span class='danger'>[S] unwisely [murder] [src], and [S.p_their()] body burns brilliantly before flashing into ash!</span>", \
"<span class='userdanger'>You unwisely touch [src], and your vision glows brightly as your body crumbles to dust. Oops.</span>", \
"simple animal attack")

Expand All @@ -808,7 +808,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
if(nom.incorporeal_move || nom.status_flags & GODMODE) //try to keep supermatter sliver's + hemostat's dust conditions in sync with this too
return
if(!vis_msg)
vis_msg = "<span class='danger'>[nom] reaches out and touches [src], inducing a resonance... [nom.ru_ego()] body starts to glow and burst into flames before flashing into dust!</span>"
vis_msg = "<span class='danger'>[nom] reaches out and touches [src], inducing a resonance... [nom.p_their()] body starts to glow and burst into flames before flashing into dust!</span>"
if(!mob_msg)
mob_msg = "<span class='userdanger'>You reach out and touch [src]. Everything starts burning and all you can hear is ringing. Your last thought is \"That was not a wise decision.\"</span>"
if(!cause)
Expand Down Expand Up @@ -875,7 +875,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
radiation_pulse(src, 150, 4)

else if(Adjacent(user)) //if the item is stuck to the person, kill the person too instead of eating just the item.
var/vis_msg = "<span class='danger'>[user] reaches out and touches [src] with [W], inducing a resonance... [W] starts to glow briefly before the light continues up to [user]'s body. [user.ru_who(TRUE)] bursts into flames before flashing into dust!</span>"
var/vis_msg = "<span class='danger'>[user] reaches out and touches [src] with [W], inducing a resonance... [W] starts to glow briefly before the light continues up to [user]'s body. [user.p_they(TRUE)] bursts into flames before flashing into dust!</span>"
var/mob_msg = "<span class='userdanger'>You reach out and touch [src] with [W]. Everything starts burning and all you can hear is ringing. Your last thought is \"That was not a wise decision.\"</span>"
dust_mob(user, vis_msg, mob_msg)

Expand All @@ -887,7 +887,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)

/obj/machinery/power/supermatter_crystal/Bumped(atom/movable/AM)
if(isliving(AM))
AM.visible_message("<span class='danger'>\The [AM] slams into \the [src] inducing a resonance... [AM.ru_ego()] body starts to glow and burst into flames before flashing into dust!</span>",\
AM.visible_message("<span class='danger'>\The [AM] slams into \the [src] inducing a resonance... [AM.p_their()] body starts to glow and burst into flames before flashing into dust!</span>",\
"<span class='userdanger'>You slam into \the [src] as your ears are filled with unearthly ringing. Your last thought is \"Oh, fuck.\"</span>",\
"<span class='hear'>You hear an unearthly noise as a wave of heat washes over you.</span>")
else if(isobj(AM) && !iseffect(AM))
Expand Down Expand Up @@ -953,7 +953,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
playsound(T, 'sound/effects/supermatter.ogg', 50, 1)
T.visible_message("<span class='danger'>[T] smacks into [src] and rapidly flashes to ash.</span>",\
"<span class='italics'>You hear a loud crack as you are washed with a wave of heat.</span>")
CALCULATE_ADJACENT_TURFS(T)
T.ImmediateCalculateAdjacentTurfs()

//Do not blow up our internal radio
/obj/machinery/power/supermatter_crystal/contents_explosion(severity, target, origin)
Expand All @@ -969,7 +969,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
icon_state = "darkmatter_shard"
anchored = FALSE
gasefficency = 0.125
explosion_power = 15
explosion_power = 12
layer = ABOVE_MOB_LAYER
moveable = TRUE

Expand Down
3 changes: 0 additions & 3 deletions config/maps.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ endmap
map smolstation
endmap

map snaxiteststation
endmap

map taustation
endmap

Expand Down
9 changes: 7 additions & 2 deletions modular_bluemoon/SmiLeY/code/hilbertshotel_ghost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@
if(.)
return
if(user.mind?.antag_datums)
to_chat(user, "<span class='warning'>Your special role doesn't allow you to enter infinity dormitory.</span>")
return //you can't enter infinity dormitories if you are a role
if(user.mind?.has_antag_datum(/datum/antagonist/ghost_role))
return promptAndCheckIn(user, user)
if(user.mind?.has_antag_datum(/datum/antagonist/ashwalker))
return promptAndCheckIn(user, user)
else
to_chat(user, "<span class='warning'>Your special role doesn't allow you to enter infinity dormitory.</span>")
return //you can't enter infinity dormitories if you are a role
return promptAndCheckIn(user, user)

/datum/map_template/ghost_cafe_rooms
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/obj/item/hilbertshotel/ghostdojo/attack_robot(mob/user)
. = ..()
interact(user)
return attack_hand(user)
2 changes: 1 addition & 1 deletion modular_splurt/code/datums/ruins/station.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
/datum/map_template/ruin/station/box/engine/diy_sm
id = "engine_diy_sm"
suffix = "Box/Engine/engine_diy_sm.dmm"
name = "Box DIY SM"
name = "Box DIY_SM"
35 changes: 22 additions & 13 deletions modular_splurt/code/modules/power/supermatter/supermatter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ Our Solutions:
Our Method:
• Override the supermatter's explode() proc to respect the bombcap.
• Scan through the player list an count how many alive engineers are there. If you sign up as an engineer, you consent to fixing the damage.
Custom Bombcaps:
• Small Delam: 1, 2, 5
• Medium Delam: 2, 3, 10
• Big Delam: 3, 5, 15
*/

#define EXPLOSION_MODIFIER_SMALL 1
#define EXPLOSION_MODIFIER_MEDIUM 2
#define EXPLOSION_MODIFIER_LARGE 3
#define EXPLOSION_MODIFIER_SMALL 2
#define EXPLOSION_MODIFIER_MEDIUM 5
#define EXPLOSION_MODIFIER_LARGE 10

// Let's turn the base explosion power down a little...
/obj/machinery/power/supermatter_crystal
Expand Down Expand Up @@ -77,30 +81,35 @@ Our Method:
alive_engineers++
switch(alive_engineers)

// DELAMINATION A: Too few engineers, minimal explosion.
if(1)
// DELAMINATION A: No engineers, no explosion.
if(0)
investigate_log("has delaminated, but there are no engineers! Removing with no explosion.", INVESTIGATE_SUPERMATTER)
priority_announce("A supermatter crystal delamination has been detected. Crystal hyperstructure has collapsed safely, resulting in a success complete self-annihilation of the supermatter entity.", "CRYSTAL DELAMINATION DETECTED!")
qdel(src)
return
// DELAMINATION B: Too few engineers, minimal explosion.
if(1 to 2)
investigate_log("has delaminated, but there are only [alive_engineers] engineers! Defaulting to minimum explosion.", INVESTIGATE_SUPERMATTER)
priority_announce("A supermatter crystal delamination has been detected. Crystal hyperstructure has collapsed within safety tolerance, resulting in majority self-annihilation.", "CRYSTAL DELAMINATION DETECTED!")
explosion(get_turf(src), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_SMALL), 1, 2), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_SMALL), 1, 2), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_SMALL), 3, 10), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_SMALL), 5, 20), TRUE, FALSE)
explosion(get_turf(src), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_SMALL), 0, 2), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_SMALL), 0, 2), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_SMALL), 3, 5), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_SMALL), 5, 15), TRUE, FALSE)
qdel(src)
return
// DELAMINATION B: Enough engineers, halved explosion size.
if(2)
// DELAMINATION C: Enough engineers, halved explosion size.
if(3 to 4)
investigate_log("has delaminated with [alive_engineers] engineers, explosion size has been halved!", INVESTIGATE_SUPERMATTER)
priority_announce("A supermatter crystal delamination has been detected. Crystal hyperstructure did not complete a controlled collapse.", "CRYSTAL DELAMINATION DETECTED!")
explosion(get_turf(src), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_MEDIUM), 2, 4), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_MEDIUM), 2, 8), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_MEDIUM), 3, 20), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_MEDIUM), 5, 40), TRUE, FALSE)
explosion(get_turf(src), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_MEDIUM), 0, 2), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_MEDIUM), 1, 4), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_MEDIUM), 3, 10), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_MEDIUM), 5, 20), TRUE, FALSE)
qdel(src)
return
// DELAMINATION C:
if(3 to INFINITY)
// DELAMINATION D:
if(5 to INFINITY)
investigate_log("has delaminated with full effect due to there being [alive_engineers] engineers.", INVESTIGATE_SUPERMATTER)
priority_announce("A supermatter crystal delamination has been detected. Crystal hyperstructure has failed catastrophically.", sender_override="CRYSTAL DELAMINATION DETECTED!")
explosion(get_turf(src), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_LARGE), 4, 8), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_LARGE), 4, 16), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_LARGE), 3, 30), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_LARGE), 5, 60), TRUE, FALSE)
explosion(get_turf(src), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_LARGE), 1, 3), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_LARGE), 2, 7), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_LARGE), 3, 15), clamp(((explosion_power*gasmix_power_ratio)*EXPLOSION_MODIFIER_LARGE), 5, 30), TRUE, FALSE)
qdel(src)
return
if(null)
investigate_log("tried to delaminate, but there are... null alive engineers? [alive_engineers] <- that", INVESTIGATE_SUPERMATTER)
priority_announce("A supermatter crystal delamination has been detected. Crystal hyperstructure has collapsed safely, resulting in a success complete self-annihilation of the supermatter entity.", "CRYSTAL DELAMINATION DETECTED!")
qdel(src)
return

Expand Down

0 comments on commit d5a00c6

Please sign in to comment.