Merge branch 'master' into upstream-merge-27890
This commit is contained in:
@@ -59,3 +59,6 @@
|
||||
//changes construction value
|
||||
/proc/change_construction_value(amount)
|
||||
GLOB.clockwork_construction_value += amount
|
||||
|
||||
/proc/can_recite_scripture(mob/living/L)
|
||||
return (is_servant_of_ratvar(L) && L.stat == CONSCIOUS && L.can_speak_vocal() && (GLOB.ratvar_awakens || (ishuman(L) || issilicon(L))))
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT
|
||||
else
|
||||
armor = list(melee = 80, bullet = 70, laser = -25, energy = 0, bomb = 60, bio = 0, rad = 0, fire = 100, acid = 100)
|
||||
flags &= STOPSPRESSUREDMAGE
|
||||
flags &= ~STOPSPRESSUREDMAGE
|
||||
max_heat_protection_temperature = initial(max_heat_protection_temperature)
|
||||
min_cold_protection_temperature = initial(min_cold_protection_temperature)
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT
|
||||
else
|
||||
armor = list(melee = 80, bullet = 70, laser = -25, energy = 0, bomb = 60, bio = 0, rad = 0, fire = 100, acid = 100)
|
||||
flags &= STOPSPRESSUREDMAGE
|
||||
flags &= ~STOPSPRESSUREDMAGE
|
||||
max_heat_protection_temperature = initial(max_heat_protection_temperature)
|
||||
min_cold_protection_temperature = initial(min_cold_protection_temperature)
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT
|
||||
else
|
||||
armor = list(melee = 80, bullet = 70, laser = -25, energy = 0, bomb = 60, bio = 0, rad = 0, fire = 100, acid = 100)
|
||||
flags &= STOPSPRESSUREDMAGE
|
||||
flags &= ~STOPSPRESSUREDMAGE
|
||||
max_heat_protection_temperature = initial(max_heat_protection_temperature)
|
||||
min_cold_protection_temperature = initial(min_cold_protection_temperature)
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
if(GLOB.ratvar_awakens)
|
||||
flags |= NOSLIP
|
||||
else
|
||||
flags &= NOSLIP
|
||||
flags &= ~NOSLIP
|
||||
|
||||
/obj/item/clothing/shoes/clockwork/mob_can_equip(mob/M, mob/equipper, slot, disable_warning = 0)
|
||||
if(equipper && !is_servant_of_ratvar(equipper))
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
var/target_component_id //the target component ID to create, if any
|
||||
var/no_cost = FALSE //If the slab is admin-only and needs no components and has no scripture locks
|
||||
var/speed_multiplier = 1 //multiples how fast this slab recites scripture
|
||||
var/nonhuman_usable = FALSE //if the slab can be used by nonhumans, defaults to off
|
||||
var/produces_components = TRUE //if it produces components at all
|
||||
var/selected_scripture = SCRIPTURE_DRIVER
|
||||
var/recollecting = FALSE //if we're looking at fancy recollection
|
||||
@@ -33,13 +32,9 @@
|
||||
no_cost = TRUE
|
||||
produces_components = FALSE
|
||||
|
||||
/obj/item/clockwork/slab/scarab
|
||||
nonhuman_usable = TRUE
|
||||
|
||||
/obj/item/clockwork/slab/debug
|
||||
speed_multiplier = 0
|
||||
no_cost = TRUE
|
||||
nonhuman_usable = TRUE
|
||||
|
||||
/obj/item/clockwork/slab/debug/attack_hand(mob/living/user)
|
||||
..()
|
||||
@@ -49,7 +44,6 @@
|
||||
/obj/item/clockwork/slab/cyborg //three scriptures, plus a spear and proselytizer
|
||||
clockwork_desc = "A divine link to the Celestial Derelict, allowing for limited recital of scripture.\n\
|
||||
Hitting a slab, a Servant with a slab, or a cache will <b>transfer</b> this slab's components into the target, the target's slab, or the global cache, respectively."
|
||||
nonhuman_usable = TRUE
|
||||
quickbound = list(/datum/clockwork_scripture/ranged_ability/judicial_marker, /datum/clockwork_scripture/ranged_ability/linked_vanguard, \
|
||||
/datum/clockwork_scripture/create_object/tinkerers_cache)
|
||||
maximum_quickbound = 6 //we usually have one or two unique scriptures, so if ratvar is up let us bind one more
|
||||
@@ -106,12 +100,6 @@
|
||||
slab_ability = null
|
||||
return ..()
|
||||
|
||||
/obj/item/clockwork/slab/ratvar_act()
|
||||
if(GLOB.ratvar_awakens)
|
||||
nonhuman_usable = TRUE
|
||||
else
|
||||
nonhuman_usable = initial(nonhuman_usable)
|
||||
|
||||
/obj/item/clockwork/slab/dropped(mob/user)
|
||||
. = ..()
|
||||
addtimer(CALLBACK(src, .proc/check_on_mob, user), 1) //dropped is called before the item is out of the slot, so we need to check slightly later
|
||||
@@ -138,7 +126,7 @@
|
||||
production_time = world.time + SLAB_PRODUCTION_TIME + production_slowdown
|
||||
var/mob/living/L
|
||||
L = get_atom_on_turf(src, /mob/living)
|
||||
if(istype(L) && is_servant_of_ratvar(L) && (nonhuman_usable || ishuman(L)))
|
||||
if(istype(L) && can_recite_scripture(L))
|
||||
var/component_to_generate = target_component_id
|
||||
if(!component_to_generate)
|
||||
component_to_generate = get_weighted_component_id(src) //more likely to generate components that we have less of
|
||||
@@ -268,7 +256,7 @@
|
||||
if(busy)
|
||||
to_chat(user, "<span class='warning'>[src] refuses to work, displaying the message: \"[busy]!\"</span>")
|
||||
return 0
|
||||
if(!nonhuman_usable && !ishuman(user))
|
||||
if(!can_recite_scripture(user))
|
||||
to_chat(user, "<span class='nezbere'>[src] hums fitfully in your hands, but doesn't seem to do anything...</span>")
|
||||
return 0
|
||||
access_display(user)
|
||||
@@ -288,7 +276,7 @@
|
||||
ui.open()
|
||||
|
||||
/obj/item/clockwork/slab/proc/recite_scripture(datum/clockwork_scripture/scripture, mob/living/user)
|
||||
if(!scripture || !user || !user.canUseTopic(src) || (!nonhuman_usable && !ishuman(user)))
|
||||
if(!scripture || !user || !user.canUseTopic(src) || !can_recite_scripture(user))
|
||||
return FALSE
|
||||
if(user.get_active_held_item() != src)
|
||||
to_chat(user, "<span class='warning'>You need to hold the slab in your active hand to recite scripture!</span>")
|
||||
|
||||
@@ -120,7 +120,7 @@ Judgement: 12 servants, 5 caches, 300 CV, and any existing AIs are converted or
|
||||
if(multiple_invokers_used && !multiple_invokers_optional && !GLOB.ratvar_awakens && !slab.no_cost)
|
||||
var/nearby_servants = 0
|
||||
for(var/mob/living/L in range(1, get_turf(invoker)))
|
||||
if(is_servant_of_ratvar(L) && L.stat == CONSCIOUS && L.can_speak_vocal())
|
||||
if(can_recite_scripture(L))
|
||||
nearby_servants++
|
||||
if(nearby_servants < invokers_required)
|
||||
to_chat(invoker, "<span class='warning'>There aren't enough non-mute servants nearby ([nearby_servants]/[invokers_required])!</span>")
|
||||
@@ -170,7 +170,7 @@ Judgement: 12 servants, 5 caches, 300 CV, and any existing AIs are converted or
|
||||
if(!channel_time && invocations.len)
|
||||
if(multiple_invokers_used)
|
||||
for(var/mob/living/L in range(1, invoker))
|
||||
if(is_servant_of_ratvar(L) && L.stat == CONSCIOUS && L.can_speak_vocal())
|
||||
if(can_recite_scripture(L))
|
||||
for(var/invocation in invocations)
|
||||
clockwork_say(L, text2ratvar(invocation), whispered)
|
||||
else
|
||||
@@ -185,7 +185,7 @@ Judgement: 12 servants, 5 caches, 300 CV, and any existing AIs are converted or
|
||||
return FALSE
|
||||
if(multiple_invokers_used)
|
||||
for(var/mob/living/L in range(1, get_turf(invoker)))
|
||||
if(is_servant_of_ratvar(L) && L.stat == CONSCIOUS && L.can_speak_vocal())
|
||||
if(can_recite_scripture(L))
|
||||
clockwork_say(L, text2ratvar(invocation), whispered)
|
||||
else
|
||||
clockwork_say(invoker, text2ratvar(invocation), whispered)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
/datum/clockwork_scripture/fellowship_armory/run_scripture()
|
||||
for(var/mob/living/L in orange(1, invoker))
|
||||
if(is_servant_of_ratvar(L) && L.stat == CONSCIOUS && L.can_speak_vocal())
|
||||
if(can_recite_scripture(L))
|
||||
channel_time = max(channel_time - 10, 0)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -225,7 +225,10 @@ This file contains the arcane tome files.
|
||||
"<span class='cult'>You [user.blood_volume ? "slice open your arm and ":""]begin drawing a sigil of the Geometer.</span>")
|
||||
if(user.blood_volume)
|
||||
user.apply_damage(initial(rune_to_scribe.scribe_damage), BRUTE, pick("l_arm", "r_arm"))
|
||||
if(!do_after(user, initial(rune_to_scribe.scribe_delay), target = get_turf(user)))
|
||||
var/scribe_mod = initial(rune_to_scribe.scribe_delay)
|
||||
if(istype(get_turf(user), /turf/open/floor/engine/cult))
|
||||
scribe_mod *= 0.5
|
||||
if(!do_after(user, scribe_mod, target = get_turf(user)))
|
||||
for(var/V in shields)
|
||||
var/obj/structure/emergency_shield/sanguine/S = V
|
||||
if(S && !QDELETED(S))
|
||||
|
||||
@@ -46,7 +46,10 @@
|
||||
if(damage_interrupt && isliving(owner))
|
||||
var/mob/living/L = owner
|
||||
health = list("health" = L.health)
|
||||
if(do_after(owner, scribe_time, target = owner, extra_checks = CALLBACK(owner, /mob.proc/break_do_after_checks, health, action_interrupt)))
|
||||
var/scribe_mod = scribe_time
|
||||
if(istype(get_turf(owner), /turf/open/floor/engine/cult))
|
||||
scribe_mod *= 0.5
|
||||
if(do_after(owner, scribe_mod, target = owner, extra_checks = CALLBACK(owner, /mob.proc/break_do_after_checks, health, action_interrupt)))
|
||||
var/obj/effect/rune/new_rune = new rune_type(owner.loc)
|
||||
new_rune.keyword = chosen_keyword
|
||||
else
|
||||
|
||||
@@ -94,8 +94,6 @@
|
||||
if(report)
|
||||
addtimer(CALLBACK(src, .proc/send_intercept, 0), rand(waittime_l, waittime_h))
|
||||
generate_station_goals()
|
||||
GLOB.start_state = new /datum/station_state()
|
||||
GLOB.start_state.count(1)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -265,6 +263,43 @@
|
||||
send2irc("Server", "Round just ended.")
|
||||
if(cult.len && !istype(SSticker.mode,/datum/game_mode/cult))
|
||||
datum_cult_completion()
|
||||
|
||||
if(GLOB.borers.len)
|
||||
var/borerwin = FALSE
|
||||
var/borertext = "<br><font size=3><b>The borers were:</b></font>"
|
||||
for(var/mob/living/simple_animal/borer/B in GLOB.borers)
|
||||
if((B.key || B.controlling) && B.stat != DEAD)
|
||||
borertext += "<br>[B.controlling ? B.victim.key : B.key] was [B.truename] ("
|
||||
var/turf/location = get_turf(B)
|
||||
if(location.z == ZLEVEL_CENTCOM && B.victim)
|
||||
borertext += "escaped with host"
|
||||
else
|
||||
borertext += "failed"
|
||||
borertext += ")"
|
||||
to_chat(world, borertext)
|
||||
|
||||
var/total_borers = 0
|
||||
for(var/mob/living/simple_animal/borer/B in GLOB.borers)
|
||||
if((B.key || B.victim) && B.stat != DEAD)
|
||||
total_borers++
|
||||
if(total_borers)
|
||||
var/total_borer_hosts = 0
|
||||
for(var/mob/living/carbon/C in GLOB.mob_list)
|
||||
var/mob/living/simple_animal/borer/D = C.has_brain_worms()
|
||||
var/turf/location = get_turf(C)
|
||||
if(location.z == ZLEVEL_CENTCOM && D && D.stat != DEAD)
|
||||
total_borer_hosts++
|
||||
if(GLOB.total_borer_hosts_needed <= total_borer_hosts)
|
||||
borerwin = TRUE
|
||||
to_chat(world, "<b>There were [total_borers] borers alive at round end!</b>")
|
||||
to_chat(world, "<b>A total of [total_borer_hosts] borers with hosts escaped on the shuttle alive. The borers needed [GLOB.total_borer_hosts_needed] hosts to escape.</b>")
|
||||
if(borerwin)
|
||||
to_chat(world, "<b><font color='green'>The borers were successful!</font></b>")
|
||||
else
|
||||
to_chat(world, "<b><font color='red'>The borers have failed!</font></b>")
|
||||
|
||||
CHECK_TICK
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
@@ -565,4 +600,4 @@
|
||||
/datum/game_mode/proc/declare_station_goal_completion()
|
||||
for(var/V in station_goals)
|
||||
var/datum/station_goal/G = V
|
||||
G.print_result()
|
||||
G.print_result()
|
||||
@@ -1,5 +1,6 @@
|
||||
#define DOM_BLOCKED_SPAM_CAP 6
|
||||
#define DOM_REQUIRED_TURFS 30
|
||||
#define DOM_HULK_HITS_REQUIRED 10
|
||||
|
||||
/obj/machinery/dominator
|
||||
name = "dominator"
|
||||
@@ -20,6 +21,9 @@
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
var/obj/effect/countdown/dominator/countdown
|
||||
|
||||
/obj/machinery/dominator/hulk_damage()
|
||||
return (max_integrity - integrity_failure) / DOM_HULK_HITS_REQUIRED
|
||||
|
||||
/proc/dominator_excessive_walls(atom/A)
|
||||
var/open = 0
|
||||
for(var/turf/T in view(3, A))
|
||||
@@ -33,13 +37,14 @@
|
||||
/obj/machinery/dominator/tesla_act()
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/dominator/New()
|
||||
..()
|
||||
/obj/machinery/dominator/Initialize()
|
||||
. = ..()
|
||||
set_light(2)
|
||||
GLOB.poi_list |= src
|
||||
spark_system = new
|
||||
spark_system.set_up(5, TRUE, src)
|
||||
countdown = new(src)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/dominator/examine(mob/user)
|
||||
..()
|
||||
@@ -103,8 +108,23 @@
|
||||
spark_system.start()
|
||||
else if(!(stat & BROKEN))
|
||||
spark_system.start()
|
||||
cut_overlays()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/dominator/update_icon()
|
||||
cut_overlays()
|
||||
if(!(stat & BROKEN))
|
||||
icon_state = "dominator-active"
|
||||
if(operating)
|
||||
var/mutable_appearance/dominator_overlay = mutable_appearance('icons/obj/machines/dominator.dmi', "dominator-overlay")
|
||||
if(gang)
|
||||
dominator_overlay.color = gang.color_hex
|
||||
add_overlay(dominator_overlay)
|
||||
else
|
||||
icon_state = "dominator"
|
||||
if(obj_integrity/max_integrity < 0.66)
|
||||
add_overlay("damage")
|
||||
else
|
||||
icon_state = "dominator-broken"
|
||||
|
||||
/obj/machinery/dominator/obj_break(damage_flag)
|
||||
if(!(stat & BROKEN) && !(flags & NODECONSTRUCT))
|
||||
@@ -142,10 +162,9 @@
|
||||
gang.message_gangtools("Hostile takeover cancelled: Dominator is no longer operational.[gang.dom_attempts ? " You have [gang.dom_attempts] attempt remaining." : " The station network will have likely blocked any more attempts by us."]",1,1)
|
||||
|
||||
set_light(0)
|
||||
icon_state = "dominator-broken"
|
||||
cut_overlays()
|
||||
operating = 0
|
||||
stat |= BROKEN
|
||||
update_icon()
|
||||
STOP_PROCESSING(SSmachines, src)
|
||||
|
||||
/obj/machinery/dominator/Destroy()
|
||||
@@ -196,9 +215,9 @@
|
||||
priority_announce("Network breach detected in [locname]. The [gang.name] Gang is attempting to seize control of the station!","Network Alert")
|
||||
gang.domination()
|
||||
SSshuttle.registerHostileEnvironment(src)
|
||||
src.name = "[gang.name] Gang [src.name]"
|
||||
name = "[gang.name] Gang [name]"
|
||||
operating = 1
|
||||
icon_state = "dominator-[gang.color]"
|
||||
update_icon()
|
||||
|
||||
countdown.color = gang.color_hex
|
||||
countdown.start()
|
||||
|
||||
@@ -62,7 +62,7 @@ GLOBAL_LIST_INIT(gang_outfit_pool, list(/obj/item/clothing/suit/jacket/leather,/
|
||||
for(var/n in 1 to 3)
|
||||
var/datum/mind/boss = pick(antag_candidates)
|
||||
antag_candidates -= boss
|
||||
G.bosses += boss
|
||||
G.bosses[boss] = GANGSTER_BOSS_STARTING_INFLUENCE
|
||||
boss.gang_datum = G
|
||||
var/title
|
||||
if(n == 1)
|
||||
@@ -85,6 +85,7 @@ GLOBAL_LIST_INIT(gang_outfit_pool, list(/obj/item/clothing/suit/jacket/leather,/
|
||||
sleep(rand(10,100))
|
||||
for(var/datum/gang/G in gangs)
|
||||
for(var/datum/mind/boss_mind in G.bosses)
|
||||
G.bosses[boss_mind] = GANGSTER_BOSS_STARTING_INFLUENCE //Force influence to be put on it.
|
||||
G.add_gang_hud(boss_mind)
|
||||
forge_gang_objectives(boss_mind)
|
||||
greet_gang(boss_mind)
|
||||
@@ -170,7 +171,7 @@ GLOBAL_LIST_INIT(gang_outfit_pool, list(/obj/item/clothing/suit/jacket/leather,/
|
||||
return 0
|
||||
if(check && gangster_mind.current.isloyal()) //Check to see if the potential gangster is implanted
|
||||
return 1
|
||||
G.gangsters += gangster_mind
|
||||
G.gangsters[gangster_mind] = GANGSTER_SOLDIER_STARTING_INFLUENCE
|
||||
gangster_mind.gang_datum = G
|
||||
if(check)
|
||||
if(iscarbon(gangster_mind.current))
|
||||
@@ -209,15 +210,24 @@ GLOBAL_LIST_INIT(gang_outfit_pool, list(/obj/item/clothing/suit/jacket/leather,/
|
||||
if(!G.is_deconvertible && !remove_bosses)
|
||||
return 0
|
||||
if(gangster_mind in G.gangsters)
|
||||
G.reclaim_points(G.gangsters[gangster_mind])
|
||||
G.gangsters -= gangster_mind
|
||||
removed = 1
|
||||
if(remove_bosses && (gangster_mind in G.bosses))
|
||||
G.reclaim_points(G.bosses[gangster_mind])
|
||||
G.bosses -= gangster_mind
|
||||
removed = 1
|
||||
if(G.tags_by_mind[gangster_mind] && islist(G.tags_by_mind[gangster_mind]))
|
||||
var/list/tags_cache = G.tags_by_mind[gangster_mind]
|
||||
for(var/v in tags_cache)
|
||||
var/obj/effect/decal/cleanable/crayon/gang/c = v
|
||||
c.set_mind_owner(null)
|
||||
G.tags_by_mind -= gangster_mind
|
||||
|
||||
if(!removed)
|
||||
return 0
|
||||
|
||||
|
||||
gangster_mind.special_role = null
|
||||
gangster_mind.gang_datum = null
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
var/list/datum/mind/gangsters = list() //gang B Members
|
||||
var/list/datum/mind/bosses = list() //gang A Bosses
|
||||
var/list/obj/item/device/gangtool/gangtools = list()
|
||||
var/list/tags_by_mind = list() //Assoc list in format of tags_by_mind[mind_of_gangster] = list(tag1, tag2, tag3) where tags are the actual object decals.
|
||||
var/style
|
||||
var/fighting_style = "normal"
|
||||
var/list/territory = list()
|
||||
@@ -75,7 +76,7 @@
|
||||
/datum/gang_item/clothing/hands,
|
||||
/datum/gang_item/clothing/belt,
|
||||
|
||||
/datum/gang_item/weapon/shuriken,
|
||||
/datum/gang_item/weapon/shuriken,
|
||||
/datum/gang_item/weapon/switchblade,
|
||||
/datum/gang_item/weapon/improvised,
|
||||
/datum/gang_item/weapon/ammo/improvised_ammo,
|
||||
@@ -202,9 +203,9 @@
|
||||
return
|
||||
var/added_names = ""
|
||||
var/lost_names = ""
|
||||
|
||||
|
||||
SSticker.mode.shuttle_check() // See if its time to start wrapping things up
|
||||
|
||||
|
||||
//Re-add territories that were reclaimed, so if they got tagged over, they can still earn income if they tag it back before the next status report
|
||||
var/list/reclaimed_territories = territory_new & territory_lost
|
||||
territory |= reclaimed_territories
|
||||
@@ -245,47 +246,90 @@
|
||||
set_domination_time(new_time)
|
||||
message += "<b>[seconds_remaining] seconds remain</b> in hostile takeover.<BR>"
|
||||
else
|
||||
for(var/obj/item/device/gangtool/G in gangtools)
|
||||
var/pmessage = message
|
||||
var/points_new = 0
|
||||
if(istype(G, /obj/item/device/gangtool/soldier))
|
||||
points_new = max(0,round(3 - G.points/10)) + (sbonus) + (LAZYLEN(G.tags)/2) // Soldier points
|
||||
pmessage += "Your influence has increased by [round(sbonus)] from your gang holding [LAZYLEN(territory)] territories, and a bonus of [round(LAZYLEN(G.tags)/2)] for territories you have personally marked and kept intact.<BR>"
|
||||
else
|
||||
points_new = max(0,round(5 - G.points/10)) + LAZYLEN(territory) // Boss points, more focused on big picture
|
||||
pmessage += "Your influence has increased by [round(points_new)] from your gang holding [territory.len] territories<BR>"
|
||||
G.points += points_new
|
||||
var/mob/living/carbon/human/ganger = get(G.loc, /mob/living)
|
||||
var/points_newer = 0
|
||||
var/static/inner = inner_outfit
|
||||
var/static/outer = outer_outfit
|
||||
if(ishuman(ganger) && ganger.mind in (gangsters|bosses))
|
||||
for(var/obj/C in ganger.contents)
|
||||
if(C.type == inner_outfit)
|
||||
points_newer += 2
|
||||
continue
|
||||
if(C.type == outer_outfit)
|
||||
points_newer += 2
|
||||
continue
|
||||
switch(C.type)
|
||||
if(/obj/item/clothing/neck/necklace/dope)
|
||||
points_newer += 2
|
||||
if(/obj/item/clothing/head/collectable/petehat/gang)
|
||||
points_newer += 4
|
||||
if(/obj/item/clothing/shoes/gang)
|
||||
points_newer += 6
|
||||
if(/obj/item/clothing/mask/gskull)
|
||||
points_newer += 5
|
||||
if(/obj/item/clothing/gloves/gang)
|
||||
points_newer += 3
|
||||
if(/obj/item/weapon/storage/belt/military/gang)
|
||||
points_newer += 4
|
||||
if(points_newer)
|
||||
G.points += points_newer
|
||||
pmessage += "Your influential choice of clothing has further increased your influence by [points_newer] points.<BR>"
|
||||
pmessage += "You now have <b>[G.points] influence</b>.<BR>"
|
||||
to_chat(ganger, "<span class='notice'>\icon[G] [pmessage]</span>")
|
||||
pay_territory_income_to_bosses()
|
||||
pay_territory_income_to_soldiers(sbonus)
|
||||
pay_all_clothing_bonuses()
|
||||
announce_all_influence()
|
||||
|
||||
/datum/gang/proc/pay_all_clothing_bonuses()
|
||||
for(var/datum/mind/mind in gangsters|bosses)
|
||||
pay_clothing_bonus(mind)
|
||||
|
||||
/datum/gang/proc/pay_clothing_bonus(var/datum/mind/gangsta)
|
||||
var/mob/living/carbon/human/gangbanger = gangsta.current
|
||||
. = 0
|
||||
if(!istype(gangbanger) || gangbanger.stat == DEAD) //Dead gangsters aren't influential at all!
|
||||
return 0
|
||||
var/static/inner = inner_outfit
|
||||
var/static/outer = outer_outfit
|
||||
for(var/obj/item/C in gangbanger.contents)
|
||||
if(C.type == inner_outfit)
|
||||
. += 2
|
||||
continue
|
||||
else if(C.type == outer_outfit)
|
||||
. += 2
|
||||
continue
|
||||
. += C.gang_contraband_value()
|
||||
adjust_influence(gangsta, .)
|
||||
if(.)
|
||||
announce_to_mind(gangsta, "<span class='notice'>Your influential choice of clothing has increased your influence by [.] points!</span>")
|
||||
else
|
||||
announce_to_mind(gangsta, "<span class='warning'>Unfortunately, you have not gained any additional influence from your drab, old, boring clothing. Learn to dress like a gangsta, bro!</span>") //Kek
|
||||
|
||||
/datum/gang/proc/pay_soldier_territory_income(datum/mind/soldier, sbonus = 0)
|
||||
. = 0
|
||||
. = max(0,round(3 - gangsters[soldier]/10)) + (sbonus) + (get_soldier_territories(soldier)/2)
|
||||
adjust_influence(soldier, .)
|
||||
|
||||
/datum/gang/proc/get_soldier_territories(datum/mind/soldier)
|
||||
if(!islist(tags_by_mind[soldier])) //They have no tagged territories!
|
||||
return 0
|
||||
var/list/tags = tags_by_mind[soldier]
|
||||
return tags.len
|
||||
|
||||
/datum/gang/proc/pay_territory_income_to_soldiers(sbonus = 0)
|
||||
for(var/datum/mind/soldier in gangsters)
|
||||
var/returned = pay_soldier_territory_income(soldier)
|
||||
if(!returned)
|
||||
announce_to_mind(soldier, "<span class='warning'>You have not gained any influence from territories you personally tagged. Get to work, soldier!</span>")
|
||||
else
|
||||
announce_to_mind(soldier, "<span class='notice'>You have gained [returned] influence from [get_soldier_territories(soldier)] territories you have personally tagged.</span>")
|
||||
|
||||
/datum/gang/proc/announce_all_influence()
|
||||
for(var/datum/mind/MG in bosses|gangsters)
|
||||
announce_total_influence(MG)
|
||||
|
||||
/datum/gang/proc/pay_territory_income_to_bosses()
|
||||
. = 0
|
||||
for(var/datum/mind/boss_mind in bosses)
|
||||
var/inc = max(0,round(5 - bosses[boss_mind]/10)) + LAZYLEN(territory)
|
||||
. += inc
|
||||
adjust_influence(boss_mind, inc)
|
||||
announce_to_mind(boss_mind, "<span class='boldnotice'>Your influence has increased by [inc] from your gang holding [LAZYLEN(territory)] territories!</span>")
|
||||
|
||||
/datum/gang/proc/get_influence(datum/mind/gangster_mind)
|
||||
if(gangster_mind in gangsters)
|
||||
return gangsters[gangster_mind]
|
||||
if(gangster_mind in bosses)
|
||||
return bosses[gangster_mind]
|
||||
|
||||
/datum/gang/proc/adjust_influence(datum/mind/gangster_mind, amount)
|
||||
if(gangster_mind in gangsters)
|
||||
gangsters[gangster_mind] += amount
|
||||
if(gangster_mind in bosses)
|
||||
bosses[gangster_mind] += amount
|
||||
|
||||
/datum/gang/proc/announce_to_mind(datum/mind/gangster_mind, message)
|
||||
if(gangster_mind.current && gangster_mind.current.stat != DEAD)
|
||||
to_chat(gangster_mind.current, message)
|
||||
|
||||
/datum/gang/proc/announce_total_influence(datum/mind/gangster_mind)
|
||||
announce_to_mind(gangster_mind, "<span class='boldnotice'>[name] Gang: You now have a total of [get_influence(gangster_mind)] influence!</span>")
|
||||
|
||||
/datum/gang/proc/reclaim_points(amount)
|
||||
for(var/datum/mind/bawss in bosses)
|
||||
adjust_influence(bawss, amount/bosses.len)
|
||||
announce_to_mind(bawss, "<span class='notice'>[name] Gang: [amount/bosses.len] influence given from internal automatic restructuring.</span>")
|
||||
|
||||
//Multiverse
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
if(check_canbuy && !can_buy(user, gang, gangtool))
|
||||
return FALSE
|
||||
var/real_cost = get_cost(user, gang, gangtool)
|
||||
gangtool.points -= real_cost
|
||||
gang.adjust_influence(user.mind, -real_cost)
|
||||
spawn_item(user, gang, gangtool)
|
||||
return TRUE
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
to_chat(user, spawn_msg)
|
||||
|
||||
/datum/gang_item/proc/can_buy(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
|
||||
return gang && (gangtool.points >= get_cost(user, gang, gangtool)) && can_see(user, gang, gangtool)
|
||||
return gang && (gang.get_influence(user.mind) >= get_cost(user, gang, gangtool)) && can_see(user, gang, gangtool)
|
||||
|
||||
/datum/gang_item/proc/can_see(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
|
||||
return TRUE
|
||||
@@ -111,17 +111,20 @@
|
||||
/datum/gang_item/clothing/hat
|
||||
name = "Pimp Hat"
|
||||
id = "hat"
|
||||
cost = 18
|
||||
cost = 16
|
||||
item_path = /obj/item/clothing/head/collectable/petehat/gang
|
||||
|
||||
/obj/item/clothing/head/collectable/petehat/gang
|
||||
name = "pimpin' hat"
|
||||
desc = "The undisputed king of style."
|
||||
|
||||
/obj/item/clothing/head/collectable/petehat/gang/gang_contraband_value()
|
||||
return 4
|
||||
|
||||
/datum/gang_item/clothing/mask
|
||||
name = "Golden Death Mask"
|
||||
id = "mask"
|
||||
cost = 20
|
||||
cost = 18
|
||||
item_path = /obj/item/clothing/mask/gskull
|
||||
|
||||
/obj/item/clothing/mask/gskull
|
||||
@@ -129,11 +132,13 @@
|
||||
icon_state = "gskull"
|
||||
desc = "Strike terror, and envy, into the hearts of your enemies."
|
||||
|
||||
/obj/item/clothing/mask/gskull/gang_contraband_value()
|
||||
return 5
|
||||
|
||||
/datum/gang_item/clothing/shoes
|
||||
name = "Bling Boots"
|
||||
id = "boots"
|
||||
cost = 25
|
||||
cost = 22
|
||||
item_path = /obj/item/clothing/shoes/gang
|
||||
|
||||
/obj/item/clothing/shoes/gang
|
||||
@@ -141,17 +146,19 @@
|
||||
desc = "Stand aside peasants."
|
||||
icon_state = "bling"
|
||||
|
||||
/obj/item/clothing/shoes/gang/gang_contraband_value()
|
||||
return 6
|
||||
|
||||
/datum/gang_item/clothing/neck
|
||||
name = "Gold Necklace"
|
||||
id = "necklace"
|
||||
cost = 10
|
||||
cost = 9
|
||||
item_path = /obj/item/clothing/neck/necklace/dope
|
||||
|
||||
|
||||
/datum/gang_item/clothing/hands
|
||||
name = "Decorative Brass Knuckles"
|
||||
id = "hand"
|
||||
cost = 12
|
||||
cost = 11
|
||||
item_path = /obj/item/clothing/gloves/gang
|
||||
|
||||
/obj/item/clothing/gloves/gang
|
||||
@@ -160,10 +167,13 @@
|
||||
icon_state = "knuckles"
|
||||
w_class = 3
|
||||
|
||||
/obj/item/clothing/gloves/gang/gang_contraband_value()
|
||||
return 3
|
||||
|
||||
/datum/gang_item/clothing/belt
|
||||
name = "Badass Belt"
|
||||
id = "belt"
|
||||
cost = 15
|
||||
cost = 13
|
||||
item_path = /obj/item/weapon/storage/belt/military/gang
|
||||
|
||||
/obj/item/weapon/storage/belt/military/gang
|
||||
@@ -173,7 +183,8 @@
|
||||
desc = "The belt buckle simply reads 'BAMF'."
|
||||
storage_slots = 1
|
||||
|
||||
|
||||
/obj/item/weapon/storage/belt/military/gang/gang_contraband_value()
|
||||
return 4
|
||||
|
||||
///////////////////
|
||||
//WEAPONS
|
||||
@@ -236,16 +247,24 @@
|
||||
item_path = /obj/item/ammo_box/magazine/m10mm
|
||||
|
||||
/datum/gang_item/weapon/sniper
|
||||
name = ".50cal Sniper Rifle"
|
||||
name = "Black Market .50cal Sniper Rifle"
|
||||
id = "sniper"
|
||||
cost = 40
|
||||
item_path = /obj/item/weapon/gun/ballistic/automatic/sniper_rifle
|
||||
|
||||
/datum/gang_item/weapon/ammo/sniper_ammo
|
||||
name = "Standard .50cal Sniper Rounds"
|
||||
name = "Smuggled .50cal Sniper Rounds"
|
||||
id = "sniper_ammo"
|
||||
cost = 15
|
||||
item_path = /obj/item/ammo_box/magazine/sniper_rounds
|
||||
item_path = /obj/item/ammo_box/magazine/sniper_rounds/gang
|
||||
|
||||
|
||||
/datum/gang_item/weapon/ammo/sleeper_ammo
|
||||
name = "Illicit Tranquilizer Cartridges"
|
||||
id = "sniper_ammo"
|
||||
cost = 15
|
||||
item_path = /obj/item/ammo_box/magazine/sniper_rounds/gang/sleeper
|
||||
|
||||
|
||||
/datum/gang_item/weapon/machinegun
|
||||
name = "Mounted Machine Gun"
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
var/outfits = 2
|
||||
var/free_pen = 0
|
||||
var/promotable = 0
|
||||
var/points = 15
|
||||
var/list/tags = list()
|
||||
|
||||
/obj/item/device/gangtool/Initialize() //Initialize supply point income if it hasn't already been started
|
||||
@@ -50,7 +49,7 @@
|
||||
var/isboss = (user.mind == gang.bosses[1])
|
||||
dat += "Registration: <B>[gang.name] Gang [isboss ? "Boss" : "Lieutenant"]</B><br>"
|
||||
dat += "Organization Size: <B>[gang.gangsters.len + gang.bosses.len]</B> | Station Control: <B>[round((gang.territory.len/GLOB.start_state.num_territories)*100, 1)]%</B><br>"
|
||||
dat += "Your Influence: <B>[points]</B><br>"
|
||||
dat += "Your Influence: <B>[gang.get_influence(user.mind)]</B><br>"
|
||||
dat += "Time until Influence grows: <B>[time2text(SSticker.mode.gang_points.next_point_time - world.time, "mm:ss")]</B><br>"
|
||||
dat += "<hr>"
|
||||
|
||||
@@ -147,8 +146,9 @@
|
||||
gang.gangtools += src
|
||||
icon_state = "gangtool-[gang.color]"
|
||||
if(!(user.mind in gang.bosses))
|
||||
var/cached_influence = gang.gangsters[user.mind]
|
||||
SSticker.mode.remove_gangster(user.mind, 0, 2)
|
||||
gang.bosses += user.mind
|
||||
gang.bosses[user.mind] = cached_influence
|
||||
user.mind.gang_datum = gang
|
||||
user.mind.special_role = "[gang.name] Gang Lieutenant"
|
||||
gang.add_gang_hud(user.mind)
|
||||
@@ -246,9 +246,6 @@
|
||||
|
||||
///////////// Internal tool used by gang regulars ///////////
|
||||
|
||||
/obj/item/device/gangtool/soldier
|
||||
points = 5
|
||||
|
||||
/obj/item/device/gangtool/soldier/New(mob/user)
|
||||
. = ..()
|
||||
gang = user.mind.gang_datum
|
||||
@@ -264,7 +261,7 @@
|
||||
dat += "<center><font color='red'>Takeover In Progress:<br><B>[gang.domination_time_remaining()] seconds remain</B></font></center>"
|
||||
dat += "Registration: <B>[gang.name] - Foot Soldier</B><br>"
|
||||
dat += "Organization Size: <B>[gang.gangsters.len + gang.bosses.len]</B> | Station Control: <B>[round((gang.territory.len/GLOB.start_state.num_territories)*100, 1)]%</B><br>"
|
||||
dat += "Your Influence: <B>[points]</B><br>"
|
||||
dat += "Your Influence: <B>[gang.get_influence(user.mind)]</B><br>"
|
||||
if(LAZYLEN(tags))
|
||||
dat += "Your tags generate bonus influence for you.<br> You have tagged the following territories:"
|
||||
for(var/obj/effect/decal/cleanable/crayon/gang/T in tags)
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
set desc = "Detonate all RCDs on the station, while sparing onboard cyborg RCDs."
|
||||
set waitfor = FALSE
|
||||
|
||||
if(!canUseTopic() || malf_cooldown)
|
||||
if(!canUseTopic() || malf_cooldown > world.time)
|
||||
return
|
||||
|
||||
for(var/I in GLOB.rcd_list)
|
||||
@@ -203,9 +203,7 @@
|
||||
RCD.detonate_pulse()
|
||||
|
||||
to_chat(src, "<span class='warning'>RCD detonation pulse emitted.</span>")
|
||||
malf_cooldown = TRUE
|
||||
sleep(100)
|
||||
malf_cooldown = FALSE
|
||||
malf_cooldown = world.time + 100
|
||||
|
||||
/datum/AI_Module/large/mecha_domination
|
||||
module_name = "Viral Mech Domination"
|
||||
@@ -446,7 +444,7 @@
|
||||
set name = "Reactivate Cameranet"
|
||||
set category = "Malfunction"
|
||||
|
||||
if(!canUseTopic() || malf_cooldown)
|
||||
if(!canUseTopic() || malf_cooldown > world.time)
|
||||
return
|
||||
var/fixedcams = 0 //Tells the AI how many cams it fixed. Stats are fun.
|
||||
|
||||
@@ -469,9 +467,7 @@
|
||||
break
|
||||
to_chat(src, "<span class='notice'>Diagnostic complete! Operations completed: [fixedcams].</span>")
|
||||
|
||||
malf_cooldown = 1
|
||||
spawn(30) //Lag protection
|
||||
malf_cooldown = 0
|
||||
malf_cooldown = world.time + 30
|
||||
|
||||
/datum/AI_Module/large/upgrade_cameras
|
||||
module_name = "Upgrade Camera Network"
|
||||
|
||||
@@ -31,15 +31,15 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
|
||||
var/max_i = 10//number of tries to spawn meteor.
|
||||
while(!isspaceturf(pickedstart))
|
||||
var/startSide = pick(GLOB.cardinal)
|
||||
pickedstart = spaceDebrisStartLoc(startSide, 1)
|
||||
pickedgoal = spaceDebrisFinishLoc(startSide, 1)
|
||||
pickedstart = spaceDebrisStartLoc(startSide, ZLEVEL_STATION)
|
||||
pickedgoal = spaceDebrisFinishLoc(startSide, ZLEVEL_STATION)
|
||||
max_i--
|
||||
if(max_i<=0)
|
||||
return
|
||||
var/Me = pickweight(meteortypes)
|
||||
var/obj/effect/meteor/M = new Me(pickedstart)
|
||||
M.dest = pickedgoal
|
||||
M.z_original = 1
|
||||
M.z_original = ZLEVEL_STATION
|
||||
spawn(0)
|
||||
walk_towards(M, M.dest, 1)
|
||||
|
||||
@@ -96,7 +96,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
|
||||
pass_flags = PASSTABLE
|
||||
var/heavy = 0
|
||||
var/meteorsound = 'sound/effects/meteorimpact.ogg'
|
||||
var/z_original = 1
|
||||
var/z_original = ZLEVEL_STATION
|
||||
var/threat = 0 // used for determining which meteors are most interesting
|
||||
var/lifetime = DEFAULT_METEOR_LIFETIME
|
||||
|
||||
|
||||
@@ -212,13 +212,12 @@
|
||||
|
||||
/obj/machinery/abductor/experiment/proc/SendBack(mob/living/carbon/human/H)
|
||||
H.Sleeping(8)
|
||||
H.uncuff()
|
||||
if(console && console.pad && console.pad.teleport_target)
|
||||
H.forceMove(console.pad.teleport_target)
|
||||
H.uncuff()
|
||||
return
|
||||
//Area not chosen / It's not safe area - teleport to arrivals
|
||||
H.forceMove(pick(GLOB.latejoin))
|
||||
H.uncuff()
|
||||
SSjob.SendToLateJoin(H, FALSE)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -243,7 +243,7 @@
|
||||
if(!is_gangster(user))
|
||||
var/datum/gang/multiverse/G = new(src, "[user.real_name]")
|
||||
SSticker.mode.gangs += G
|
||||
G.bosses += user.mind
|
||||
G.bosses[user.mind] = 0
|
||||
G.add_gang_hud(user.mind)
|
||||
user.mind.gang_datum = G
|
||||
to_chat(user, "<span class='warning'><B>With your new found power you could easily conquer the station!</B></span>")
|
||||
|
||||
@@ -142,7 +142,8 @@
|
||||
return
|
||||
|
||||
//First we spawn a dude.
|
||||
var/mob/living/carbon/human/new_character = new(pick(GLOB.latejoin))//The mob being spawned.
|
||||
var/mob/living/carbon/human/new_character = new//The mob being spawned.
|
||||
SSjob.SendToLateJoin(new_character)
|
||||
|
||||
G_found.client.prefs.copy_to(new_character)
|
||||
new_character.dna.update_dna_identity()
|
||||
|
||||
Reference in New Issue
Block a user