Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Ghommie-cit697
This commit is contained in:
@@ -40,8 +40,10 @@ GLOBAL_VAR_INIT(dynamic_stacking_limit, 90)
|
||||
GLOBAL_LIST_EMPTY(dynamic_forced_roundstart_ruleset)
|
||||
// Forced threat level, setting this to zero or higher forces the roundstart threat to the value.
|
||||
GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
|
||||
|
||||
// Storyteller picked by the voting.
|
||||
GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
|
||||
// Storyteller forced by admins during voting--will be used instead of above.
|
||||
GLOBAL_VAR_INIT(dynamic_forced_storyteller, null)
|
||||
|
||||
/datum/game_mode/dynamic
|
||||
name = "dynamic mode"
|
||||
@@ -164,7 +166,7 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
|
||||
|
||||
dat += "Current threat: <b>[threat]</b> <a href='?src=\ref[src];[HrefToken()];adjustthreat=1'>\[Adjust\]</A> <a href='?src=\ref[src];[HrefToken()];threatlog=1'>\[View Log\]</a><br/>"
|
||||
dat += "<br/>"
|
||||
dat += "Storyteller: <b>[storyteller.name]</b><br/>"
|
||||
dat += "Storyteller: <a href='?src=\ref[src];[HrefToken()];change_storyteller=1'><b>[storyteller.name]</b></a> <br/>"
|
||||
dat += "Parameters: centre = [GLOB.dynamic_curve_centre] ; width = [GLOB.dynamic_curve_width].<br/>"
|
||||
dat += "<i>On average, <b>[peaceful_percentage]</b>% of the rounds are more peaceful.</i><br/>"
|
||||
dat += "Forced extended: <a href='?src=\ref[src];[HrefToken()];forced_extended=1'><b>[GLOB.dynamic_forced_extended ? "On" : "Off"]</b></a><br/>"
|
||||
@@ -222,6 +224,15 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
|
||||
show_threatlog(usr)
|
||||
else if (href_list["stacking_limit"])
|
||||
GLOB.dynamic_stacking_limit = input(usr,"Change the threat limit at which round-endings rulesets will start to stack.", "Change stacking limit", null) as num
|
||||
else if (href_list["change_storyteller"])
|
||||
var/list/choices = list()
|
||||
for(var/T in config.storyteller_cache)
|
||||
var/datum/dynamic_storyteller/S = T
|
||||
choices[initial(S.name)] = T
|
||||
var/selected_storyteller = choices[input("Select storyteller:", "Storyteller", storyteller.name) as null|anything in choices]
|
||||
storyteller = new selected_storyteller
|
||||
storyteller.on_start()
|
||||
message_admins("[key_name(usr)] changed the storyteller to [storyteller].", 1)
|
||||
|
||||
admin_panel() // Refreshes the window
|
||||
|
||||
@@ -243,7 +254,7 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
|
||||
/datum/game_mode/dynamic/send_intercept()
|
||||
. = "<b><i>Central Command Status Summary</i></b><hr>"
|
||||
switch(round(threat_level))
|
||||
if(0 to 20)
|
||||
if(-INFINITY to 20)
|
||||
. += "<b>Peaceful Waypoint</b></center><BR>"
|
||||
. += "Your station orbits deep within controlled, core-sector systems and serves as a waypoint for routine traffic through Nanotrasen's trade empire. Due to the combination of high security, interstellar traffic, and low strategic value, it makes any direct threat of violence unlikely. Your primary enemies will be incompetence and bored crewmen: try to organize team-building events to keep staffers interested and productive. However, even deep in our territory there may be subversive elements, especially for such a high-value target as your station. Keep an eye out, but don't expect much trouble."
|
||||
set_security_level(SEC_LEVEL_GREEN)
|
||||
@@ -275,7 +286,7 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
|
||||
. += "<b>Black Orbit</b></center><BR>"
|
||||
. += "As part of a mandatory security protocol, we are required to inform you that as a result of your orbital pattern directly behind an astrological body (oriented from our nearest observatory), your station will be under decreased monitoring and support. It is anticipated that your extreme location and decreased surveillance could pose security risks. Avoid unnecessary risks and attempt to keep your station in one piece."
|
||||
set_security_level(SEC_LEVEL_AMBER)
|
||||
if(96 to 100)
|
||||
if(96 to INFINITY)
|
||||
. += "<b>Impending Doom</b></center><BR>"
|
||||
. += "Your station is somehow in the middle of hostile territory, in clear view of any enemy of the corporation. Your likelihood to survive is low, and station destruction is expected and almost inevitable. Secure any sensitive material and neutralize any enemy you will come across. It is important that you at least try to maintain the station.<BR>"
|
||||
. += "Good luck."
|
||||
@@ -346,6 +357,8 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
|
||||
SSblackbox.record_feedback("tally","dynamic_threat",peaceful_percentage,"Percent of same-vote rounds that are more peaceful")
|
||||
|
||||
/datum/game_mode/dynamic/can_start()
|
||||
if(GLOB.dynamic_forced_storyteller)
|
||||
GLOB.dynamic_storyteller_type = GLOB.dynamic_forced_storyteller
|
||||
storyteller = new GLOB.dynamic_storyteller_type // this is where all the initialization happens
|
||||
storyteller.on_start()
|
||||
SSblackbox.record_feedback("text","dynamic_storyteller",1,storyteller.name)
|
||||
@@ -441,6 +454,8 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
|
||||
if(!drafted_rules.len)
|
||||
message_admins("Not enough threat level for roundstart antags!")
|
||||
log_game("DYNAMIC: Not enough threat level for roundstart antags!")
|
||||
midround_injection_cooldown = round((midround_injection_cooldown + world.time) / 2, 1)
|
||||
latejoin_injection_cooldown = round((latejoin_injection_cooldown + world.time) / 2, 1)
|
||||
var/indice_pop = min(10,round(roundstart_pop_ready/pop_per_requirement)+1)
|
||||
extra_rulesets_amount = 0
|
||||
if (GLOB.dynamic_classic_secret)
|
||||
@@ -721,7 +736,8 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
|
||||
if (O.started_as_observer) // Observers
|
||||
current_players[CURRENT_OBSERVERS].Add(M)
|
||||
continue
|
||||
current_players[CURRENT_DEAD_PLAYERS].Add(M) // Players who actually died (and admins who ghosted, would be nice to avoid counting them somehow)
|
||||
if(!M.voluntary_ghosted)
|
||||
current_players[CURRENT_DEAD_PLAYERS].Add(M) // Players who actually died (and admins who ghosted, would be nice to avoid counting them somehow)
|
||||
threat = storyteller.calculate_threat() + added_threat
|
||||
if(threat_average_weight)
|
||||
var/cur_sample_weight = world.time - last_threat_sample_time
|
||||
@@ -823,3 +839,11 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
|
||||
return RULE_OF_THREE(40, 20, x) + 50
|
||||
if (20 to INFINITY)
|
||||
return rand(90, 100)
|
||||
|
||||
/datum/game_mode/dynamic/ghost_info()
|
||||
. = list()
|
||||
. += "Current threat: [threat]"
|
||||
. += "Target threat: [threat_level]"
|
||||
. += "Storyteller: <b>[storyteller.name]</b><br/>"
|
||||
. += "Parameters: centre = [GLOB.dynamic_curve_centre] ; width = [GLOB.dynamic_curve_width].<br/>"
|
||||
. += "<i>On average, <b>[peaceful_percentage]</b>% of the rounds are more peaceful.</i><br/>"
|
||||
|
||||
@@ -115,7 +115,7 @@ Property weights are:
|
||||
return 100
|
||||
var/threat_perc = mode.threat/mode.threat_level
|
||||
|
||||
return round(max(0,100*(1-(threat_perc*threat_perc*threat_perc))))
|
||||
return clamp(round(100*(1-(threat_perc*threat_perc))**2,1),0,100)
|
||||
|
||||
/datum/dynamic_storyteller/proc/roundstart_draft()
|
||||
var/list/drafted_rules = list()
|
||||
@@ -152,7 +152,7 @@ Property weights are:
|
||||
is 2.26 times as likely to be picked, all other things considered.
|
||||
Of course, we don't want it to GUARANTEE the closest, that's no fun, so it's just a weight.
|
||||
*/
|
||||
threat_weight = 1-abs(1-LOGISTIC_FUNCTION(2,0.05,cost_difference,0))
|
||||
threat_weight = abs(1-abs(1-LOGISTIC_FUNCTION(2,0.05,cost_difference,0)))
|
||||
if (rule.ready())
|
||||
var/property_weight = 0
|
||||
for(var/property in property_weights)
|
||||
@@ -209,8 +209,8 @@ Property weights are:
|
||||
weight = 1
|
||||
event_frequency_lower = 2 MINUTES
|
||||
event_frequency_upper = 10 MINUTES
|
||||
flags = WAROPS_ALWAYS_ALLOWED
|
||||
min_players = 40
|
||||
flags = WAROPS_ALWAYS_ALLOWED | FORCE_IF_WON
|
||||
min_players = 30
|
||||
var/refund_cooldown = 0
|
||||
|
||||
/datum/dynamic_storyteller/chaotic/do_process()
|
||||
@@ -232,7 +232,7 @@ Property weights are:
|
||||
curve_centre = 2
|
||||
curve_width = 1.5
|
||||
weight = 2
|
||||
min_players = 30
|
||||
min_players = 20
|
||||
flags = WAROPS_ALWAYS_ALLOWED | USE_PREV_ROUND_WEIGHTS
|
||||
property_weights = list("valid" = 3, "trust" = 5)
|
||||
|
||||
@@ -331,7 +331,7 @@ Property weights are:
|
||||
/datum/dynamic_storyteller/story/calculate_threat()
|
||||
var/current_time = (world.time / SSautotransfer.targettime)*180
|
||||
mode.threat_level = round(mode.initial_threat_level*(sin(current_time)+0.25),0.1)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/datum/dynamic_storyteller/classic
|
||||
name = "Classic"
|
||||
@@ -358,7 +358,7 @@ Property weights are:
|
||||
flags = NO_ASSASSIN | FORCE_IF_WON
|
||||
weight = 1
|
||||
dead_player_weight = 5
|
||||
property_weights = list("extended" = 2, "chaos" = -1, "valid" = -1, "story_potential" = 1, "conversion" = -10)
|
||||
property_weights = list("extended" = 2, "chaos" = -1, "valid" = -1, "conversion" = -10)
|
||||
|
||||
/datum/dynamic_storyteller/no_antag
|
||||
name = "Extended"
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
reports += config.mode_reports[config_tag]
|
||||
Count++
|
||||
for(var/i in Count to rand(3,5)) //Between three and five wrong entries on the list.
|
||||
var/false_report_type = pickweightAllowZero(report_weights)
|
||||
var/false_report_type = pickweight(report_weights, 0)
|
||||
report_weights[false_report_type] = 0 //Make it so the same false report won't be selected twice
|
||||
reports += config.mode_reports[false_report_type]
|
||||
|
||||
@@ -604,3 +604,7 @@
|
||||
/// Mode specific admin panel.
|
||||
/datum/game_mode/proc/admin_panel()
|
||||
return
|
||||
|
||||
/// Mode specific info for ghost game_info
|
||||
/datum/game_mode/proc/ghost_info()
|
||||
return
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
if(!was_stranded)
|
||||
priority_announce("All hostile activity within station systems has ceased.","Network Alert")
|
||||
|
||||
if(get_security_level() == "delta")
|
||||
if(NUM2SECLEVEL(GLOB.security_level) == "delta")
|
||||
set_security_level("red")
|
||||
|
||||
SSshuttle.clearHostileEnvironment(src)
|
||||
|
||||
@@ -121,6 +121,7 @@
|
||||
uniform = /obj/item/clothing/under/syndicate
|
||||
shoes = /obj/item/clothing/shoes/combat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
back = /obj/item/storage/backpack
|
||||
ears = /obj/item/radio/headset/syndicate/alt
|
||||
l_pocket = /obj/item/pinpointer/nuke/syndicate
|
||||
id = /obj/item/card/id/syndicate
|
||||
|
||||
@@ -441,11 +441,6 @@
|
||||
circuit = /obj/item/circuitboard/machine/autolathe/secure
|
||||
stored_research = /datum/techweb/specialized/autounlocking/autolathe/public
|
||||
|
||||
//Called when the object is constructed by an autolathe
|
||||
//Has a reference to the autolathe so you can do !!FUN!! things with hacked lathes
|
||||
/obj/item/proc/autolathe_crafted(obj/machinery/autolathe/A)
|
||||
return
|
||||
|
||||
/obj/machinery/autolathe/toy
|
||||
name = "autoylathe"
|
||||
desc = "It produces toys using plastic, metal and glass."
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
to_chat(usr, "<span class='notice'>Authorization confirmed. Modifying security level.</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
//Only notify people if an actual change happened
|
||||
var/security_level = get_security_level()
|
||||
var/security_level = NUM2SECLEVEL(GLOB.security_level)
|
||||
log_game("[key_name(usr)] has changed the security level to [security_level] with [src] at [AREACOORD(usr)].")
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] has changed the security level to [security_level] with [src] at [AREACOORD(usr)].")
|
||||
deadchat_broadcast("<span class='deadsay'><span class='name'>[usr.real_name]</span> has changed the security level to [security_level] with [src] at <span class='name'>[get_area_name(usr, TRUE)]</span>.</span>", usr)
|
||||
@@ -404,7 +404,7 @@
|
||||
security_level_cd = world.time + 15 SECONDS
|
||||
if(GLOB.security_level != old_level)
|
||||
//Only notify people if an actual change happened
|
||||
var/security_level = get_security_level()
|
||||
var/security_level = NUM2SECLEVEL(GLOB.security_level)
|
||||
log_game("[key_name(usr)] has changed the security level to [security_level] from [src] at [AREACOORD(usr)].")
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] has changed the security level to [security_level] from [src] at [AREACOORD(usr)].")
|
||||
deadchat_broadcast("<span class='deadsay'><span class='name'>[usr.real_name]</span> has changed the security level to [security_level] from [src] at [get_area_name(usr, TRUE)].</span>", usr)
|
||||
@@ -555,7 +555,7 @@
|
||||
dat += " <A HREF='?src=[REF(src)];operation=setstat;statdisp=alert;alert=biohazard'>Biohazard</A> \]<BR><HR>"
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
if(STATE_ALERT_LEVEL)
|
||||
dat += "Current alert level: [get_security_level()]<BR>"
|
||||
dat += "Current alert level: [NUM2SECLEVEL(GLOB.security_level)]<BR>"
|
||||
if(GLOB.security_level == SEC_LEVEL_DELTA)
|
||||
dat += "<font color='red'><b>The self-destruct mechanism is active. Find a way to deactivate the mechanism to lower the alert level or evacuate.</b></font>"
|
||||
else
|
||||
@@ -563,8 +563,8 @@
|
||||
dat += "<A HREF='?src=[REF(src)];operation=securitylevel;newalertlevel=[SEC_LEVEL_BLUE]'>Blue</A><BR>"
|
||||
dat += "<A HREF='?src=[REF(src)];operation=securitylevel;newalertlevel=[SEC_LEVEL_GREEN]'>Green</A>"
|
||||
if(STATE_CONFIRM_LEVEL)
|
||||
dat += "Current alert level: [get_security_level()]<BR>"
|
||||
dat += "Confirm the change to: [num2seclevel(tmp_alertlevel)]<BR>"
|
||||
dat += "Current alert level: [NUM2SECLEVEL(GLOB.security_level)]<BR>"
|
||||
dat += "Confirm the change to: [NUM2SECLEVEL(tmp_alertlevel)]<BR>"
|
||||
dat += "<A HREF='?src=[REF(src)];operation=swipeidseclevel'>Swipe ID</A> to confirm change.<BR>"
|
||||
if(STATE_TOGGLE_EMERGENCY)
|
||||
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, 0)
|
||||
@@ -696,7 +696,7 @@
|
||||
dat += " <A HREF='?src=[REF(src)];operation=setstat;statdisp=alert;alert=biohazard'>Biohazard</A> \]<BR><HR>"
|
||||
|
||||
if(STATE_ALERT_LEVEL)
|
||||
dat += "Current alert level: [get_security_level()]<BR>"
|
||||
dat += "Current alert level: [NUM2SECLEVEL(GLOB.security_level)]<BR>"
|
||||
if(GLOB.security_level == SEC_LEVEL_DELTA)
|
||||
dat += "<font color='red'><b>The self-destruct mechanism is active. Find a way to deactivate the mechanism to lower the alert level or evacuate.</b></font>"
|
||||
else
|
||||
|
||||
@@ -405,7 +405,7 @@
|
||||
|
||||
// Ghost and delete the mob.
|
||||
if(!mob_occupant.get_ghost(1))
|
||||
mob_occupant.ghostize(FALSE, penalize = TRUE)
|
||||
mob_occupant.ghostize(FALSE, penalize = TRUE, voluntary = TRUE)
|
||||
|
||||
QDEL_NULL(occupant)
|
||||
for(var/I in cryo_items) //only "CRYO_DESTROY_LATER" atoms are left)
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
var/processing_queue = 0
|
||||
var/screen = "main"
|
||||
var/temp
|
||||
var/offstation_security_levels = TRUE
|
||||
var/list/part_sets = list(
|
||||
"Cyborg",
|
||||
"Ripley",
|
||||
@@ -72,6 +73,8 @@
|
||||
for(var/obj/item/stock_parts/manipulator/Ml in component_parts)
|
||||
T += Ml.rating
|
||||
time_coeff = round(initial(time_coeff) - (initial(time_coeff)*(T))/5,0.01)
|
||||
var/obj/item/circuitboard/machine/mechfab/C = circuit
|
||||
offstation_security_levels = C.offstation_security_levels
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -106,13 +109,27 @@
|
||||
if(!(set_name in D.category))
|
||||
continue
|
||||
output += "<div class='part'>[output_part_info(D)]<br>\["
|
||||
if(check_resources(D))
|
||||
if(check_clearance(D) && check_resources(D))
|
||||
output += "<a href='?src=[REF(src)];part=[D.id]'>Build</a> | "
|
||||
output += "<a href='?src=[REF(src)];add_to_queue=[D.id]'>Add to queue</a>\]\[<a href='?src=[REF(src)];part_desc=[D.id]'>?</a>\]</div>"
|
||||
return output
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/check_clearance(datum/design/D)
|
||||
if(!(obj_flags & EMAGGED) && (offstation_security_levels || is_station_level(z)) && !ISINRANGE(GLOB.security_level, D.min_security_level, D.max_security_level))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/output_part_info(datum/design/D)
|
||||
var/output = "[initial(D.name)] (Cost: [output_part_cost(D)]) [get_construction_time_w_coeff(D)/10]sec"
|
||||
var/clearance = !(obj_flags & EMAGGED) && (offstation_security_levels || is_station_level(z))
|
||||
var/sec_text = ""
|
||||
if(clearance && (D.min_security_level > SEC_LEVEL_GREEN || D.max_security_level < SEC_LEVEL_DELTA))
|
||||
sec_text = " (Allowed security levels: "
|
||||
for(var/n in D.min_security_level to D.max_security_level)
|
||||
sec_text += NUM2SECLEVEL(n)
|
||||
if(n + 1 <= D.max_security_level)
|
||||
sec_text += ", "
|
||||
sec_text += ") "
|
||||
var/output = "[initial(D.name)] (Cost: [output_part_cost(D)]) [sec_text][get_construction_time_w_coeff(D)/10]sec"
|
||||
return output
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/output_part_cost(datum/design/D)
|
||||
@@ -216,6 +233,11 @@
|
||||
while(D)
|
||||
if(stat&(NOPOWER|BROKEN))
|
||||
return FALSE
|
||||
if(!check_clearance(D))
|
||||
say("Security level not met. Queue processing stopped.")
|
||||
temp = {"<span class='alert'>Security level not met to build next part.</span><br>
|
||||
<a href='?src=[REF(src)];process_queue=1'>Try again</a> | <a href='?src=[REF(src)];clear_temp=1'>Return</a><a>"}
|
||||
return FALSE
|
||||
if(!check_resources(D))
|
||||
say("Not enough resources. Queue processing stopped.")
|
||||
temp = {"<span class='alert'>Not enough resources to build next part.</span><br>
|
||||
@@ -236,7 +258,7 @@
|
||||
for(var/datum/design/D in queue)
|
||||
i++
|
||||
var/obj/part = D.build_path
|
||||
output += "<li[!check_resources(D)?" style='color: #f00;'":null]>"
|
||||
output += "<li[(!check_clearance(D) ||!check_resources(D))?" style='color: #f00;'":null]>"
|
||||
output += initial(part.name) + " - "
|
||||
output += "[i>1?"<a href='?src=[REF(src)];queue_move=-1;index=[i]' class='arrow'>↑</a>":null] "
|
||||
output += "[i<queue.len?"<a href='?src=[REF(src)];queue_move=+1;index=[i]' class='arrow'>↓</a>":null] "
|
||||
@@ -440,3 +462,7 @@
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/offstation
|
||||
offstation_security_levels = FALSE
|
||||
circuit = /obj/item/circuitboard/machine/mechfab/offstation
|
||||
|
||||
@@ -483,7 +483,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player)
|
||||
if(!SSmapping.station_room_templates[t])
|
||||
log_world("Station room spawner placed at ([T.x], [T.y], [T.z]) has invalid ruin name of \"[t]\" in its list")
|
||||
templates -= t
|
||||
template_name = pickweightAllowZero(templates)
|
||||
template_name = pickweight(templates, 0)
|
||||
if(!template_name)
|
||||
GLOB.stationroom_landmarks -= src
|
||||
qdel(src)
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
if(!victim.client || !istype(victim))
|
||||
return
|
||||
to_chat(victim, "<span class='notice'>You feel fast!</span>")
|
||||
victim.add_movespeed_modifier(MOVESPEED_ID_YELLOW_ORB, update=TRUE, priority=100, multiplicative_slowdown=-2, blacklisted_movetypes=(FLYING|FLOATING))
|
||||
victim.add_movespeed_modifier(/datum/movespeed_modifier/yellow_orb)
|
||||
sleep(duration)
|
||||
victim.remove_movespeed_modifier(MOVESPEED_ID_YELLOW_ORB)
|
||||
victim.remove_movespeed_modifier(/datum/movespeed_modifier/yellow_orb)
|
||||
to_chat(victim, "<span class='notice'>You slow down.</span>")
|
||||
|
||||
@@ -393,7 +393,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
qdel(src)
|
||||
item_flags &= ~IN_INVENTORY
|
||||
if(SEND_SIGNAL(src, COMSIG_ITEM_DROPPED,user) & COMPONENT_DROPPED_RELOCATION)
|
||||
return ITEM_RELOCATED_BY_DROPPED
|
||||
. = ITEM_RELOCATED_BY_DROPPED
|
||||
user.update_equipment_speed_mods()
|
||||
|
||||
// called just as an item is picked up (loc is not yet changed)
|
||||
@@ -434,11 +434,12 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
// for items that can be placed in multiple slots
|
||||
// note this isn't called during the initial dressing of a player
|
||||
/obj/item/proc/equipped(mob/user, slot)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
if(item_action_slot_check(slot, user, A)) //some items only give their actions buttons when in a specific slot.
|
||||
A.Grant(user)
|
||||
. = SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot)
|
||||
if(!(. & COMPONENT_NO_GRANT_ACTIONS))
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
if(item_action_slot_check(slot, user, A)) //some items only give their actions buttons when in a specific slot.
|
||||
A.Grant(user)
|
||||
item_flags |= IN_INVENTORY
|
||||
user.update_equipment_speed_mods()
|
||||
|
||||
@@ -897,3 +898,11 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
. = ..()
|
||||
if(var_name == NAMEOF(src, slowdown))
|
||||
set_slowdown(var_value) //don't care if it's a duplicate edit as slowdown'll be set, do it anyways to force normal behavior.
|
||||
|
||||
//Called when the object is constructed by an autolathe
|
||||
//Has a reference to the autolathe so you can do !!FUN!! things with hacked lathes
|
||||
/obj/item/proc/autolathe_crafted(obj/machinery/autolathe/A)
|
||||
return
|
||||
|
||||
/obj/item/proc/rnd_crafted(obj/machinery/rnd/production/P)
|
||||
return
|
||||
|
||||
@@ -258,6 +258,8 @@ update_label("John Doe", "Clowny")
|
||||
chameleon_action.chameleon_type = /obj/item/card/id
|
||||
chameleon_action.chameleon_name = "ID Card"
|
||||
chameleon_action.initialize_disguises()
|
||||
if(!anyone)
|
||||
AddComponent(/datum/component/identification/syndicate, ID_COMPONENT_DEL_ON_IDENTIFY, ID_COMPONENT_EFFECT_NO_ACTIONS, NONE) //no deconstructive analyzer usage.
|
||||
|
||||
/obj/item/card/id/syndicate/afterattack(obj/item/O, mob/user, proximity)
|
||||
if(!proximity)
|
||||
|
||||
@@ -308,6 +308,13 @@
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stack/sheet/glass = 1)
|
||||
var/offstation_security_levels = TRUE
|
||||
|
||||
/obj/item/circuitboard/machine/mechfab/offstation
|
||||
offstation_security_levels = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/mechfab/rnd_crafted(obj/machinery/rnd/production/P)
|
||||
offstation_security_levels = P.offstation_security_levels
|
||||
|
||||
/obj/item/circuitboard/machine/cryo_tube
|
||||
name = "Cryotube (Machine Board)"
|
||||
@@ -759,6 +766,13 @@
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/reagent_containers/glass/beaker = 2)
|
||||
var/offstation_security_levels = TRUE
|
||||
|
||||
/obj/item/circuitboard/machine/circuit_imprinter/offstation
|
||||
offstation_security_levels = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/mechfab/rnd_crafted(obj/machinery/rnd/production/P)
|
||||
offstation_security_levels = P.offstation_security_levels
|
||||
|
||||
/obj/item/circuitboard/machine/circuit_imprinter/department
|
||||
name = "Departmental Circuit Imprinter (Machine Board)"
|
||||
@@ -832,6 +846,13 @@
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/reagent_containers/glass/beaker = 2)
|
||||
var/offstation_security_levels = TRUE
|
||||
|
||||
/obj/item/circuitboard/machine/protolathe/offstation
|
||||
offstation_security_levels = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/protolathe/rnd_crafted(obj/machinery/rnd/production/P)
|
||||
offstation_security_levels = P.offstation_security_levels
|
||||
|
||||
/obj/item/circuitboard/machine/protolathe/department
|
||||
name = "Departmental Protolathe (Machine Board)"
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
var/edible = TRUE // That doesn't mean eating it is a good idea
|
||||
|
||||
var/list/reagent_contents = list(/datum/reagent/consumable/nutriment = 1)
|
||||
var/list/reagent_contents = list(/datum/reagent/consumable/nutriment = 0.1)
|
||||
// If the user can toggle the colour, a la vanilla spraycan
|
||||
var/can_change_colour = FALSE
|
||||
|
||||
@@ -487,56 +487,56 @@
|
||||
icon_state = "crayonred"
|
||||
paint_color = "#DA0000"
|
||||
crayon_color = "red"
|
||||
reagent_contents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/colorful_reagent/crayonpowder/red = 1)
|
||||
reagent_contents = list(/datum/reagent/consumable/nutriment = 0.1, /datum/reagent/colorful_reagent/crayonpowder/red = 0.9)
|
||||
dye_color = DYE_RED
|
||||
|
||||
/obj/item/toy/crayon/orange
|
||||
icon_state = "crayonorange"
|
||||
paint_color = "#FF9300"
|
||||
crayon_color = "orange"
|
||||
reagent_contents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/colorful_reagent/crayonpowder/orange = 1)
|
||||
reagent_contents = list(/datum/reagent/consumable/nutriment = 0.1, /datum/reagent/colorful_reagent/crayonpowder/orange = 0.9)
|
||||
dye_color = DYE_ORANGE
|
||||
|
||||
/obj/item/toy/crayon/yellow
|
||||
icon_state = "crayonyellow"
|
||||
paint_color = "#FFF200"
|
||||
crayon_color = "yellow"
|
||||
reagent_contents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/colorful_reagent/crayonpowder/yellow = 1)
|
||||
reagent_contents = list(/datum/reagent/consumable/nutriment = 0.1, /datum/reagent/colorful_reagent/crayonpowder/yellow = 0.9)
|
||||
dye_color = DYE_YELLOW
|
||||
|
||||
/obj/item/toy/crayon/green
|
||||
icon_state = "crayongreen"
|
||||
paint_color = "#A8E61D"
|
||||
crayon_color = "green"
|
||||
reagent_contents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/colorful_reagent/crayonpowder/green = 1)
|
||||
reagent_contents = list(/datum/reagent/consumable/nutriment = 0.1, /datum/reagent/colorful_reagent/crayonpowder/green = 0.9)
|
||||
dye_color = DYE_GREEN
|
||||
|
||||
/obj/item/toy/crayon/blue
|
||||
icon_state = "crayonblue"
|
||||
paint_color = "#00B7EF"
|
||||
crayon_color = "blue"
|
||||
reagent_contents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/colorful_reagent/crayonpowder/blue = 1)
|
||||
reagent_contents = list(/datum/reagent/consumable/nutriment = 0.1, /datum/reagent/colorful_reagent/crayonpowder/blue = 0.9)
|
||||
dye_color = DYE_BLUE
|
||||
|
||||
/obj/item/toy/crayon/purple
|
||||
icon_state = "crayonpurple"
|
||||
paint_color = "#DA00FF"
|
||||
crayon_color = "purple"
|
||||
reagent_contents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/colorful_reagent/crayonpowder/purple = 1)
|
||||
reagent_contents = list(/datum/reagent/consumable/nutriment = 0.1, /datum/reagent/colorful_reagent/crayonpowder/purple = 0.9)
|
||||
dye_color = DYE_PURPLE
|
||||
|
||||
/obj/item/toy/crayon/black
|
||||
icon_state = "crayonblack"
|
||||
paint_color = "#1C1C1C" //Not completely black because total black looks bad. So Mostly Black.
|
||||
crayon_color = "black"
|
||||
reagent_contents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/colorful_reagent/crayonpowder/black = 1)
|
||||
reagent_contents = list(/datum/reagent/consumable/nutriment = 0.1, /datum/reagent/colorful_reagent/crayonpowder/black = 0.9)
|
||||
dye_color = DYE_BLACK
|
||||
|
||||
/obj/item/toy/crayon/white
|
||||
icon_state = "crayonwhite"
|
||||
paint_color = "#FFFFFF"
|
||||
crayon_color = "white"
|
||||
reagent_contents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/colorful_reagent/crayonpowder/white = 1)
|
||||
reagent_contents = list(/datum/reagent/consumable/nutriment = 0.1, /datum/reagent/colorful_reagent/crayonpowder/white = 0.9)
|
||||
dye_color = DYE_WHITE
|
||||
|
||||
/obj/item/toy/crayon/mime
|
||||
@@ -544,7 +544,7 @@
|
||||
desc = "A very sad-looking crayon."
|
||||
paint_color = "#FFFFFF"
|
||||
crayon_color = "mime"
|
||||
reagent_contents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/colorful_reagent/crayonpowder/invisible = 1)
|
||||
reagent_contents = list(/datum/reagent/consumable/nutriment = 0.1, /datum/reagent/colorful_reagent/crayonpowder/invisible = 0.9)
|
||||
charges = -1
|
||||
dye_color = DYE_MIME
|
||||
|
||||
@@ -552,10 +552,9 @@
|
||||
icon_state = "crayonrainbow"
|
||||
paint_color = "#FFF000"
|
||||
crayon_color = "rainbow"
|
||||
reagent_contents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/colorful_reagent = 1)
|
||||
reagent_contents = list(/datum/reagent/consumable/nutriment = 0.1, /datum/reagent/colorful_reagent = 0.9)
|
||||
drawtype = RANDOM_ANY // just the default starter.
|
||||
dye_color = DYE_RAINBOW
|
||||
|
||||
charges = -1
|
||||
|
||||
/obj/item/toy/crayon/rainbow/afterattack(atom/target, mob/user, proximity, params)
|
||||
|
||||
@@ -57,6 +57,35 @@
|
||||
on_reading_finished(user)
|
||||
reading = FALSE
|
||||
return TRUE
|
||||
///TRAITS///
|
||||
|
||||
/obj/item/book/granter/trait
|
||||
var/granted_trait
|
||||
var/traitname = "being cool"
|
||||
|
||||
/obj/item/book/granter/trait/already_known(mob/user)
|
||||
if(!granted_trait)
|
||||
return TRUE
|
||||
if(HAS_TRAIT(user, granted_trait))
|
||||
to_chat(user, "<span class ='notice'>You already have all the insight you need about [traitname].")
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/book/granter/trait/on_reading_start(mob/user)
|
||||
to_chat(user, "<span class='notice'>You start reading about [traitname]...</span>")
|
||||
|
||||
/obj/item/book/granter/trait/on_reading_finished(mob/user)
|
||||
to_chat(user, "<span class='notice'>You feel like you've got a good handle on [traitname]!</span>")
|
||||
ADD_TRAIT(user, granted_trait, BOOK_TRAIT)
|
||||
|
||||
/obj/item/book/granter/trait/rifleman
|
||||
name = "\proper the Neo-Russian Rifleman\'s Primer"
|
||||
desc = "A book with stains of vodka and...blood? The back is hard to read, but says something about bolt-actions. Or pump-actions. Both, maybe."
|
||||
oneuse = FALSE
|
||||
granted_trait = TRAIT_FAST_PUMP
|
||||
traitname = "riflery"
|
||||
icon_state = "book1"
|
||||
remarks = list("One smooth motion...", "Palm the bolt...", "Push up, rotate back, push forward, down...", "Don't slap yourself with the bolt...", "Wait, what's this about pumping?", "Who just scribbled \"Z\" and \"LMB\" on this page?")
|
||||
|
||||
///ACTION BUTTONS///
|
||||
|
||||
|
||||
@@ -110,6 +110,9 @@
|
||||
if(!(shield_flags & SHIELD_CAN_BASH))
|
||||
to_chat(user, "<span class='warning'>[src] can't be used to shield bash!</span>")
|
||||
return FALSE
|
||||
if(!CHECK_MOBILITY(user, MOBILITY_STAND))
|
||||
to_chat(user, "<span class='warning'>You can't bash with [src] while on the ground!</span>")
|
||||
return FALSE
|
||||
if(world.time < last_shieldbash + shieldbash_cooldown)
|
||||
to_chat(user, "<span class='warning'>You can't bash with [src] again so soon!</span>")
|
||||
return FALSE
|
||||
|
||||
@@ -100,6 +100,7 @@
|
||||
if(!H.bleedsuppress && H.bleed_rate) //so you can't stack bleed suppression
|
||||
H.suppress_bloodloss(stop_bleeding)
|
||||
to_chat(user, "<span class='notice'>You stop the bleeding of [M]!</span>")
|
||||
H.adjustBruteLoss(-(heal_brute))
|
||||
return TRUE
|
||||
to_chat(user, "<span class='notice'>You can not use \the [src] on [M]!</span>")
|
||||
|
||||
@@ -127,6 +128,12 @@
|
||||
stop_bleeding = 900
|
||||
heal_brute = 0
|
||||
|
||||
/obj/item/stack/medical/gauze/adv
|
||||
name = "sterilized medical gauze"
|
||||
desc = "A roll of elastic sterilized cloth that is extremely effective at stopping bleeding, heals minor wounds and cleans them."
|
||||
singular_name = "sterilized medical gauze"
|
||||
self_delay = 5
|
||||
|
||||
/obj/item/stack/medical/gauze/cyborg
|
||||
custom_materials = null
|
||||
is_cyborg = 1
|
||||
|
||||
@@ -695,7 +695,10 @@
|
||||
/obj/item/gun/ballistic/revolver,
|
||||
/obj/item/ammo_box,
|
||||
/obj/item/toy/gun,
|
||||
/obj/item/gun/energy/e_gun/mini
|
||||
/obj/item/gun/energy/e_gun/mini,
|
||||
/obj/item/gun/ballistic/automatic/magrifle/pistol,
|
||||
/obj/item/gun/energy/disabler,
|
||||
/obj/item/gun/energy/taser
|
||||
))
|
||||
|
||||
/obj/item/storage/belt/holster/full/PopulateContents()
|
||||
|
||||
@@ -1117,9 +1117,9 @@
|
||||
desc = "A box containing a gift for worthy golems."
|
||||
|
||||
/obj/item/storage/box/rndboards/PopulateContents()
|
||||
new /obj/item/circuitboard/machine/protolathe(src)
|
||||
new /obj/item/circuitboard/machine/protolathe/offstation(src)
|
||||
new /obj/item/circuitboard/machine/destructive_analyzer(src)
|
||||
new /obj/item/circuitboard/machine/circuit_imprinter(src)
|
||||
new /obj/item/circuitboard/machine/circuit_imprinter/offstation(src)
|
||||
new /obj/item/circuitboard/computer/rdconsole(src)
|
||||
|
||||
/obj/item/storage/box/silver_sulf
|
||||
|
||||
@@ -294,18 +294,18 @@
|
||||
name = "chameleon kit"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/chameleon/PopulateContents()
|
||||
new /obj/item/clothing/under/chameleon(src)
|
||||
new /obj/item/clothing/suit/chameleon(src)
|
||||
new /obj/item/clothing/gloves/chameleon(src)
|
||||
new /obj/item/clothing/shoes/chameleon(src)
|
||||
new /obj/item/clothing/glasses/chameleon(src)
|
||||
new /obj/item/clothing/head/chameleon(src)
|
||||
new /obj/item/clothing/mask/chameleon(src)
|
||||
new /obj/item/storage/backpack/chameleon(src)
|
||||
new /obj/item/radio/headset/chameleon(src)
|
||||
new /obj/item/stamp/chameleon(src)
|
||||
new /obj/item/pda/chameleon(src)
|
||||
new /obj/item/clothing/neck/cloak/chameleon(src)
|
||||
new /obj/item/clothing/under/chameleon/syndicate(src)
|
||||
new /obj/item/clothing/suit/chameleon/syndicate(src)
|
||||
new /obj/item/clothing/gloves/chameleon/insulated/syndicate(src)
|
||||
new /obj/item/clothing/shoes/chameleon/syndicate(src)
|
||||
new /obj/item/clothing/glasses/chameleon/syndicate(src)
|
||||
new /obj/item/clothing/head/chameleon/syndicate(src)
|
||||
new /obj/item/clothing/mask/chameleon/syndicate(src)
|
||||
new /obj/item/storage/backpack/chameleon/syndicate(src)
|
||||
new /obj/item/radio/headset/chameleon/syndicate(src)
|
||||
new /obj/item/stamp/chameleon/syndicate(src)
|
||||
new /obj/item/pda/chameleon/syndicate(src)
|
||||
new /obj/item/clothing/neck/cloak/chameleon/syndicate(src)
|
||||
|
||||
//5*(2*4) = 5*8 = 45, 45 damage if you hit one person with all 5 stars.
|
||||
//Not counting the damage it will do while embedded (2*4 = 8, at 15% chance)
|
||||
@@ -510,4 +510,4 @@
|
||||
new /obj/item/clothing/under/chameleon(src)
|
||||
new /obj/item/storage/fancy/cigarettes/cigpack_syndicate(src)
|
||||
new /obj/item/lighter(src)
|
||||
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
ion_trail.start()
|
||||
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/move_react)
|
||||
if(full_speed)
|
||||
user.add_movespeed_modifier(MOVESPEED_ID_JETPACK, priority=100, multiplicative_slowdown=-2, movetypes=FLOATING, conflict=MOVE_CONFLICT_JETPACK)
|
||||
user.add_movespeed_modifier(/datum/movespeed_modifier/jetpack/fullspeed)
|
||||
|
||||
/obj/item/tank/jetpack/proc/turn_off(mob/user)
|
||||
on = FALSE
|
||||
@@ -60,7 +60,7 @@
|
||||
icon_state = initial(icon_state)
|
||||
ion_trail.stop()
|
||||
UnregisterSignal(user, COMSIG_MOVABLE_MOVED)
|
||||
user.remove_movespeed_modifier(MOVESPEED_ID_JETPACK)
|
||||
user.remove_movespeed_modifier(/datum/movespeed_modifier/jetpack/fullspeed)
|
||||
|
||||
/obj/item/tank/jetpack/proc/move_react(mob/user)
|
||||
allow_thrust(0.01, user)
|
||||
|
||||
@@ -303,7 +303,6 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
|
||||
custom_materials = list(/datum/material/iron=500, /datum/material/glass=500)
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
|
||||
/obj/item/switchblade
|
||||
name = "switchblade"
|
||||
icon_state = "switchblade"
|
||||
@@ -639,6 +638,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
//Things in this list will be instantly splatted. Flyman weakness is handled in the flyman species weakness proc.
|
||||
var/list/strong_against
|
||||
var/list/spider_panic
|
||||
|
||||
/obj/item/melee/flyswatter/Initialize()
|
||||
. = ..()
|
||||
@@ -648,7 +648,10 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
|
||||
/mob/living/simple_animal/cockroach,
|
||||
/obj/item/queen_bee
|
||||
))
|
||||
|
||||
spider_panic = typecacheof(list(
|
||||
/mob/living/simple_animal/banana_spider,
|
||||
/mob/living/simple_animal/hostile/poison/giant_spider,
|
||||
))
|
||||
|
||||
/obj/item/melee/flyswatter/afterattack(atom/target, mob/user, proximity_flag)
|
||||
. = ..()
|
||||
@@ -659,6 +662,11 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
|
||||
if(istype(target, /mob/living/))
|
||||
var/mob/living/bug = target
|
||||
bug.death(1)
|
||||
if(is_type_in_typecache(target, spider_panic))
|
||||
to_chat(user, "<span class='warning'>You easily land a critical blow on the [target].</span>")
|
||||
if(istype(target, /mob/living/))
|
||||
var/mob/living/bug = target
|
||||
bug.adjustBruteLoss(-35) //What kinda mad man would go into melee with a spider?!
|
||||
else
|
||||
qdel(target)
|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/clothing/glasses/meson/engine(src)
|
||||
new /obj/item/storage/box/emptysandbags(src)
|
||||
new /obj/item/cartridge/engineering(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/atmospherics
|
||||
name = "\proper atmospheric technician's locker"
|
||||
@@ -97,6 +98,7 @@
|
||||
new /obj/item/clothing/head/hardhat/atmos(src)
|
||||
new /obj/item/clothing/glasses/meson/engine/tray(src)
|
||||
new /obj/item/extinguisher/advanced(src)
|
||||
new /obj/item/cartridge/atmos(src)
|
||||
|
||||
/*
|
||||
* Empty lockers
|
||||
|
||||
@@ -298,8 +298,8 @@ GLOBAL_LIST(topic_status_cache)
|
||||
if(SSmapping.config) // this just stops the runtime, honk.
|
||||
features += "[SSmapping.config.map_name]" //CIT CHANGE - makes the hub entry display the current map
|
||||
|
||||
if(get_security_level())//CIT CHANGE - makes the hub entry show the security level
|
||||
features += "[get_security_level()] alert"
|
||||
if(NUM2SECLEVEL(GLOB.security_level))//CIT CHANGE - makes the hub entry show the security level
|
||||
features += "[NUM2SECLEVEL(GLOB.security_level)] alert"
|
||||
|
||||
if (n > 1)
|
||||
features += "~[n] players"
|
||||
|
||||
Reference in New Issue
Block a user