diff --git a/code/datums/ai_laws.dm b/code/datums/ai_laws.dm index abc4125745..5bb04339ba 100644 --- a/code/datums/ai_laws.dm +++ b/code/datums/ai_laws.dm @@ -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 diff --git a/code/defines/procs/helpers.dm b/code/defines/procs/helpers.dm index 341d5944b5..fa7b71f473 100644 --- a/code/defines/procs/helpers.dm +++ b/code/defines/procs/helpers.dm @@ -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) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 8bf065bbea..98986275f2 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -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() diff --git a/code/game/master_controller.dm b/code/game/master_controller.dm index 1a404e2c3a..ab925dc696 100644 --- a/code/game/master_controller.dm +++ b/code/game/master_controller.dm @@ -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 diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm index b24fd8440e..716d7bdc14 100644 --- a/code/game/objects/items/weapons/surgery_tools.dm +++ b/code/game/objects/items/weapons/surgery_tools.dm @@ -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() diff --git a/code/game/objects/items/weapons/tiles_wires.dm b/code/game/objects/items/weapons/tiles_wires.dm index 7d449f53a5..e69de29bb2 100644 --- a/code/game/objects/items/weapons/tiles_wires.dm +++ b/code/game/objects/items/weapons/tiles_wires.dm @@ -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 ..() - - diff --git a/code/game/vote.dm b/code/game/vote.dm index e4d037fb87..a798a3e5f0 100644 --- a/code/game/vote.dm +++ b/code/game/vote.dm @@ -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*** An *automatic* vote to call the crew transfer shuttle has been initiated." + world << "\red You have [vote.timetext(config.vote_period)] to vote." + world << "\red*** 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." + + 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 \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index c60d670e45..b791b9a9ba 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -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 diff --git a/code/modules/mob/living/carbon/shock.dm b/code/modules/mob/living/carbon/shock.dm index fea6ef34ab..f091199f3b 100644 --- a/code/modules/mob/living/carbon/shock.dm +++ b/code/modules/mob/living/carbon/shock.dm @@ -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 diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index a844f2cc78..80d52c6ea2 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -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 \ No newline at end of file diff --git a/code/modules/mob/new_player/preferences.dm b/code/modules/mob/new_player/preferences.dm index 2478ce7243..a511b9dc3f 100644 --- a/code/modules/mob/new_player/preferences.dm +++ b/code/modules/mob/new_player/preferences.dm @@ -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") diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index 05d983d85c..4ebffa1aa2 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -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 diff --git a/code/modules/mob/organ/organ.dm b/code/modules/mob/organ/organ.dm index 3911db351d..3d9844c625 100644 --- a/code/modules/mob/organ/organ.dm +++ b/code/modules/mob/organ/organ.dm @@ -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 diff --git a/code/modules/mob/organ/pain.dm b/code/modules/mob/organ/pain.dm index 3213b26ffa..456a94086f 100644 --- a/code/modules/mob/organ/pain.dm +++ b/code/modules/mob/organ/pain.dm @@ -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 diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index a94ae012ae..e71e16908f 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -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) diff --git a/config/custom_items.txt b/config/custom_items.txt index 507ac4fd99..2e32aedef1 100644 --- a/config/custom_items.txt +++ b/config/custom_items.txt @@ -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 diff --git a/config/moderators.txt b/config/moderators.txt index f36a950193..ff4bb955d9 100644 --- a/config/moderators.txt +++ b/config/moderators.txt @@ -9,4 +9,5 @@ asanadas deusdactyl densane bowlsoldier -fenrisian \ No newline at end of file +fenrisian +madmalicemccrea \ No newline at end of file diff --git a/html/changelog.html b/html/changelog.html index 28041459a4..0c67f22c8b 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -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. --> -
+ +

5 July 2012

Cael_Aislinn updated:

+ +
+

3 July 2012

+

CIB updated:

+ +
+

29 June 2012

Erthilo updated: