Skip to content

Commit

Permalink
Merge pull request #12 from ParadiseSS13/master
Browse files Browse the repository at this point in the history
Merge From Master
  • Loading branch information
Fox-McCloud committed Dec 8, 2014
2 parents 4bbc2be + 8b59fc7 commit 1b9429c
Show file tree
Hide file tree
Showing 86 changed files with 2,795 additions and 2,600 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

#ignore other, specific files and folers
data/
maps/backup/*
maps/cyberiad.dmm.backup
nano/debug.html
/maps/backup/*
/maps/cyberiad.dmm.backup
/nano/debug.html
4 changes: 2 additions & 2 deletions COPYING
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Baystation12
Copyright (C) 2010-2013 Baystation12 and tgstation13.
Paradise
Copyright (C) 2010-2014 Paradise, Baystation12 and tgstation13.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
1 change: 1 addition & 0 deletions code/WorkInProgress/computer3/computers/communications.dm
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
if(STATE_CANCELSHUTTLE)
dat = confirm_menu("cancel the shuttle","cancelshuttle2")
if(STATE_MESSAGELIST)
dat += "\[ <A HREF='?src=\ref[src];main'>Back</A> \]<BR>"
dat += "Messages:"
for(var/i = 1; i<=messagetitle.len; i++)
dat += "<BR><A HREF='?src=\ref[src];viewmessage;message-num=[i]'>[messagetitle[i]]</A>"
Expand Down
24 changes: 2 additions & 22 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ Turf and target are seperate in case you want to teleport some distance from a t
if(oldname != real_name)
R.notify_ai(3, oldname, newname)
if(R.camera)
R.camera.c_tag = real_name
R.camera.c_tag = real_name

if(oldname)
//update the datacore records! This is goig to be a bit costly.
for(var/list/L in list(data_core.general,data_core.medical,data_core.security,data_core.locked))
Expand Down Expand Up @@ -639,26 +639,6 @@ var/list/sortMobsOrder = list( "/mob/living/silicon/ai",
// if a valid atom reference is supplied, call the atom's Topic() with "close=1"
// otherwise, just reset the client mob's machine var.
//
/client/verb/windowclose(var/atomref as text)
set hidden = 1 // hide this verb from the user's panel
set name = ".windowclose" // no autocomplete on cmd line

//world << "windowclose: [atomref]"
if(atomref!="null") // if passed a real atomref
var/hsrc = locate(atomref) // find the reffed atom
var/href = "close=1"
if(hsrc)
//world << "[src] Topic [href] [hsrc]"
usr = src.mob
src.Topic(href, params2list(href), hsrc) // this will direct to the atom's
return // Topic() proc via client.Topic()

// no atomref specified (or not found)
// so just reset the user mob's machine var
if(src && src.mob)
//world << "[src] was [src.mob.machine], setting to null"
src.mob.unset_machine()
return

//Will return the location of the turf an atom is ultimatly sitting on
/proc/get_turf_loc(var/atom/movable/M) //gets the location of the turf that the atom is on, or what the atom is in is on, etc
Expand Down
9 changes: 9 additions & 0 deletions code/_onclick/cyborg.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@

face_atom(A) // change direction to face what you clicked on

if(aiCamera)
if(aiCamera.in_camera_mode)
aiCamera.camera_mode_off()
if(is_component_functioning("camera"))
aiCamera.captureimage(A, usr)
else
src << "<span class='userdanger'>Your camera isn't functional.</span>"
return

/*
cyborg restrained() currently does nothing
if(restrained())
Expand Down
1 change: 1 addition & 0 deletions code/_onclick/hud/_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
#define ui_alien_head "4:12,1:5" //aliens
#define ui_alien_oclothing "5:14,1:5" //aliens

#define ui_borg_sensor "5:16,1:5" //borgs
#define ui_inv1 "6:16,1:5" //borgs
#define ui_inv2 "7:16,1:5" //borgs
#define ui_inv3 "8:16,1:5" //borgs
Expand Down
6 changes: 1 addition & 5 deletions code/_onclick/hud/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,12 @@

//Medical/Security sensors
using = new /obj/screen()
using.name = "Toggle Sensors"
using.name = "Set Sensor Augmentation"
using.icon = 'icons/mob/screen_ai.dmi'
using.icon_state = "ai_sensor"
using.screen_loc = ui_ai_sensor
using.layer = 20
adding += using

mymob.client.screen += adding + other
return

mymob.client.screen += adding + other

return
9 changes: 9 additions & 0 deletions code/_onclick/hud/robot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@

//End of module select

//Sec/Med HUDs
using = new /obj/screen()
using.name = "Toggle Sensor Augmentation"
using.icon = 'icons/mob/screen_ai.dmi'
using.icon_state = "ai_sensor"
using.screen_loc = ui_borg_sensor
using.layer = 20
adding += using

//Intent
using = new /obj/screen()
using.name = "act_intent"
Expand Down
7 changes: 6 additions & 1 deletion code/_onclick/hud/screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,11 @@
R.uneq_active()
R.hud_used.update_robot_modules_display()

if("Toggle Sensor Augmentation")
if(isrobot(usr))
var/mob/living/silicon/robot/R = usr
R.control_hud()

if("module1")
if(istype(usr, /mob/living/silicon/robot))
usr:toggle_module(1)
Expand Down Expand Up @@ -549,7 +554,7 @@
var/mob/living/silicon/ai/AI = usr
AI.aiCamera.viewpictures()

if("Toggle Sensors")
if("Set Sensor Augmentation")
if(isAI(usr))
var/mob/living/silicon/ai/AI = usr
AI.control_hud()
Expand Down
2 changes: 1 addition & 1 deletion code/datums/browser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
// if a valid atom reference is supplied, call the atom's Topic() with "close=1"
// otherwise, just reset the client mob's machine var.
//
/client/verb/windowclosed(var/atomref as text)
/client/verb/windowclose(var/atomref as text)
set hidden = 1 // hide this verb from the user's panel
set name = ".windowclose" // no autocomplete on cmd line

Expand Down
28 changes: 28 additions & 0 deletions code/datums/supplypacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,17 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
access = access_security
group = "Security"

/datum/supply_packs/disabler
name = "Disabler Crate"
contains = list(/obj/item/weapon/gun/energy/disabler,
/obj/item/weapon/gun/energy/disabler,
/obj/item/weapon/gun/energy/disabler)
cost = 10
containertype = /obj/structure/closet/crate/secure/weapon
containername = "disabler crate"
access = access_security
group = "Security"

/datum/supply_packs/eweapons
name = "Experimental weapons crate"
contains = list(/obj/item/weapon/flamethrower/full,
Expand Down Expand Up @@ -1103,11 +1114,28 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/autodrobe
name = "Autodrobe Supply crate"
contains = list(/obj/item/weapon/vending_refill/autodrobe,
/obj/item/weapon/vending_refill/autodrobe,
/obj/item/weapon/vending_refill/autodrobe)
cost = 15
containertype = /obj/structure/closet/crate
containername = "autodrobe supply crate"
group = "Operations"

/datum/supply_packs/clothingvendor
name = "Clothing Vendor Supply crate"
contains = list(/obj/item/weapon/vending_refill/hatdispenser,
/obj/item/weapon/vending_refill/hatdispenser,
/obj/item/weapon/vending_refill/hatdispenser,
/obj/item/weapon/vending_refill/suitdispenser,
/obj/item/weapon/vending_refill/suitdispenser,
/obj/item/weapon/vending_refill/suitdispenser,
/obj/item/weapon/vending_refill/shoedispenser,
/obj/item/weapon/vending_refill/shoedispenser,
/obj/item/weapon/vending_refill/shoedispenser)
cost = 30
containertype = /obj/structure/closet/crate
containername = "clothing vendor supply crate"
group = "Operations"

/datum/supply_packs/mafia
name = "Mafia Supply crate"
Expand Down
82 changes: 82 additions & 0 deletions code/defines/procs/hud.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/* Using the HUD procs is simple. Call these procs in the life.dm of the intended mob.
Use the regular_hud_updates() proc before process_med_hud(mob) or process_sec_hud(mob) so
the HUD updates properly! */

