Merge remote-tracking branch 'citadel/master' into mobility_flags

This commit is contained in:
kevinz000
2020-01-19 23:12:17 -07:00
20 changed files with 167 additions and 126 deletions
+1
View File
@@ -110,6 +110,7 @@
#define HIDENECK (1<<10)
#define HIDETAUR (1<<11) //gotta hide that snowflake
#define HIDESNOUT (1<<12) //or do we actually hide our snoots
#define HIDEACCESSORY (1<<13) //hides the jumpsuit accessory.
//bitflags for clothing coverage - also used for limbs
#define HEAD (1<<0)
+1 -1
View File
@@ -178,7 +178,7 @@
if(!C.credits)
C.RollCredits()
C.playtitlemusic(40)
CONFIG_SET(flag/suicide_allowed,TRUE) // EORG suicides allowed
var/popcount = gather_roundend_feedback()
display_report(popcount)
@@ -408,3 +408,5 @@
/datum/config_entry/number/dropped_modes
config_entry_value = 3
/datum/config_entry/flag/suicide_allowed
@@ -22,6 +22,8 @@
if(!(M.ckey in timeouts))
timeouts += M.ckey
timeouts[M.ckey] = 0
else if(timeouts[M.ckey] == CANT_REENTER_ROUND)
return
timeouts[M.ckey] = max(timeouts[M.ckey],penalty)
/datum/element/ghost_role_eligibility/Detach(mob/M)
+36 -4
View File
@@ -185,7 +185,6 @@
body += "<A href='?_src_=holder;[HrefToken()];simplemake=shade;mob=[REF(M)]'>Shade</A>"
body += "<br>"
if (M.client)
body += "<br><br>"
body += "<b>Other actions:</b>"
body += "<br>"
@@ -194,9 +193,9 @@
body += "<A href='?_src_=holder;[HrefToken()];tdome2=[REF(M)]'>Thunderdome 2</A> | "
body += "<A href='?_src_=holder;[HrefToken()];tdomeadmin=[REF(M)]'>Thunderdome Admin</A> | "
body += "<A href='?_src_=holder;[HrefToken()];tdomeobserve=[REF(M)]'>Thunderdome Observer</A> | "
body += usr.client.citaPPoptions(M) // CITADEL
body += "<A href='?_src_=holder;[HrefToken()];makementor=[M.ckey]'>Make mentor</A> | "
body += "<A href='?_src_=holder;[HrefToken()];removementor=[M.ckey]'>Remove mentor</A>"
body += "<A href='?_src_=holder;[HrefToken()];makeeligible=[REF(M)]'>Allow reentering round</A>"
body += "<br>"
body += "</body></html>"
@@ -1009,3 +1008,36 @@
"Admin login: [key_name(src)]")
if(string)
message_admins("[string]")
/client/proc/cmd_admin_man_up(mob/M in GLOB.mob_list)
set category = "Special Verbs"
set name = "Man Up"
if(!M)
return
if(!check_rights(R_ADMIN))
return
to_chat(M, "<span class='warning bold reallybig'>Man up, and deal with it.</span><br><span class='warning big'>Move on.</span>")
M.playsound_local(M, 'sound/voice/manup.ogg', 50, FALSE, pressure_affected = FALSE)
log_admin("Man up: [key_name(usr)] told [key_name(M)] to man up")
var/message = "<span class='adminnotice'>[key_name_admin(usr)] told [key_name_admin(M)] to man up.</span>"
message_admins(message)
admin_ticket_log(M, message)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Man Up")
/client/proc/cmd_admin_man_up_global()
set category = "Special Verbs"
set name = "Man Up Global"
if(!check_rights(R_ADMIN))
return
to_chat(world, "<span class='warning bold reallybig'>Man up, and deal with it.</span><br><span class='warning big'>Move on.</span>")
for(var/mob/M in GLOB.player_list)
M.playsound_local(M, 'sound/voice/manup.ogg', 50, FALSE, pressure_affected = FALSE)
log_admin("Man up global: [key_name(usr)] told everybody to man up")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] told everybody to man up.</span>")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Man Up Global")
+68 -1
View File
@@ -22,7 +22,10 @@
if(!CheckAdminHref(href, href_list))
return
citaTopic(href, href_list) //CITADEL EDIT, MENTORS
if(href_list["makementor"])
makeMentor(href_list["makementor"])
else if(href_list["removementor"])
removeMentor(href_list["removementor"])
if(href_list["ahelp"])
if(!check_rights(R_ADMIN, TRUE))
@@ -1719,6 +1722,16 @@
log_admin("[key_name(usr)] forced [key_name(M)] to say: [speech]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] forced [key_name_admin(M)] to say: [speech]</span>")
else if(href_list["makeeligible"])
if(!check_rights(R_ADMIN))
return
var/mob/M = locate(href_list["makeeligible"])
if(!ismob(M))
to_chat(usr, "this can only be used on instances of type /mob.")
var/datum/element/ghost_role_eligibility/eli = SSdcs.GetElement(/datum/element/ghost_role_eligibility)
if(M.ckey in eli.timeouts)
eli.timeouts -= M.ckey
else if(href_list["sendtoprison"])
if(!check_rights(R_ADMIN))
return
@@ -2850,3 +2863,57 @@
dat += {"<A href='?src=[REF(src)];[HrefToken()];f_secret2=secret'>Random (default)</A><br>"}
dat += {"Now: [GLOB.secret_force_mode]"}
usr << browse(dat, "window=f_secret")
/datum/admins/proc/makeMentor(ckey)
if(!usr.client)
return
if (!check_rights(0))
return
if(!ckey)
return
var/client/C = GLOB.directory[ckey]
if(C)
if(check_rights_for(C, R_ADMIN,0))
to_chat(usr, "<span class='danger'>The client chosen is an admin! Cannot mentorize.</span>")
return
if(SSdbcore.Connect())
var/datum/DBQuery/query_get_mentor = SSdbcore.NewQuery("SELECT id FROM [format_table_name("mentor")] WHERE ckey = '[ckey]'")
if(query_get_mentor.NextRow())
to_chat(usr, "<span class='danger'>[ckey] is already a mentor.</span>")
return
var/datum/DBQuery/query_add_mentor = SSdbcore.NewQuery("INSERT INTO `[format_table_name("mentor")]` (`id`, `ckey`) VALUES (null, '[ckey]')")
if(!query_add_mentor.warn_execute())
return
var/datum/DBQuery/query_add_admin_log = SSdbcore.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added new mentor [ckey]');")
if(!query_add_admin_log.warn_execute())
return
else
to_chat(usr, "<span class='danger'>Failed to establish database connection. The changes will last only for the current round.</span>")
new /datum/mentors(ckey)
to_chat(usr, "<span class='adminnotice'>New mentor added.</span>")
/datum/admins/proc/removeMentor(ckey)
if(!usr.client)
return
if (!check_rights(0))
return
if(!ckey)
return
var/client/C = GLOB.directory[ckey]
if(C)
if(check_rights_for(C, R_ADMIN,0))
to_chat(usr, "<span class='danger'>The client chosen is an admin, not a mentor! Cannot de-mentorize.</span>")
return
C.remove_mentor_verbs()
C.mentor_datum = null
GLOB.mentors -= C
if(SSdbcore.Connect())
var/datum/DBQuery/query_remove_mentor = SSdbcore.NewQuery("DELETE FROM [format_table_name("mentor")] WHERE ckey = '[ckey]'")
if(!query_remove_mentor.warn_execute())
return
var/datum/DBQuery/query_add_admin_log = SSdbcore.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Removed mentor [ckey]');")
if(!query_add_admin_log.warn_execute())
return
else
to_chat(usr, "<span class='danger'>Failed to establish database connection. The changes will last only for the current round.</span>")
to_chat(usr, "<span class='adminnotice'>Mentor removed.</span>")
+3
View File
@@ -207,6 +207,9 @@
message_admins("[key_name(src)] (job: [src.job ? "[src.job]" : "None"]) [is_special_character(src) ? "(ANTAG!) " : ""][ghosting ? "ghosted" : "committed suicide"] at [AREACOORD(src)].")
/mob/living/proc/canSuicide()
if(!CONFIG_GET(flag/suicide_allowed))
to_chat(src, "Suicide is not enabled in the config.")
return FALSE
switch(stat)
if(CONSCIOUS)
return TRUE
+3
View File
@@ -91,6 +91,9 @@
if(user && notifyAttach)
to_chat(user, "<span class='notice'>You attach [I] to [src].</span>")
if((flags_inv & HIDEACCESSORY) || (A.flags_inv & HIDEACCESSORY))
return TRUE
var/accessory_color = attached_accessory.item_color
if(!accessory_color)
accessory_color = attached_accessory.icon_state
+11 -8
View File
@@ -370,22 +370,25 @@
/////////////////////
/obj/item/clothing/accessory/padding
name = "soft padding"
desc = "Some long sheets of padding to help soften the blows of a physical attacks."
name = "protective padding"
desc = "A soft padding meant to cushion the wearer from melee harm."
icon_state = "padding"
item_color = "nothing"
armor = list("melee" = 15, "bullet" = 10, "laser" = 0, "energy" = 0, "bomb" = 5, "bio" = 0, "rad" = 0, "fire" = -20, "acid" = 45)
armor = list("melee" = 20, "bullet" = 10, "laser" = 0, "energy" = 0, "bomb" = 5, "bio" = 0, "rad" = 0, "fire" = -20, "acid" = 45)
flags_inv = HIDEACCESSORY //hidden from indiscrete mob examines.
/obj/item/clothing/accessory/kevlar
name = "kevlar sheets"
desc = "Long thin sheets of kevlar to help resist bullets and some physical attacks."
name = "kevlar padding"
desc = "A layered kevlar padding meant to cushion the wearer from ballistic harm."
icon_state = "padding"
item_color = "nothing"
armor = list("melee" = 10, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 25)
flags_inv = HIDEACCESSORY
/obj/item/clothing/accessory/plastics
name = "underling plastic sheet"
desc = "A full body sheet of white plastic to help defuse lasers and energy based weapons."
name = "ablative padding"
desc = "A thin ultra-refractory composite padding meant to cushion the wearer from energy lasers harm."
icon_state = "plastics"
item_color = "nothing"
armor = list("melee" = 0, "bullet" = 0, "laser" = 20, "energy" = 10, "bomb" = 0, "bio" = 30, "rad" = 0, "fire" = 0, "acid" = -40)
armor = list("melee" = 0, "bullet" = 0, "laser" = 20, "energy" = 10, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 20, "acid" = -40)
flags_inv = HIDEACCESSORY
@@ -41,7 +41,7 @@
var/accessory_msg
if(istype(w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/U = w_uniform
if(U.attached_accessory)
if(U.attached_accessory && !(U.attached_accessory.flags_inv & HIDEACCESSORY) && !(U.flags_inv & HIDEACCESSORY))
accessory_msg += " with [icon2html(U.attached_accessory, user)] \a [U.attached_accessory]"
. += "[t_He] [t_is] wearing [w_uniform.get_examine_string(user)][accessory_msg]."
+12 -6
View File
@@ -29,6 +29,7 @@
var/burn_dam = 0
var/stamina_dam = 0
var/max_stamina_damage = 0
var/incoming_stam_mult = 1 //Multiplier for incoming staminaloss, decreases when taking staminaloss when the limb is disabled, resets back to 1 when limb is no longer disabled.
var/max_damage = 0
var/stam_heal_tick = 0 //per Life(). Defaults to 0 due to citadel changes
@@ -141,7 +142,7 @@
//Return TRUE to get whatever mob this is in to update health.
/obj/item/bodypart/proc/on_life()
if(stam_heal_tick && stamina_dam > DAMAGE_PRECISION) //DO NOT update health here, it'll be done in the carbon's life.
if(heal_damage(brute = 0, burn = 0, stamina = stam_heal_tick, only_robotic = FALSE, only_organic = FALSE, updating_health = FALSE))
if(heal_damage(brute = 0, burn = 0, stamina = (stam_heal_tick * (disabled ? 2 : 1)), only_robotic = FALSE, only_organic = FALSE, updating_health = FALSE))
. |= BODYPART_LIFE_UPDATE_HEALTH
//Applies brute and burn damage to the organ. Returns 1 if the damage-icon states changed at all.
@@ -153,7 +154,7 @@
var/dmg_mlt = CONFIG_GET(number/damage_multiplier)
brute = round(max(brute * dmg_mlt, 0),DAMAGE_PRECISION)
burn = round(max(burn * dmg_mlt, 0),DAMAGE_PRECISION)
stamina = round(max(stamina * dmg_mlt, 0),DAMAGE_PRECISION)
stamina = round(max((stamina * dmg_mlt) * incoming_stam_mult, 0),DAMAGE_PRECISION)
brute = max(0, brute - brute_reduction)
burn = max(0, burn - burn_reduction)
//No stamina scaling.. for now..
@@ -183,6 +184,9 @@
var/available_damage = max_damage - current_damage
stamina_dam += round(CLAMP(stamina, 0, min(max_stamina_damage - stamina_dam, available_damage)), DAMAGE_PRECISION)
if(disabled && stamina > 10)
incoming_stam_mult = max(0.01, incoming_stam_mult/(stamina*0.1))
if(owner && updating_health)
owner.updatehealth()
if(stamina > DAMAGE_PRECISION)
@@ -252,6 +256,8 @@
owner.update_health_hud() //update the healthdoll
owner.update_body()
owner.update_mobility()
if(!disabled)
incoming_stam_mult = 1
return TRUE
//Updates an organ's brute/burn states for use by update_damage_overlays()
@@ -645,7 +651,7 @@
held_index = 1
px_x = -6
px_y = 0
stam_heal_tick = 2
stam_heal_tick = 4
/obj/item/bodypart/l_arm/is_disabled()
if(HAS_TRAIT(owner, TRAIT_PARALYSIS_L_ARM))
@@ -705,7 +711,7 @@
held_index = 2
px_x = 6
px_y = 0
stam_heal_tick = 2
stam_heal_tick = 4
max_stamina_damage = 50
/obj/item/bodypart/r_arm/is_disabled()
@@ -765,7 +771,7 @@
body_damage_coeff = 0.75
px_x = -2
px_y = 12
stam_heal_tick = 2
stam_heal_tick = 4
max_stamina_damage = 50
var/blood_state = BLOOD_STATE_NOT_BLOODY
var/list/bloody_legs = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0)
@@ -826,7 +832,7 @@
px_x = 2
px_y = 12
max_stamina_damage = 50
stam_heal_tick = 2
stam_heal_tick = 4
var/blood_state = BLOOD_STATE_NOT_BLOODY
var/list/bloody_legs = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0)
@@ -23,21 +23,21 @@
/datum/uplink_item/suits/padding
name = "Soft Padding"
desc = "Padding to add to a jumpsuit to help against melee and bullets."
desc = "An inconspicious soft padding meant to be worn underneath jumpsuits, will cushion the user from melee harm."
item = /obj/item/clothing/accessory/padding
cost = 2
exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops)
/datum/uplink_item/suits/kevlar
name = "Kevlar sheets"
desc = "Kevlar sheets to add to jumpsuit to help against bullets and melee."
name = "Kevlar Padding"
desc = "An inconspicious kevlar padding meant to be worn underneath jumpsuits, will cushion the wearer from ballistic harm."
item = /obj/item/clothing/accessory/kevlar
cost = 2
exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops)
/datum/uplink_item/suits/plastic
name = "Plastic sheet"
desc = "Plastic body sheet to add to a jumpsuit to help against laser and energy harm."
name = "Ablative Padding"
desc = "An inconspicious ablative padding meant to be worn underneath jumpsuits, will cushion the wearer from energy lasers harm."
item = /obj/item/clothing/accessory/plastics
cost = 2
exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops)
+3
View File
@@ -597,3 +597,6 @@ MODETIER_VOTING
## Number of modes dropped by the modetier vote during mode selection, after vote.
DROPPED_MODES 3
## Whether the suicide verb is allowed.
# SUICIDE_ALLOWED
@@ -0,0 +1,4 @@
author: "Ghommie"
delete-after: True
changes:
- tweak: "Attached kevlar/soft/plastic padding accessories are now stealthier and will no longer be displayed on mob examine."
@@ -0,0 +1,6 @@
author: "Bhijn"
delete-after: True
changes:
- rscadd: "Limbs now regenerate their stamina faster while disabled"
- rscadd: "Limbs now have the same incoming stamina damage multiplier mechanics as spacemen, where the more staminaloss they take while disabled, the less staminaloss they'll take."
- balance: "Limbs have had their base stamina regen rate doubled to match the doubled stamina regen rate of standard spacemen."
@@ -0,0 +1,5 @@
author: "Putnam3145"
delete-after: True
changes:
- code_imp: "demodularized player panel code, mostly"
- admin: "added ghost role eligibility delay removal to player panel"
@@ -0,0 +1,4 @@
author: "Putnam3145"
delete-after: True
changes:
- config: "Added suicide to the config."
@@ -1,39 +0,0 @@
/client/proc/citaPPoptions(mob/M) // why is this client and not /datum/admins? noone knows, in PP src == client, instead of holder. wtf.
var/body = "<br>"
if(M.client)
body += "<A href='?_src_=holder;[HrefToken()];makementor=[M.ckey]'>Make mentor</A> | "
body += "<A href='?_src_=holder;[HrefToken()];removementor=[M.ckey]'>Remove mentor</A>"
return body
/client/proc/cmd_admin_man_up(mob/M in GLOB.mob_list)
set category = "Special Verbs"
set name = "Man Up"
if(!M)
return
if(!check_rights(R_ADMIN))
return
to_chat(M, "<span class='warning bold reallybig'>Man up, and deal with it.</span><br><span class='warning big'>Move on.</span>")
M.playsound_local(M, 'sound/voice/manup.ogg', 50, FALSE, pressure_affected = FALSE)
log_admin("Man up: [key_name(usr)] told [key_name(M)] to man up")
var/message = "<span class='adminnotice'>[key_name_admin(usr)] told [key_name_admin(M)] to man up.</span>"
message_admins(message)
admin_ticket_log(M, message)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Man Up")
/client/proc/cmd_admin_man_up_global()
set category = "Special Verbs"
set name = "Man Up Global"
if(!check_rights(R_ADMIN))
return
to_chat(world, "<span class='warning bold reallybig'>Man up, and deal with it.</span><br><span class='warning big'>Move on.</span>")
for(var/mob/M in GLOB.player_list)
M.playsound_local(M, 'sound/voice/manup.ogg', 50, FALSE, pressure_affected = FALSE)
log_admin("Man up global: [key_name(usr)] told everybody to man up")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] told everybody to man up.</span>")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Man Up Global")
@@ -1,59 +0,0 @@
/datum/admins/proc/citaTopic(href, href_list)
if(href_list["makementor"])
makeMentor(href_list["makementor"])
else if(href_list["removementor"])
removeMentor(href_list["removementor"])
/datum/admins/proc/makeMentor(ckey)
if(!usr.client)
return
if (!check_rights(0))
return
if(!ckey)
return
var/client/C = GLOB.directory[ckey]
if(C)
if(check_rights_for(C, R_ADMIN,0))
to_chat(usr, "<span class='danger'>The client chosen is an admin! Cannot mentorize.</span>")
return
if(SSdbcore.Connect())
var/datum/DBQuery/query_get_mentor = SSdbcore.NewQuery("SELECT id FROM [format_table_name("mentor")] WHERE ckey = '[ckey]'")
if(query_get_mentor.NextRow())
to_chat(usr, "<span class='danger'>[ckey] is already a mentor.</span>")
return
var/datum/DBQuery/query_add_mentor = SSdbcore.NewQuery("INSERT INTO `[format_table_name("mentor")]` (`id`, `ckey`) VALUES (null, '[ckey]')")
if(!query_add_mentor.warn_execute())
return
var/datum/DBQuery/query_add_admin_log = SSdbcore.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added new mentor [ckey]');")
if(!query_add_admin_log.warn_execute())
return
else
to_chat(usr, "<span class='danger'>Failed to establish database connection. The changes will last only for the current round.</span>")
new /datum/mentors(ckey)
to_chat(usr, "<span class='adminnotice'>New mentor added.</span>")
/datum/admins/proc/removeMentor(ckey)
if(!usr.client)
return
if (!check_rights(0))
return
if(!ckey)
return
var/client/C = GLOB.directory[ckey]
if(C)
if(check_rights_for(C, R_ADMIN,0))
to_chat(usr, "<span class='danger'>The client chosen is an admin, not a mentor! Cannot de-mentorize.</span>")
return
C.remove_mentor_verbs()
C.mentor_datum = null
GLOB.mentors -= C
if(SSdbcore.Connect())
var/datum/DBQuery/query_remove_mentor = SSdbcore.NewQuery("DELETE FROM [format_table_name("mentor")] WHERE ckey = '[ckey]'")
if(!query_remove_mentor.warn_execute())
return
var/datum/DBQuery/query_add_admin_log = SSdbcore.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Removed mentor [ckey]');")
if(!query_add_admin_log.warn_execute())
return
else
to_chat(usr, "<span class='danger'>Failed to establish database connection. The changes will last only for the current round.</span>")
to_chat(usr, "<span class='adminnotice'>Mentor removed.</span>")
-2
View File
@@ -3103,11 +3103,9 @@
#include "modular_citadel\code\game\machinery\wishgranter.dm"
#include "modular_citadel\code\game\objects\cit_screenshake.dm"
#include "modular_citadel\code\game\objects\effects\temporary_visuals\souldeath.dm"
#include "modular_citadel\code\modules\admin\admin.dm"
#include "modular_citadel\code\modules\admin\chat_commands.dm"
#include "modular_citadel\code\modules\admin\holder2.dm"
#include "modular_citadel\code\modules\admin\secrets.dm"
#include "modular_citadel\code\modules\admin\topic.dm"
#include "modular_citadel\code\modules\arousal\arousal.dm"
#include "modular_citadel\code\modules\arousal\genitals.dm"
#include "modular_citadel\code\modules\arousal\genitals_sprite_accessories.dm"