mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Merge pull request #11299 from Kyep/ssd_auto_cryo_option
Better SSD management
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
var/received_irc_pm = -99999
|
||||
var/irc_admin //IRC admin that spoke with them last.
|
||||
var/mute_irc = 0
|
||||
|
||||
var/ssd_warning_acknowledged = FALSE
|
||||
|
||||
////////////////////////////////////
|
||||
//things that require the database//
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#define MIN_CLIENT_VERSION 0 //Just an ambiguously low version for now, I don't want to suddenly stop people playing.
|
||||
//I would just like the code ready should it ever need to be used.
|
||||
#define SUGGESTED_CLIENT_VERSION 511 // only integers (e.g: 510, 511) useful here. Does not properly handle minor versions (e.g: 510.58, 511.848)
|
||||
#define SSD_WARNING_TIMER 30 // cycles, not seconds, so 30=60s
|
||||
|
||||
/*
|
||||
When somebody clicks a link in game, this Topic is called first.
|
||||
@@ -225,6 +226,9 @@
|
||||
vote_on_poll(pollid, optionid, 1)
|
||||
src << browse(null, "window=playerpoll")
|
||||
handle_player_polling()
|
||||
if(href_list["ssdwarning"])
|
||||
ssd_warning_acknowledged = TRUE
|
||||
to_chat(src, "<span class='notice'>SSD warning acknowledged.</span>")
|
||||
|
||||
switch(href_list["action"])
|
||||
if("openLink")
|
||||
@@ -770,3 +774,16 @@
|
||||
winset(src, "rpane.changelog", "background-color=#40628a;text-color=#FFFFFF")
|
||||
else
|
||||
winset(src, "rpane.changelog", "background-color=none;text-color=#000000")
|
||||
|
||||
|
||||
/client/proc/send_ssd_warning(mob/M)
|
||||
if(!config.ssd_warning)
|
||||
return FALSE
|
||||
if(ssd_warning_acknowledged)
|
||||
return FALSE
|
||||
if(M && M.player_logged < SSD_WARNING_TIMER)
|
||||
return FALSE
|
||||
to_chat(src, "Interacting with SSD players is against server rules unless you've ahelped first for permission. If you have, <a href='byond://?src=[UID()];ssdwarning=accepted'>confirm that</A> and proceed.")
|
||||
return TRUE
|
||||
|
||||
#undef SSD_WARNING_TIMER
|
||||
@@ -38,6 +38,7 @@
|
||||
regenerate_icons() // Make sure the inventory updates
|
||||
|
||||
handle_ghosted()
|
||||
handle_ssd()
|
||||
|
||||
/mob/living/carbon/human/proc/handle_ghosted()
|
||||
if(player_ghosted > 0 && stat == CONSCIOUS && job && !restrained())
|
||||
@@ -48,6 +49,22 @@
|
||||
if(player_ghosted % 150 == 0)
|
||||
force_cryo_human(src)
|
||||
|
||||
/mob/living/carbon/human/proc/handle_ssd()
|
||||
if(player_logged > 0 && stat != DEAD && job)
|
||||
player_logged++
|
||||
if(istype(loc, /obj/machinery/cryopod))
|
||||
return
|
||||
if(config.auto_cryo_ssd_mins && (player_logged >= (config.auto_cryo_ssd_mins * 30)) && player_logged % 30 == 0)
|
||||
var/turf/T = get_turf(src)
|
||||
if(!is_station_level(T.z))
|
||||
return
|
||||
var/area/A = get_area(src)
|
||||
if(cryo_ssd(src))
|
||||
var/obj/effect/portal/P = new /obj/effect/portal(T, null, null, 40)
|
||||
P.name = "NT SSD Teleportation Portal"
|
||||
if(A.fast_despawn)
|
||||
force_cryo_human(src)
|
||||
|
||||
/mob/living/carbon/human/calculate_affecting_pressure(var/pressure)
|
||||
..()
|
||||
var/pressure_difference = abs( pressure - ONE_ATMOSPHERE )
|
||||
|
||||
@@ -901,13 +901,18 @@ var/list/slot_equipment_priority = list( \
|
||||
/mob/MouseDrop(mob/M as mob)
|
||||
..()
|
||||
if(M != usr) return
|
||||
if(isliving(M)) // Ewww
|
||||
if(isliving(M))
|
||||
var/mob/living/L = M
|
||||
if(L.mob_size <= MOB_SIZE_SMALL)
|
||||
return // Stops pAI drones and small mobs (borers, parrots, crabs) from stripping people. --DZD
|
||||
if(!M.can_strip) return
|
||||
if(usr == src) return
|
||||
if(!Adjacent(usr)) return
|
||||
if(!M.can_strip)
|
||||
return
|
||||
if(usr == src)
|
||||
return
|
||||
if(!Adjacent(usr))
|
||||
return
|
||||
if(isLivingSSD(src) && M.client && M.client.send_ssd_warning(src))
|
||||
return
|
||||
show_inv(usr)
|
||||
|
||||
/mob/proc/can_use_hands()
|
||||
|
||||
Reference in New Issue
Block a user