//Medical HUD outputs. Called by the Life() proc of the mob using it, usually.
proc/process_med_hud(var/mob/M, var/local_scanner, var/mob/Alt)
if(!can_process_hud(M))
return

var/datum/arranged_hud_process/P = arrange_hud_process(M, Alt, med_hud_users)
for(var/mob/living/carbon/human/patient in P.Mob.in_view(P.Turf))
if(P.Mob.see_invisible < patient.invisibility)
continue

if(!local_scanner)
if(istype(patient.w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/U = patient.w_uniform
if(U.sensor_mode < 2)
continue
else
continue

P.Client.images += patient.hud_list[HEALTH_HUD]
if(local_scanner)
P.Client.images += patient.hud_list[STATUS_HUD]

//Security HUDs. Pass a value for the second argument to enable implant viewing or other special features.
proc/process_sec_hud(var/mob/M, var/advanced_mode, var/mob/Alt)
if(!can_process_hud(M))
return
var/datum/arranged_hud_process/P = arrange_hud_process(M, Alt, sec_hud_users)
for(var/mob/living/carbon/human/perp in P.Mob.in_view(P.Turf))
if(P.Mob.see_invisible < perp.invisibility)
continue

P.Client.images += perp.hud_list[ID_HUD]
if(advanced_mode)
P.Client.images += perp.hud_list[WANTED_HUD]
P.Client.images += perp.hud_list[IMPTRACK_HUD]
P.Client.images += perp.hud_list[IMPLOYAL_HUD]
P.Client.images += perp.hud_list[IMPCHEM_HUD]

datum/arranged_hud_process
var/client/Client
var/mob/Mob
var/turf/Turf

proc/arrange_hud_process(var/mob/M, var/mob/Alt, var/list/hud_list)
hud_list |= M
var/datum/arranged_hud_process/P = new
P.Client = M.client
P.Mob = Alt ? Alt : M
P.Turf = get_turf(P.Mob)
return P

proc/can_process_hud(var/mob/M)
if(!M)
return 0
if(!M.client)
return 0
if(M.stat != CONSCIOUS)
return 0
return 1

//Deletes the current HUD images so they can be refreshed with new ones.
mob/proc/regular_hud_updates() //Used in the life.dm of mobs that can use HUDs.
if(client)
for(var/image/hud in client.images)
if(copytext(hud.icon_state,1,4) == "hud")
client.images -= hud
med_hud_users -= src
sec_hud_users -= src

mob/proc/in_view(var/turf/T)
return view(T)

/mob/aiEye/in_view(var/turf/T)
var/list/viewed = new
for(var/mob/living/carbon/human/H in mob_list)
if(get_dist(H, T) <= 7)
viewed += H
return viewed
22 changes: 13 additions & 9 deletions code/game/gamemodes/events/ninja_equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -682,17 +682,21 @@ ________________________________________________________________________________
pai.attack_self(U)

if("Eject pAI")
var/turf/T = get_turf(loc)
if(!U.get_active_hand())
U.put_in_hands(pai)
pai.add_fingerprint(U)
pai = null
else
if(T)
pai.loc = T
if(pai)
if(pai.loc != src)
pai = null
else
U << "\red <b>ERROR<b>: \black Could not eject pAI card."
var/turf/T = get_turf(loc)
if(!U.get_active_hand())
U.put_in_hands(pai)
pai.add_fingerprint(U)
pai = null
else
if(T)
pai.loc = T
pai = null
else
U << "\red <b>ERROR<b>: \black Could not eject pAI card."

if("Override AI Laws")
var/law_zero = A.laws.zeroth//Remembers law zero, if there is one.
Expand Down
5 changes: 5 additions & 0 deletions code/game/gamemodes/gameticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ var/global/datum/controller/gameticker/ticker
var/event_time = null
var/event = 0

var/login_music // music played in pregame lobby

var/list/datum/mind/minds = list()//The people in the game. Used for objective tracking.

Expand All @@ -38,6 +39,10 @@ var/global/datum/controller/gameticker/ticker
var/initialtpass = 0 //holder for inital autotransfer vote timer

/datum/controller/gameticker/proc/pregame()
login_music = pick(\
'sound/music/space.ogg',\
'sound/music/Title1.ogg',\
'sound/music/Title2.ogg',)
do
pregame_timeleft = 180
world << "<B><FONT color='blue'>Welcome to the pre-game lobby!</FONT></B>"
Expand Down

0 comments on commit 1b9429c

Please sign in to comment.