Bleeding edgy refresh (#303)

* not code stuff

* other things

* global vars, defines, helpers

* onclick hud stuff, orphans, world.dm

* controllers and datums

* game folder

* everything not client/mobs in modules

* client folder

* stage 1 mob stuff

* simple animal things

* silicons

* carbon things

* ayylmaos and monkeys

* hyoomahn

* icons n shit

* sprite fixes

* compile fixes

* some fixes I cherrypicked.

* qdel fixes

* forgot brain refractors
This commit is contained in:
Poojawa
2017-03-21 11:44:10 -05:00
committed by GitHub
parent 099a6c8764
commit f67e9f6d87
1476 changed files with 344416 additions and 40694 deletions
+65 -23
View File
@@ -21,7 +21,6 @@
armour_penetration = 1000
resistance_flags = INDESTRUCTIBLE
anchored = TRUE
flags = HANDSLOW
var/team = WHITE_TEAM
var/reset_cooldown = 0
var/obj/effect/ctf/flag_reset/reset
@@ -35,6 +34,7 @@
/obj/item/weapon/twohanded/ctf/Initialize()
..()
SET_SECONDARY_FLAG(src, SLOWS_WHILE_IN_HAND)
if(!reset)
reset = new reset_path(get_turf(src))
@@ -44,15 +44,14 @@
for(var/mob/M in player_list)
var/area/mob_area = get_area(M)
if(istype(mob_area, /area/ctf))
M << "<span class='userdanger'>\The [src] has been returned \
to base!</span>"
to_chat(M, "<span class='userdanger'>\The [src] has been returned to base!</span>")
STOP_PROCESSING(SSobj, src)
/obj/item/weapon/twohanded/ctf/attack_hand(mob/living/user)
if(!user)
return
if(team in user.faction)
user << "You can't move your own flag!"
to_chat(user, "You can't move your own flag!")
return
if(loc == user)
if(!user.dropItemToGround(src))
@@ -66,7 +65,7 @@
for(var/mob/M in player_list)
var/area/mob_area = get_area(M)
if(istype(mob_area, /area/ctf))
M << "<span class='userdanger'>\The [src] has been taken!</span>"
to_chat(M, "<span class='userdanger'>\The [src] has been taken!</span>")
STOP_PROCESSING(SSobj, src)
/obj/item/weapon/twohanded/ctf/dropped(mob/user)
@@ -77,7 +76,7 @@
for(var/mob/M in player_list)
var/area/mob_area = get_area(M)
if(istype(mob_area, /area/ctf))
M << "<span class='userdanger'>\The [src] has been dropped!</span>"
to_chat(M, "<span class='userdanger'>\The [src] has been dropped!</span>")
anchored = TRUE
@@ -117,6 +116,13 @@
desc = "This is where a blue banner used to play capture the flag \
would go."
/proc/toggle_all_ctf(mob/user)
var/ctf_enabled = FALSE
for(var/obj/machinery/capture_the_flag/CTF in machines)
ctf_enabled = CTF.toggle_ctf()
message_admins("[key_name_admin(user)] has [ctf_enabled? "enabled" : "disabled"] CTF!")
notify_ghosts("CTF has been [ctf_enabled? "enabled" : "disabled"]!",'sound/effects/ghost2.ogg')
/obj/machinery/capture_the_flag
name = "CTF Controller"
desc = "Used for running friendly games of capture the flag."
@@ -138,12 +144,14 @@
var/ctf_enabled = FALSE
var/ctf_gear = /datum/outfit/ctf
var/instagib_gear = /datum/outfit/ctf/instagib
var/list/dead_barricades = list()
var/list/obj/effect/ctf/dead_barricade/dead_barricades = list()
var/list/obj/structure/barricade/security/ctf/living_barricades = list()
var/static/ctf_object_typecache
var/static/arena_cleared = FALSE
/obj/machinery/capture_the_flag/New()
/obj/machinery/capture_the_flag/Initialize()
..()
if(!ctf_object_typecache)
ctf_object_typecache = typecacheof(list(
@@ -173,8 +181,8 @@
else
// The changes that you've been hit with no shield but not
// instantly critted are low, but have some healing.
M.adjustBruteLoss(-1)
M.adjustFireLoss(-1)
M.adjustBruteLoss(-5)
M.adjustFireLoss(-5)
/obj/machinery/capture_the_flag/red
name = "Red CTF Controller"
@@ -192,12 +200,17 @@
/obj/machinery/capture_the_flag/attack_ghost(mob/user)
if(ctf_enabled == FALSE)
if(user.client && user.client.holder)
var/response = alert("Enable CTF?", "CTF", "Yes", "No")
if(response == "Yes")
toggle_all_ctf(user)
return
if(ticker.current_state < GAME_STATE_PLAYING)
return
if(user.ckey in team_members)
if(user.ckey in recently_dead_ckeys)
user << "It must be more than [respawn_cooldown/10] seconds from your last death to respawn!"
to_chat(user, "It must be more than [respawn_cooldown/10] seconds from your last death to respawn!")
return
var/client/new_team_member = user.client
if(user.mind && user.mind.current)
@@ -209,10 +222,10 @@
if(CTF == src || CTF.ctf_enabled == FALSE)
continue
if(user.ckey in CTF.team_members)
user << "No switching teams while the round is going!"
to_chat(user, "No switching teams while the round is going!")
return
if(CTF.team_members.len < src.team_members.len)
user << "[src.team] has more team members than [CTF.team]. Try joining [CTF.team] to even things up."
to_chat(user, "[src.team] has more team members than [CTF.team]. Try joining [CTF.team] to even things up.")
return
team_members |= user.ckey
var/client/new_team_member = user.client
@@ -254,7 +267,7 @@
for(var/mob/M in player_list)
var/area/mob_area = get_area(M)
if(istype(mob_area, /area/ctf))
M << "<span class='userdanger'>[user.real_name] has captured \the [flag], scoring a point for [team] team! They now have [points]/[points_to_win] points!</span>"
to_chat(M, "<span class='userdanger'>[user.real_name] has captured \the [flag], scoring a point for [team] team! They now have [points]/[points_to_win] points!</span>")
if(points >= points_to_win)
victory()
@@ -262,8 +275,8 @@
for(var/mob/M in mob_list)
var/area/mob_area = get_area(M)
if(istype(mob_area, /area/ctf))
M << "<span class='narsie'>[team] team wins!</span>"
M << "<span class='userdanger'>The game has been reset! Teams have been cleared. The machines will be active again in 30 seconds.</span>"
to_chat(M, "<span class='narsie'>[team] team wins!</span>")
to_chat(M, "<span class='userdanger'>The game has been reset! Teams have been cleared. The machines will be active again in 30 seconds.</span>")
for(var/obj/item/weapon/twohanded/ctf/W in M)
M.dropItemToGround(W)
M.dust()
@@ -289,9 +302,16 @@
/obj/machinery/capture_the_flag/proc/start_ctf()
ctf_enabled = TRUE
for(var/obj/effect/ctf/dead_barricade/ded in dead_barricades)
ded.respawn()
for(var/d in dead_barricades)
var/obj/effect/ctf/dead_barricade/D = d
D.respawn()
dead_barricades.Cut()
for(var/b in living_barricades)
var/obj/structure/barricade/security/ctf/B = b
B.obj_integrity = B.max_integrity
notify_ghosts("[name] has been activated!", enter_link="<a href=?src=\ref[src];join=1>(Click to join the [team] team!)</a> or click on the controller directly!", source = src, action=NOTIFY_ATTACK)
if(!arena_cleared)
@@ -433,6 +453,7 @@
ears = /obj/item/device/radio/headset
uniform = /obj/item/clothing/under/syndicate
suit = /obj/item/clothing/suit/space/hardsuit/shielded/ctf
toggle_helmet = FALSE // see the whites of their eyes
shoes = /obj/item/clothing/shoes/combat
gloves = /obj/item/clothing/gloves/combat
id = /obj/item/weapon/card/id/syndicate
@@ -514,7 +535,7 @@
/obj/structure/trap/ctf/trap_effect(mob/living/L)
if(!(src.team in L.faction))
L << "<span class='danger'><B>Stay out of the enemy spawn!</B></span>"
to_chat(L, "<span class='danger'><B>Stay out of the enemy spawn!</B></span>")
L.death()
/obj/structure/trap/ctf/red
@@ -528,6 +549,18 @@
/obj/structure/barricade/security/ctf
name = "barrier"
desc = "A barrier. Provides cover in fire fights."
deploy_time = 0
deploy_message = 0
/obj/structure/barricade/security/ctf/Initialize(mapload)
..()
for(var/obj/machinery/capture_the_flag/CTF in machines)
CTF.living_barricades += src
/obj/structure/barricade/security/ctf/Destroy()
for(var/obj/machinery/capture_the_flag/CTF in machines)
CTF.living_barricades -= src
. = ..()
/obj/structure/barricade/security/ctf/make_debris()
new /obj/effect/ctf/dead_barricade(get_turf(src))
@@ -549,7 +582,7 @@
alpha = 255
invisibility = 0
/obj/effect/ctf/ammo/New()
/obj/effect/ctf/ammo/Initialize(mapload)
..()
QDEL_IN(src, AMMO_DROP_LIFETIME)
@@ -572,7 +605,7 @@
for(var/obj/item/weapon/gun/G in M)
qdel(G)
O.equip(M)
M << "<span class='notice'>Ammunition reloaded!</span>"
to_chat(M, "<span class='notice'>Ammunition reloaded!</span>")
playsound(get_turf(M), 'sound/weapons/shotgunpump.ogg', 50, 1, -1)
qdel(src)
break
@@ -583,7 +616,8 @@
icon = 'icons/obj/objects.dmi'
icon_state = "barrier0"
/obj/effect/ctf/dead_barricade/New()
/obj/effect/ctf/dead_barricade/Initialize(mapload)
..()
for(var/obj/machinery/capture_the_flag/CTF in machines)
CTF.dead_barricades += src
@@ -627,5 +661,13 @@
for(var/mob/M in player_list)
var/area/mob_area = get_area(M)
if(istype(mob_area, /area/ctf))
M << "<span class='userdanger'>[user.real_name] has captured \the [src], claiming it for [CTF.team]! Go take it back!</span>"
to_chat(M, "<span class='userdanger'>[user.real_name] has captured \the [src], claiming it for [CTF.team]! Go take it back!</span>")
break
#undef WHITE_TEAM
#undef RED_TEAM
#undef BLUE_TEAM
#undef FLAG_RETURN_TIME
#undef INSTAGIB_RESPAWN
#undef DEFAULT_RESPAWN
#undef AMMO_DROP_LIFETIME
+3 -3
View File
@@ -25,10 +25,10 @@
if(ticker.current_state != GAME_STATE_PLAYING || !loc)
return
if(!uses)
user << "<span class='warning'>This spawner is out of charges!</span>"
to_chat(user, "<span class='warning'>This spawner is out of charges!</span>")
return
if(jobban_isbanned(user, "lavaland"))
user << "<span class='warning'>You are jobanned!</span>"
to_chat(user, "<span class='warning'>You are jobanned!</span>")
return
var/ghost_role = alert("Become [mob_name]? (Warning, You can no longer be cloned!)",,"Yes","No")
if(ghost_role == "No" || !loc)
@@ -71,7 +71,7 @@
if(ckey)
M.ckey = ckey
M << "[flavour_text]"
to_chat(M, "[flavour_text]")
var/datum/mind/MM = M.mind
if(objectives)
for(var/objective in objectives)
+6 -6
View File
@@ -126,10 +126,10 @@ var/obj/machinery/gateway/centerstation/the_gateway = null
if(!powered())
return
if(!awaygate)
user << "<span class='notice'>Error: No destination found.</span>"
to_chat(user, "<span class='notice'>Error: No destination found.</span>")
return
if(world.time < wait)
user << "<span class='notice'>Error: Warpspace triangulation in progress. Estimated time to completion: [round(((wait - world.time) / 10) / 60)] minutes.</span>"
to_chat(user, "<span class='notice'>Error: Warpspace triangulation in progress. Estimated time to completion: [round(((wait - world.time) / 10) / 60)] minutes.</span>")
return
for(var/obj/machinery/gateway/G in linked)
@@ -166,10 +166,10 @@ var/obj/machinery/gateway/centerstation/the_gateway = null
/obj/machinery/gateway/centeraway/attackby(obj/item/device/W, mob/user, params)
if(istype(W,/obj/item/device/multitool))
if(calibrated)
user << "\black The gate is already calibrated, there is no work for you to do here."
to_chat(user, "\black The gate is already calibrated, there is no work for you to do here.")
return
else
user << "<span class='boldnotice'>Recalibration successful!</span>: \black This gate's systems have been fine tuned. Travel to this gate will now be on target."
to_chat(user, "<span class='boldnotice'>Recalibration successful!</span>: \black This gate's systems have been fine tuned. Travel to this gate will now be on target.")
calibrated = TRUE
return
@@ -200,7 +200,7 @@ var/obj/machinery/gateway/centerstation/the_gateway = null
if(!detect())
return
if(!stationgate)
user << "<span class='notice'>Error: No destination found.</span>"
to_chat(user, "<span class='notice'>Error: No destination found.</span>")
return
for(var/obj/machinery/gateway/G in linked)
@@ -219,7 +219,7 @@ var/obj/machinery/gateway/centerstation/the_gateway = null
if(istype(AM, /mob/living/carbon))
var/mob/living/carbon/C = AM
for(var/obj/item/weapon/implant/exile/E in C.implants)//Checking that there is an exile implant
AM << "\black The station gate has detected your exile implant and is blocking your entry."
to_chat(AM, "\black The station gate has detected your exile implant and is blocking your entry.")
return
AM.forceMove(get_step(stationgate.loc, SOUTH))
AM.setDir(SOUTH)
@@ -134,7 +134,7 @@
..()
if(!used)
if(!ishuman(user) || !user.mind || (user.mind in ticker.mode.wizards))
user << "<span class='warning'>You feel the magic of the dice is restricted to ordinary humans!</span>"
to_chat(user, "<span class='warning'>You feel the magic of the dice is restricted to ordinary humans!</span>")
return
if(rigged)
effect(user,rigged)
@@ -143,7 +143,7 @@
/obj/item/weapon/dice/d20/fate/equipped(mob/user, slot)
if(!ishuman(user) || !user.mind || (user.mind in ticker.mode.wizards))
user << "<span class='warning'>You feel the magic of the dice is restricted to ordinary humans! You should leave it alone.</span>"
to_chat(user, "<span class='warning'>You feel the magic of the dice is restricted to ordinary humans! You should leave it alone.</span>")
user.drop_item()
@@ -246,7 +246,7 @@
new /obj/item/weapon/card/id/captains_spare(get_turf(src))
if(19)
//Instrinct Resistance
user << "<span class='notice'>You feel robust.</span>"
to_chat(user, "<span class='notice'>You feel robust.</span>")
var/datum/species/S = user.dna.species
S.brutemod *= 0.5
S.burnmod *= 0.5
@@ -32,10 +32,10 @@
/obj/structure/firepit/proc/toggleFirepit()
if(active)
SetLuminosity(8)
set_light(8)
icon_state = "firepit-active"
else
SetLuminosity(0)
set_light(0)
icon_state = "firepit"
/obj/structure/firepit/extinguish()
@@ -25,18 +25,18 @@
usr.set_machine(src)
if(chargesa <= 0)
user << "The Wish Granter lies silent."
to_chat(user, "The Wish Granter lies silent.")
return
else if(!ishuman(user))
user << "You feel a dark stirring inside of the Wish Granter, something you want nothing of. Your instincts are better than any man's."
to_chat(user, "You feel a dark stirring inside of the Wish Granter, something you want nothing of. Your instincts are better than any man's.")
return
else if(is_special_character(user))
user << "Even to a heart as dark as yours, you know nothing good will come of this. Something instinctual makes you pull away."
to_chat(user, "Even to a heart as dark as yours, you know nothing good will come of this. Something instinctual makes you pull away.")
else if (!insistinga)
user << "Your first touch makes the Wish Granter stir, listening to you. Are you really sure you want to do this?"
to_chat(user, "Your first touch makes the Wish Granter stir, listening to you. Are you really sure you want to do this?")
insistinga++
else
@@ -45,36 +45,36 @@
var/wish = input("You want...","Wish") as null|anything in list("Power","Wealth","Immortality","To Kill","Peace")
switch(wish)
if("Power")
user << "<B>Your wish is granted, but at a terrible cost...</B>"
user << "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart."
to_chat(user, "<B>Your wish is granted, but at a terrible cost...</B>")
to_chat(user, "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart.")
user.dna.add_mutation(LASEREYES)
user.dna.add_mutation(COLDRES)
user.dna.add_mutation(XRAY)
user.set_species(/datum/species/shadow)
if("Wealth")
user << "<B>Your wish is granted, but at a terrible cost...</B>"
user << "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart."
to_chat(user, "<B>Your wish is granted, but at a terrible cost...</B>")
to_chat(user, "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart.")
new /obj/structure/closet/syndicate/resources/everything(loc)
user.set_species(/datum/species/shadow)
if("Immortality")
user << "<B>Your wish is granted, but at a terrible cost...</B>"
user << "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart."
to_chat(user, "<B>Your wish is granted, but at a terrible cost...</B>")
to_chat(user, "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart.")
user.verbs += /mob/living/carbon/proc/immortality
user.set_species(/datum/species/shadow)
if("To Kill")
user << "<B>Your wish is granted, but at a terrible cost...</B>"
user << "The Wish Granter punishes you for your wickedness, claiming your soul and warping your body to match the darkness in your heart."
to_chat(user, "<B>Your wish is granted, but at a terrible cost...</B>")
to_chat(user, "The Wish Granter punishes you for your wickedness, claiming your soul and warping your body to match the darkness in your heart.")
ticker.mode.traitors += user.mind
user.mind.special_role = "traitor"
var/datum/objective/hijack/hijack = new
hijack.owner = user.mind
user.mind.objectives += hijack
user << "<B>Your inhibitions are swept away, the bonds of loyalty broken, you are free to murder as you please!</B>"
to_chat(user, "<B>Your inhibitions are swept away, the bonds of loyalty broken, you are free to murder as you please!</B>")
user.mind.announce_objectives()
user.set_species(/datum/species/shadow)
if("Peace")
user << "<B>Whatever alien sentience that the Wish Granter possesses is satisfied with your wish. There is a distant wailing as the last of the Faithless begin to die, then silence.</B>"
user << "You feel as if you just narrowly avoided a terrible fate..."
to_chat(user, "<B>Whatever alien sentience that the Wish Granter possesses is satisfied with your wish. There is a distant wailing as the last of the Faithless begin to die, then silence.</B>")
to_chat(user, "You feel as if you just narrowly avoided a terrible fate...")
for(var/mob/living/simple_animal/hostile/faithless/F in mob_list)
F.death()
@@ -118,13 +118,10 @@
var/mob/living/carbon/C = usr
if(!C.stat)
C << "<span class='notice'>You're not dead yet!</span>"
to_chat(C, "<span class='notice'>You're not dead yet!</span>")
return
C << "<span class='notice'>Death is not your end!</span>"
spawn(rand(80,120))
C.revive(full_heal = 1, admin_revive = 1)
C << "<span class='notice'>You have regenerated.</span>"
C.visible_message("<span class='warning'>[usr] appears to wake from the dead, having healed all wounds.</span>")
C.update_canmove()
return 1
if(C.has_status_effect(STATUS_EFFECT_WISH_GRANTERS_GIFT))
to_chat(C, "<span class='warning'>You're already resurrecting!</span>")
return
C.apply_status_effect(STATUS_EFFECT_WISH_GRANTERS_GIFT)
return 1
+3 -4
View File
@@ -9,7 +9,7 @@
/obj/structure/signpost/New()
. = ..()
SetLuminosity(2)
set_light(2)
/obj/structure/signpost/attackby(obj/item/weapon/W, mob/user, params)
return attack_hand(user)
@@ -22,10 +22,9 @@
if(T)
var/area/A = get_area(T)
user.forceMove(T)
user << "<span class='notice'>You blink and find yourself \
in [A.name].</span>"
to_chat(user, "<span class='notice'>You blink and find yourself in [A.name].</span>")
else
user << "Nothing happens. You feel that this is a bad sign."
to_chat(user, "Nothing happens. You feel that this is a bad sign.")
if("No")
return
+4 -4
View File
@@ -6,10 +6,10 @@ var/global/list/potentialRandomZlevels = generateMapList(filename = "config/away
return
if(potentialRandomZlevels && potentialRandomZlevels.len)
world << "<span class='boldannounce'>Loading away mission...</span>"
to_chat(world, "<span class='boldannounce'>Loading away mission...</span>")
var/map = pick(potentialRandomZlevels)
load_new_z_level(map)
world << "<span class='boldannounce'>Away mission loaded.</span>"
to_chat(world, "<span class='boldannounce'>Away mission loaded.</span>")
/proc/reset_gateway_spawns(reset = FALSE)
for(var/obj/machinery/gateway/G in world)
@@ -28,7 +28,7 @@ var/global/list/potentialRandomZlevels = generateMapList(filename = "config/away
/obj/effect/landmark/awaystart/Destroy()
awaydestinations -= src
..()
return ..()
/proc/generateMapList(filename)
var/list/potentialMaps = list()
@@ -60,4 +60,4 @@ var/global/list/potentialRandomZlevels = generateMapList(filename = "config/away
potentialMaps.Add(t)
return potentialMaps
return potentialMaps