This commit is contained in:
caelaislinn
2012-07-08 23:10:29 +10:00
18 changed files with 122 additions and 82 deletions
+3 -4
View File
@@ -1,4 +1,3 @@
/datum/ai_laws
var/name = "Unknown Laws"
var/randomly_selectable = 0
@@ -93,9 +92,9 @@
src.inherent = list()
/datum/ai_laws/proc/add_supplied_law(var/number, var/law)
// while (src.supplied.len < number + 1)
// src.supplied += ""
//Infinite loop
// This is not an infinite loop, don't be an idiot Sky
while (src.supplied.len < number + 1)
src.supplied += ""
src.supplied[number + 1] = law
+3
View File
@@ -1753,6 +1753,9 @@ proc/oview_or_orange(distance = world.view , center = usr , type)
return
/proc/stringsplit(txt, character)
if(length(character) < 1) //Do not infinite loop when splitting on "" or null
return list(txt)
var/cur_text = txt
var/last_found = 1
var/found_char = findtext(cur_text,character)
+21 -19
View File
@@ -491,22 +491,10 @@
return
/proc/init_shift_change(var/mob/user)
/proc/init_shift_change(var/mob/user, var/force = 0)
if ((!( ticker ) || emergency_shuttle.location))
return
if(emergency_shuttle.deny_shuttle)
user << "Centcom does not currently have a shuttle available in your sector. Please try again later."
return
if(sent_strike_team == 1)
user << "Centcom will not allow the shuttle to be called. Consider all contracts terminated."
return
if(world.time < 54000) // 30 minute grace period to let the game get going
user << "The shuttle is refueling. Please wait another [round((54000-world.time)/600)] minutes before trying again."//may need to change "/600"
return
if(emergency_shuttle.direction == -1)
user << "The shuttle may not be called while returning to CentCom."
return
@@ -515,13 +503,27 @@
user << "The shuttle is already on its way."
return
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || ticker.mode.name == "sandbox")
//New version pretends to call the shuttle but cause the shuttle to return after a random duration.
emergency_shuttle.fake_recall = rand(300,500)
// if force is 0, some things may stop the shuttle call
if(!force)
if(emergency_shuttle.deny_shuttle)
user << "Centcom does not currently have a shuttle available in your sector. Please try again later."
return
if(ticker.mode.name == "blob" || ticker.mode.name == "epidemic")
user << "Under directive 7-10, [station_name()] is quarantined until further notice."
return
if(sent_strike_team == 1)
user << "Centcom will not allow the shuttle to be called. Consider all contracts terminated."
return
if(world.time < 54000) // 30 minute grace period to let the game get going
user << "The shuttle is refueling. Please wait another [round((54000-world.time)/600)] minutes before trying again."//may need to change "/600"
return
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || ticker.mode.name == "sandbox")
//New version pretends to call the shuttle but cause the shuttle to return after a random duration.
emergency_shuttle.fake_recall = rand(300,500)
if(ticker.mode.name == "blob" || ticker.mode.name == "epidemic")
user << "Under directive 7-10, [station_name()] is quarantined until further notice."
return
emergency_shuttle.shuttlealert(1)
emergency_shuttle.incall()
+6
View File
@@ -20,6 +20,7 @@ datum/controller/game_controller
var/global/networks_ready = 0
var/global/powernets_ready = 0
var/global/ticker_ready = 0
var/global/next_crew_shuttle_vote = 2 // the next automatic vote to call the crew shuttle
proc
keepalive()
@@ -145,6 +146,11 @@ datum/controller/game_controller
var/start_time = world.timeofday
// Start an automatic crew shuttle vote every hour starting with the second hour
if(world.time > 10 * 60 * 60 * next_crew_shuttle_vote)
next_crew_shuttle_vote++
automatic_crew_shuttle_vote()
air_master_ready = 0
tension_master_ready = 0
sun_ready = 0
@@ -882,6 +882,7 @@ CIRCULAR SAW
S.open = 0
S.stage = 0
S.status |= ATTACHABLE
S.amputated = 1 // this should prevent the wound from hurting etc.
M.updatehealth()
M.UpdateDamageIcon()
@@ -1,48 +0,0 @@
/*
CONTAINS:
WIRE
TILES
*/
// WIRES
/obj/item/weapon/wire/proc/update()
if (src.amount > 1)
src.icon_state = "spool_wire"
src.desc = text("This is just spool of regular insulated wire. It consists of about [] unit\s of wire.", src.amount)
else
src.icon_state = "item_wire"
src.desc = "This is just a simple piece of regular insulated wire."
return
/obj/item/weapon/wire/attack_self(mob/user as mob)
if (src.laying)
src.laying = 0
user << "\blue You're done laying wire!"
else
user << "\blue You are not using this to lay wire..."
return
/obj/item/weapon/wire/attack(mob/M as mob, mob/user as mob)
if(hasorgans(M))
var/datum/organ/external/S = M:organs[user.zone_sel.selecting]
if(!(S.status & ROBOT) || user.a_intent != "help")
return ..()
if(S.brute_dam)
S.heal_damage(0,15,0,1)
if(user != M)
user.visible_message("\red You repair some burn damage on \the [M]'s [S.display_name]",\
"\red \The [user] repairs some burn damage on \the [M]'s [S.display_name] with \the [src]",\
"You wires being cut.")
else
user.visible_message("\red You repair some burn damage on your [S.display_name]",\
"\red \The [user] repairs some burn damage on their [S.display_name] with \the [src]",\
"You wires being cut.")
else
user << "Nothing to fix!"
else
return ..()
+36 -4
View File
@@ -118,8 +118,8 @@
log_game("Rebooting due to restart vote")
world.Reboot()
else
// Call the shift change shuttle instead
init_shift_change()
// Call the shift change shuttle instead, the 1 is to force the shuttle to come
init_shift_change(null, 1)
return
@@ -131,7 +131,7 @@
var/best = -1
for(var/v in votes)
if(v=="none")
if(v=="none"||v=="default")
continue
if(best < votes[v])
best = votes[v]
@@ -140,7 +140,7 @@
var/list/winners = list()
for(var/v in votes)
if(votes[v] == best)
if(votes[v] == best && v != "default" && v != "none")
winners += v
var/ret = ""
@@ -447,3 +447,35 @@
usr.vote()
return
proc/automatic_crew_shuttle_vote()
if(vote.voting)
return
if(!vote.canvote() ) // double check even though this shouldn't happen
return
vote.mode = 0
vote.instant_restart = 0
vote.voting = 1 // now voting
vote.votetime = world.timeofday + config.vote_period*10 // when the vote will end
spawn(config.vote_period*10)
vote.endvote()
world << "\red<B>*** An *automatic* vote to call the crew transfer shuttle has been initiated.</B>"
world << "\red You have [vote.timetext(config.vote_period)] to vote."
world << "\red<B>*** Please make sure to only vote 'no' if you yourself are currently enjoying the round. If you find the round to have gone stale, you should always vote 'yes', regardless of how others are feeling about the round.</B>"
log_vote("Automatic vote to call the crew transfer shuttle.")
for(var/mob/CM in world)
if(CM.client)
if( !CM.is_player_active() )
CM.client.vote = "none"
else
CM.client.vote = "none"
return
@@ -284,7 +284,7 @@
for(var/organ in list("l_leg","l_foot","r_leg","r_foot"))
var/datum/organ/external/o = organs["[organ]"]
if(o.status & BROKEN)
if((o.status & BROKEN) || (o.status & DESTROYED))
if(o.status & SPLINTED)
tally += 3
else
+1 -1
View File
@@ -22,7 +22,7 @@
var/mob/living/carbon/human/M = src
for(var/name in M.organs)
var/datum/organ/external/organ = M.organs[name]
if(organ.status & DESTROYED)
if((organ.status & DESTROYED) && !organ.amputated)
src.traumatic_shock += 60
else if(organ.status & BROKEN || organ.open)
src.traumatic_shock += 30
+8
View File
@@ -358,3 +358,11 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
else
I.loc = get_turf(src)
update_clothing()
/mob/proc/is_player_active()
if(!src.client) return 0
if(src.client.inactivity > 10 * 60 * 10) return 0
if(src.stat == 2) return 0
return 1
@@ -1232,6 +1232,7 @@ datum/preferences
var/status = organ_data[name]
if(status == "amputated")
O.amputated = 1
O.status |= DESTROYED
O.destspawn = 1
else if(status == "cyborg")
@@ -221,10 +221,10 @@ datum/preferences
else
preview_icon = new /icon('human.dmi', "torso_[g]_s", "dir" = preview_dir)
preview_icon.Blend(new /icon('human.dmi', "chest_[g]_s"), ICON_OVERLAY, "dir" = preview_dir)
preview_icon.Blend(new /icon('human.dmi', "chest_[g]_s", "dir" = preview_dir), ICON_OVERLAY)
if(organ_data["head"] != "amputated")
preview_icon.Blend(new /icon('human.dmi', "head_[g]_s"), ICON_OVERLAY, "dir" = preview_dir)
preview_icon.Blend(new /icon('human.dmi', "head_[g]_s", "dir" = preview_dir), ICON_OVERLAY)
for(var/name in list("l_arm","r_arm","l_leg","r_leg","l_foot","r_foot","l_hand","r_hand"))
// make sure the organ is added to the list so it's drawn
+1
View File
@@ -97,6 +97,7 @@ var/list/wound_progressions = list(
var/tmp/perma_injury = 0
var/tmp/perma_dmg = 0
var/tmp/destspawn = 0 //Has it spawned the broken limb?
var/tmp/amputated = 0 // Whether this has been cleanly amputated, thus causing no pain
var/min_broken_damage = 30
var/datum/organ/external/parent
+3
View File
@@ -55,6 +55,9 @@ mob/living/carbon/human/proc/handle_pain()
var/datum/organ/external/damaged_organ = null
for(var/name in organs)
var/datum/organ/external/E = organs[name]
// amputated limbs don't cause pain
if(E.amputated) continue
var/dam = E.get_damage()
// make the choice of the organ depend on damage,
// but also sometimes use one of the less damaged ones
+22
View File
@@ -454,6 +454,28 @@
return
/obj/item/weapon/cable_coil/attack(mob/M as mob, mob/user as mob)
if(hasorgans(M))
var/datum/organ/external/S = M:organs[user.zone_sel.selecting]
if(!(S.status & ROBOT) || user.a_intent != "help")
return ..()
if(S.burn_dam > 0)
S.heal_damage(0,15,0,1)
if(user != M)
user.visible_message("\red \The [user] repairs some burn damage on their [S.display_name] with \the [src]",\
"\red You repair some burn damage on your [S.display_name]",\
"You hear wires being cut.")
else
user.visible_message("\red \The [user] repairs some burn damage on their [S.display_name] with \the [src]",\
"\red You repair some burn damage on your [S.display_name]",\
"You hear wires being cut.")
else
user << "Nothing to fix!"
else
return ..()
/obj/structure/cable/proc/mergeConnectedNetworks(var/direction)
var/turf/TB
if((d1 == direction || d2 == direction) != 1)
-1
View File
@@ -1,4 +1,3 @@
asanadas: Book Berner: /obj/item/clothing/under/chameleon/psyche, /obj/item/clothing/glasses/meson/fluff/book_berner_1
atomicdog92: Seth Sealis: /obj/item/clothing/suit/storage/det_suit/fluff/leatherjack
botanistpower: Walter Brooks: /obj/item/clothing/gloves/fluff/walter_brooks_1
chinsky: Victor Kaminski: /obj/item/fluff/victor_kaminsky_1
+2 -1
View File
@@ -9,4 +9,5 @@ asanadas
deusdactyl
densane
bowlsoldier
fenrisian
fenrisian
madmalicemccrea
+11 -1
View File
@@ -57,7 +57,8 @@ Stuff which is in development and not yet visible to players or just code relate
should be listed in the changelog upon commit though. Thanks. -->
<!-- To take advantage of the pretty new format (well it was new when I wrote this anyway), open the "add-to-changelog.html" file in any browser and add the stuff and then generate the html code and paste it here -->
<div class="commit sansserif">
<div class="commit sansserif">
<h2 class="date">5 July 2012</h2>
<h3 class="author">Cael_Aislinn updated:</h3>
<ul class="changes bgimages16">
@@ -65,6 +66,15 @@ should be listed in the changelog upon commit though. Thanks. -->
<li class="bugfix">Shield generators now have circuitboards, and the capacitors should actually rotate now (both still have placeholder sprites though).</li>
</ul>
</div>
<div class="commit sansserif">
<h2 class="date">3 July 2012</h2>
<h3 class="author">CIB updated:</h3>
<ul class="changes bgimages16">
<li class="rscadd">You can now select amputated and robot limbs in the character preferences. Note, though, that amputated limbs don't work properly yet.</li>
</ul>
</div>
<div class="commit sansserif">
<h2 class="date">29 June 2012</h2>
<h3 class="author">Erthilo updated:</h3>