Merge branch 'bleeding-edge-freeze' of github.com:Baystation12/Baystation12 into feature

Conflicts:
	code/ZAS/ZAS_Zones.dm
	code/game/gamemodes/events.dm
This commit is contained in:
cib
2012-12-16 15:10:04 +01:00
50 changed files with 645 additions and 158 deletions
+23 -1
View File
@@ -21,6 +21,9 @@
// Doesn't necessarily trigger an event, but might. Returns 1 if it did.
/proc/event()
event = 1
if(!sent_ninja_to_station)
choose_space_ninja()
return
var/minutes_passed = world.time/600
@@ -50,12 +53,28 @@
possibleEvents["Appendicitis"] = medical_count * 50
if(security_count >= 1)
possibleEvents["Prison Break"] = security_count * 50
possibleEvents["Space Ninja"] = security_count * 10 // very low chance for space ninja event
var/picked_event = pick(possibleEvents)
var/chance = possibleEvents[picked_event]
var/base_chance = 0.4
switch(player_list.len)
if(5 to 10)
base_chance = 0.6
if(11 to 15)
base_chance = 0.7
if(16 to 20)
base_chance = 0.8
if(21 to 25)
base_chance = 0.9
if(26 to 30)
base_chance = 1.0
if(30 to 100000)
base_chance = 1.1
// Trigger the event based on how likely it currently is.
if(!prob(chance * eventchance * player_list.len / 20)) // "normal" event chance at 20 players
if(!prob(chance * eventchance * base_chance)) // "normal" event chance at 20 players
return 0
switch(picked_event)
@@ -70,6 +89,9 @@
spawn_meteors()
if("Blob")
mini_blob_event()
if("Space Ninja")
//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like.
choose_space_ninja()
if("Radiation")
high_radiation_event()
if("Virus")
+28 -12
View File
@@ -93,7 +93,33 @@ When I already created about 4 new objectives, this doesn't seem terribly import
/var/global/toggle_space_ninja = 1//If ninjas can spawn or not.
/var/global/sent_ninja_to_station = 0//If a ninja is already on the station.
/proc/space_ninja_arrival()
/proc/choose_space_ninja()
var/list/candidates = list() //list of candidate keys
for(var/mob/dead/observer/G in player_list)
if(G.client && ((G.client.inactivity/10)/60) <= 5 && G.client.be_spaceninja)
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
candidates += G
if(!candidates.len) return
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
//loop over all viable candidates, giving them a popup asking if they want to be space ninja
var/mob/dead/observer/accepted_ghost
while(candidates.len && !accepted_ghost)
//ask a different random candidate
var/mob/dead/observer/G = pick(candidates)
//give the popup a 30 second timeout in case the player is AFK
if(sd_Alert(G, "A space ninja is about to spawn. Would you like to play as the ninja?", "Space Ninja", list("Yes","No"), "Yes", 300, 1, "350x125") == "Yes")
accepted_ghost = G
else
candidates -= G
if(accepted_ghost)
//someone accepted
space_ninja_arrival(accepted_ghost)
/proc/space_ninja_arrival(var/mob/dead/observer/G)
if(!G)
return choose_space_ninja()
var/datum/game_mode/current_mode = ticker.mode
var/datum/mind/current_mind
@@ -137,19 +163,9 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp
if(L.name == "carpspawn")
spawn_list.Add(L)
var/list/candidates = list() //list of candidate keys
for(var/mob/dead/observer/G in player_list)
if(G.client && !G.client.holder && ((G.client.inactivity/10)/60) <= 5)
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
candidates += G.key
if(!candidates.len) return
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
//The ninja will be created on the right spawn point or at late join.
var/mob/living/carbon/human/new_ninja = create_space_ninja(pick(spawn_list.len ? spawn_list : latejoin ))
new_ninja.key = pick(candidates)
new_ninja.key = G.ckey
new_ninja.wear_suit:randomize_param()//Give them a random set of suit parameters.
new_ninja.internal = new_ninja.s_store //So the poor ninja has something to breath when they spawn in spess.
new_ninja.internals.icon_state = "internal1"
-12
View File
@@ -148,18 +148,6 @@ var/global/datum/controller/gameticker/ticker
spawn(3000)
statistic_cycle() // Polls population totals regularly and stores them in an SQL DB -- TLE
//setup vermin spawn areas
var/list/vermin_spawn_areas = list("/area/maintenance","/area/mine/maintenance","/area/crew_quarters/locker/locker_toilet","/area/crew_quarters/toilet")
vermin_spawn_turfs = new/list()
for(var/area_text in vermin_spawn_areas)
var/area_base_type = text2path(area_text)
for(var/area in typesof(area_base_type))
var/list/area_turfs = get_area_turfs(area)
for(var/turf/T in area_turfs)
if(T.density)
area_turfs -= T
vermin_spawn_turfs.Add(area_turfs)
return 1
/datum/controller/gameticker
-9
View File
@@ -68,9 +68,6 @@
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
return 1
@@ -120,9 +117,6 @@
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
return 1
@@ -156,7 +150,4 @@
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
return 1
+1 -1
View File
@@ -154,7 +154,7 @@
update_desc()
break
user << desc
if(P.loc != src && !istype(P, /obj/item/weapon/cable_coil))
if(P && P.loc != src && !istype(P, /obj/item/weapon/cable_coil))
user << "\red You cannot add that component to the machine!"
+1
View File
@@ -2,6 +2,7 @@
desc = "An aging combat exosuit utilized by the Nanotrasen corporation. Originally developed to combat hostile alien lifeforms."
name = "Durand"
icon_state = "durand"
initial_icon = "durand"
step_in = 4
dir_in = 1 //Facing North.
health = 400
+2
View File
@@ -2,6 +2,7 @@
desc = "A lightweight, security exosuit. Popular among private and corporate security."
name = "Gygax"
icon_state = "gygax"
initial_icon = "gygax"
step_in = 3
dir_in = 1 //Facing North.
health = 300
@@ -19,6 +20,7 @@
desc = "A lightweight exosuit used by Nanotrasen Death Squads. A significantly upgraded Gygax security mech."
name = "Dark Gygax"
icon_state = "darkgygax"
initial_icon = "darkgygax"
health = 400
deflect_chance = 25
damage_absorption = list("brute"=0.6,"fire"=0.8,"bullet"=0.6,"laser"=0.5,"energy"=0.65,"bomb"=0.8)
+1
View File
@@ -2,6 +2,7 @@
desc = "Produced by \"Tyranny of Honk, INC\", this exosuit is designed as heavy clown-support. Used to spread the fun and joy of life. HONK!"
name = "H.O.N.K"
icon_state = "honker"
initial_icon = "honker"
step_in = 2
health = 140
deflect_chance = 60
+3
View File
@@ -2,6 +2,7 @@
desc = "Heavy-duty, combat exosuit, developed after the Durand model. Rarely found among civilian populations."
name = "Marauder"
icon_state = "marauder"
initial_icon = "marauder"
step_in = 5
health = 500
deflect_chance = 25
@@ -25,6 +26,7 @@
desc = "Heavy-duty, command-type exosuit. This is a custom model, utilized only by high-ranking military personnel."
name = "Seraph"
icon_state = "seraph"
initial_icon = "seraph"
operation_req_access = list(access_cent_creed)
step_in = 3
health = 550
@@ -37,6 +39,7 @@
desc = "Heavy-duty, combat exosuit, developed off of the existing Marauder model."
name = "Mauler"
icon_state = "mauler"
initial_icon = "mauler"
operation_req_access = list(access_syndicate)
wreckage = /obj/effect/decal/mecha_wreckage/mauler
+1
View File
@@ -2,6 +2,7 @@
desc = "An exosuit which can only be described as 'WTF?'."
name = "Phazon"
icon_state = "phazon"
initial_icon = "phazon"
step_in = 1
dir_in = 1 //Facing North.
step_energy_drain = 3
+9 -4
View File
@@ -18,6 +18,7 @@
unacidable = 1 //and no deleting hoomans inside
layer = MOB_LAYER //icon draw layer
infra_luminosity = 15 //byond implementation is bugged.
var/initial_icon = "" //Mech type for resetting icon.
var/can_move = 1
var/mob/living/carbon/occupant = null
var/step_in = 10 //make a step in step_in/10 sec.
@@ -678,6 +679,7 @@
/obj/mecha/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/device/mmi))
if(mmi_move_inside(W,user))
user << "[src]-MMI interface initialized successfuly"
@@ -1025,7 +1027,7 @@
src.add_fingerprint(H)
src.forceMove(src.loc)
src.log_append_to_last("[H] moved in as pilot.")
src.icon_state = initial(icon_state)
src.icon_state = src.reset_icon()
dir = dir_in
playsound(src, 'sound/machines/windowdoor.ogg', 50, 1)
if(!hasInternalDamage())
@@ -1086,7 +1088,7 @@
src.verbs -= /obj/mecha/verb/eject
src.Entered(mmi_as_oc)
src.Move(src.loc)
src.icon_state = initial(icon_state)
src.icon_state = src.reset_icon()
dir = dir_in
src.log_message("[mmi_as_oc] moved in as pilot.")
if(!hasInternalDamage())
@@ -1175,7 +1177,7 @@
src.occupant.canmove = 0
src.verbs += /obj/mecha/verb/eject
src.occupant = null
src.icon_state = initial(icon_state)+"-open"
src.icon_state = src.reset_icon()+"-open"
src.dir = dir_in
return
@@ -1662,6 +1664,9 @@
return 1
return 0
/obj/mecha/proc/reset_icon()
icon_state = initial_icon
return icon_state
//////////////////////////////////////////
//////// Mecha global iterators ////////
@@ -1792,4 +1797,4 @@
//src.health = initial(src.health)/2.2
//src.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
return
*/
*/
+1
View File
@@ -2,6 +2,7 @@
desc = "These exosuits are developed and produced by Vey-Med. (&copy; All rights reserved)."
name = "Odysseus"
icon_state = "odysseus"
initial_icon = "odysseus"
step_in = 2
max_temperature = 1500
health = 120
+16
View File
@@ -2,6 +2,7 @@
desc = "Autonomous Power Loader Unit. The workhorse of the exosuit world."
name = "APLU \"Ripley\""
icon_state = "ripley"
initial_icon = "ripley"
step_in = 6
max_temperature = 1000
health = 200
@@ -19,6 +20,7 @@
desc = "Standart APLU chassis was refitted with additional thermal protection and cistern."
name = "APLU \"Firefighter\""
icon_state = "firefighter"
initial_icon = "firefighter"
max_temperature = 2500
health = 250
lights_power = 8
@@ -29,6 +31,7 @@
desc = "OH SHIT IT'S THE DEATHSQUAD WE'RE ALL GONNA DIE"
name = "DEATH-RIPLEY"
icon_state = "deathripley"
initial_icon = "deathripley"
step_in = 2
opacity=0
lights_power = 60
@@ -44,6 +47,7 @@
/obj/mecha/working/ripley/mining
desc = "An old, dusty mining ripley."
name = "APLU \"Miner\""
initial_icon = "ripley"
/obj/mecha/working/ripley/mining/New()
..()
@@ -110,4 +114,16 @@
return
/obj/mecha/working/ripley/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/fluff/butcher_royce_1))
src.icon_state = "titan"
src.initial_icon = "titan"
src.name = "APLU \"Titan's Fist\""
src.desc = "This ordinary mining Ripley has been customized to look like a unit of the Titans Fist."
user << "You spend some quality time with the Ripley, customising it to look like a \"Titan's Fist\" APLU."
user.drop_item()
del(W)
return
else
..()
@@ -8,7 +8,7 @@
..()
human
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/up,/obj/effect/decal/cleanable/blood/gibs/down,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/body,/obj/effect/decal/cleanable/blood/gibs/limb,/obj/effect/decal/cleanable/blood/gibs/core)
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/down,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core)
gibamounts = list(1,1,1,1,1,1,1)
New()
@@ -95,7 +95,8 @@
"/obj/item/stack/medical",
"/obj/item/device/flashlight/pen",
"/obj/item/clothing/mask/surgical",
"/obj/item/clothing/gloves/latex"
"/obj/item/clothing/gloves/latex",
"/obj/item/weapon/reagent_containers/hypospray/autoinjector"
)
@@ -153,4 +154,4 @@
storage_slots = 1
can_hold = list(
"/obj/item/clothing/mask/luchador"
)
)