12/21 modernizations from TG live (#103)

* sync (#3)

* shuttle auto call

* Merge /vore into /master (#39)

* progress

* Compile errors fixed

No idea if it's test worthy tho as conflicts with race overhaul and
narky removal.

* Update admins.txt

* efforts continue

Fuck grab code, seriously

* grab code is cancer

* Execute the Narkism

Do not hesitate.

Show no mercy.

* holy shit grab code is awful

* have I bitched about grab code

My bitching, let me show you it

* código de agarre es una mierda

No really it is

* yeah I don't even know anymore.

* Lolnope. Fuck grab code

* I'm not even sure what to fix anymore

* Self eating is not an acceptable fate

* Taste the void, son.

* My code doesn't pass it's own sanity check.

Maybe it's a sign of things to come.

* uncommented and notes

* It Works and I Don't Know Why (#38)

* shuttle auto call

* it works and I don't know why

* Subsystem 12/21

Most Recent TG subsystem folder

* globalvars 12/21

Tossed out the flavor_misc and parallax files

* Onclick 12/21

as well as .dme updates

* _defines 12/21

ommited old _MC.dm

* _HELPERS 12/21

Preserved snowflake placement of furry sprites

* _defeines/genetics

reapplied narkism holdover for snowflake races.

* Oops forgot mutant colors

* modules porting 12/21 + Sounds/icons

Admin, Client and most of mob life files ommitted

* enviroment file

* Admin optimizations

ahelp log system kept

* Mob ports 12/21

Flavor text preserved

* datums ported 12/21

* Game ported 12/21

* batch of duplicate fixes/dogborg work

Dogborgs need to be modernized to refractored borg standards.

* moar fixes

* Maps and futher compile fixes
This commit is contained in:
Poojawa
2016-12-22 03:57:55 -06:00
committed by GitHub
parent f5e143a452
commit cf59ac1c3d
2215 changed files with 707445 additions and 87041 deletions
+47 -46
View File
@@ -12,7 +12,12 @@
active_power_usage = 10
layer = WALL_OBJ_LAYER
var/health = 50
resistance_flags = FIRE_PROOF
armor = list(melee = 50, bullet = 20, laser = 20, energy = 20, bomb = 0, bio = 0, rad = 0, fire = 90, acid = 50)
obj_integrity = 100
max_integrity = 100
integrity_failure = 50
var/list/network = list("SS13")
var/c_tag = null
var/c_tag_order = 999
@@ -21,7 +26,7 @@
var/start_active = 0 //If it ignores the random chance to start broken on round start
var/invuln = null
var/obj/item/device/camera_bug/bug = null
var/obj/machinery/camera_assembly/assembly = null
var/obj/structure/camera_assembly/assembly = null
//OTHER
@@ -83,7 +88,7 @@
network = list()
cameranet.removeCamera(src)
stat |= EMPED
set_light(0)
SetLuminosity(0)
emped = emped+1 //Increase the number of consecutive EMP's
update_icon()
var/thisemp = emped //Take note of which EMP this proc is for
@@ -105,17 +110,16 @@
O << "The screen bursts into static."
..()
/obj/machinery/camera/tesla_act(var/power)//EMP proof upgrade also makes it tesla immune
if(isEmpProof())
return
..()
qdel(src)//to prevent bomb testing camera from exploding over and over forever
/obj/machinery/camera/ex_act(severity, target)
if(src.invuln)
if(invuln)
return
switch(severity)
if(1)
qdel(src)
if(2)
take_damage(50, BRUTE, 0)
else
take_damage(rand(30,60), BRUTE, 0)
..()
/obj/machinery/camera/proc/setViewRange(num = 7)
src.view_range = num
@@ -140,7 +144,7 @@
if(panel_open)
if(istype(W, /obj/item/weapon/wirecutters)) //enable/disable the camera
toggle_cam(user, 1)
health = initial(health) //this is a pretty simplistic way to heal the camera, but there's no reason for this to be complex.
obj_integrity = max_integrity //this is a pretty simplistic way to heal the camera, but there's no reason for this to be complex.
return
else if(istype(W, /obj/item/device/multitool)) //change focus
@@ -151,17 +155,13 @@
else if(istype(W, /obj/item/weapon/weldingtool))
if(weld(W, user))
visible_message("<span class='warning'>[user] unwelds [src], leaving it as just a frame screwed to the wall.</span>", "<span class='warning'>You unweld [src], leaving it as just a frame screwed to the wall</span>")
if(!assembly)
assembly = new()
assembly.loc = src.loc
assembly.state = 1
assembly.setDir(src.dir)
assembly = null
qdel(src)
deconstruct(TRUE)
return
else if(istype(W, /obj/item/device/analyzer))
if(!isXRay())
if(!user.drop_item(W))
return
upgradeXRay()
qdel(W)
user << "[msg]"
@@ -206,7 +206,7 @@
U << "<span class='notice'>You hold \the [itemname] up to the camera...</span>"
U.changeNext_move(CLICK_CD_MELEE)
for(var/mob/O in player_list)
if(istype(O, /mob/living/silicon/ai))
if(isAI(O))
var/mob/living/silicon/ai/AI = O
if(AI.control_disabled || (AI.stat == DEAD))
return
@@ -241,26 +241,31 @@
return ..()
/obj/machinery/camera/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
switch(damage_type)
if(BRUTE)
if(sound_effect)
if(damage)
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
else
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
if(BURN)
if(sound_effect)
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
else
return
if(damage < 10) //camera has a damage resistance threshold
return
health = max(0, health - damage)
if(!health && status)
/obj/machinery/camera/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee" && damage_amount < 12 && !(stat & BROKEN))
return 0
. = ..()
/obj/machinery/camera/obj_break(damage_flag)
if(status && !(flags & NODECONSTRUCT))
triggerCameraAlarm()
toggle_cam(null, 0)
/obj/machinery/camera/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
if(disassembled)
if(!assembly)
assembly = new()
assembly.loc = src.loc
assembly.state = 1
assembly.setDir(dir)
assembly = null
else
var/obj/item/I = new /obj/item/wallframe/camera (loc)
I.obj_integrity = I.max_integrity * 0.5
new /obj/item/stack/cable_coil(loc, 2)
qdel(src)
/obj/machinery/camera/update_icon()
if(!status)
icon_state = "[initial(icon_state)]1"
@@ -274,7 +279,7 @@
if(can_use())
cameranet.addCamera(src)
else
set_light(0)
SetLuminosity(0)
cameranet.removeCamera(src)
cameranet.updateChunk(x, y, z)
var/change_msg = "deactivates"
@@ -369,9 +374,9 @@
return 0
user << "<span class='notice'>You start to weld [src]...</span>"
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
playsound(src.loc, WT.usesound, 50, 1)
busy = 1
if(do_after(user, 100, target = src))
if(do_after(user, 100*WT.toolspeed, target = src))
busy = 0
if(!WT.isOn())
return 0
@@ -385,13 +390,9 @@
if(cam == src)
return
if(on)
src.set_light(AI_CAMERA_LUMINOSITY)
src.SetLuminosity(AI_CAMERA_LUMINOSITY)
else
src.set_light(0)
/obj/machinery/camera/bullet_act(obj/item/projectile/P)
. = ..()
take_damage(P.damage, P.damage_type, 0)
src.SetLuminosity(0)
/obj/machinery/camera/portable //Cameras which are placed inside of things, such as helmets.
var/turf/prev_turf
+24 -23
View File
@@ -4,19 +4,21 @@
icon = 'icons/obj/monitors.dmi'
icon_state = "cameracase"
materials = list(MAT_METAL=400, MAT_GLASS=250)
result_path = /obj/machinery/camera_assembly
result_path = /obj/structure/camera_assembly
/obj/machinery/camera_assembly
/obj/structure/camera_assembly
name = "camera assembly"
desc = "The basic construction for Nanotrasen-Always-Watching-You cameras."
icon = 'icons/obj/monitors.dmi'
icon_state = "camera1"
obj_integrity = 150
max_integrity = 150
// Motion, EMP-Proof, X-Ray
var/list/obj/item/possible_upgrades = list(/obj/item/device/assembly/prox_sensor, /obj/item/stack/sheet/mineral/plasma, /obj/item/device/analyzer)
var/list/upgrades = list()
var/state = 1
var/busy = 0
/*
1 = Wrenched in place
2 = Welded in place
@@ -24,12 +26,12 @@
4 = Screwdriver panel closed and is fully built (you cannot attach upgrades)
*/
/obj/machinery/camera_assembly/New(loc, ndir, building)
/obj/structure/camera_assembly/New(loc, ndir, building)
..()
if(building)
setDir(ndir)
/obj/machinery/camera_assembly/attackby(obj/item/W, mob/living/user, params)
/obj/structure/camera_assembly/attackby(obj/item/W, mob/living/user, params)
switch(state)
if(1)
// State 1
@@ -73,14 +75,14 @@
if(istype(W, /obj/item/weapon/screwdriver))
playsound(src.loc, W.usesound, 50, 1)
var/input = stripped_input(usr, "Which networks would you like to connect this camera to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Set Network", "SS13")
var/input = stripped_input(user, "Which networks would you like to connect this camera to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Set Network", "SS13")
if(!input)
usr << "<span class='warning'>No input found, please hang up and try your call again!</span>"
user << "<span class='warning'>No input found, please hang up and try your call again!</span>"
return
var/list/tempnetwork = splittext(input, ",")
if(tempnetwork.len < 1)
usr << "<span class='warning'>No network found, please hang up and try your call again!</span>"
user << "<span class='warning'>No network found, please hang up and try your call again!</span>"
return
state = 4
@@ -103,11 +105,11 @@
// Upgrades!
if(is_type_in_list(W, possible_upgrades) && !is_type_in_list(W, upgrades)) // Is a possible upgrade and isn't in the camera already.
if(!user.unEquip(W))
if(!user.drop_item(W))
return
user << "<span class='notice'>You attach \the [W] into the assembly inner circuits.</span>"
upgrades += W
W.loc = src
W.forceMove(src)
return
// Taking out upgrades
@@ -122,19 +124,18 @@
return ..()
/obj/machinery/camera_assembly/proc/weld(obj/item/weapon/weldingtool/WT, mob/living/user)
if(busy)
return 0
/obj/structure/camera_assembly/proc/weld(obj/item/weapon/weldingtool/WT, mob/living/user)
if(!WT.remove_fuel(0, user))
return 0
user << "<span class='notice'>You start to weld \the [src]...</span>"
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
busy = 1
if(do_after(user, 20, target = src))
busy = 0
if(!WT.isOn())
return 0
return 1
busy = 0
return 0
playsound(src.loc, WT.usesound, 50, 1)
if(do_after(user, 20*WT.toolspeed, target = src))
if(WT.isOn())
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
return 1
return 0
/obj/structure/camera_assembly/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
new /obj/item/stack/sheet/metal(loc)
qdel(src)
+19 -15
View File
@@ -1,6 +1,6 @@
/obj/machinery/camera
var/list/motionTargets = list()
var/list/localMotionTargets = list()
var/detectTime = 0
var/area/ai_monitored/area_motion = null
var/alarm_delay = 30 // Don't forget, there's another 3 seconds in queueAlarm()
@@ -15,27 +15,31 @@
if (elapsed > alarm_delay)
triggerAlarm()
else if (detectTime == -1)
for (var/mob/target in motionTargets)
if (target.stat == 2) lostTarget(target)
// If not detecting with motion camera...
if (!area_motion)
// See if the camera is still in range
if(!in_range(src, target))
// If they aren't in range, lose the target.
lostTarget(target)
for (var/mob/target in getTargetList())
if (target.stat == DEAD || (!area_motion && !in_range(src, target)))
//If not part of a monitored area and the camera is not in range or the target is dead
lostTarget(target)
/obj/machinery/camera/proc/getTargetList()
if(area_motion)
return area_motion.motionTargets
return localMotionTargets
/obj/machinery/camera/proc/newTarget(mob/target)
if (istype(target, /mob/living/silicon/ai)) return 0
if(isAI(target))
return 0
if (detectTime == 0)
detectTime = world.time // start the clock
if (!(target in motionTargets))
motionTargets += target
var/list/targets = getTargetList()
if (!(target in targets))
targets += target
return 1
/obj/machinery/camera/proc/lostTarget(mob/target)
if (target in motionTargets)
motionTargets -= target
if (motionTargets.len == 0)
var/list/targets = getTargetList()
if (target in targets)
targets -= target
if (targets.len == 0)
cancelAlarm()
/obj/machinery/camera/proc/cancelAlarm()
+2 -2
View File
@@ -54,7 +54,7 @@
// Human check
var/human = 0
if(istype(M, /mob/living/carbon/human))
if(ishuman(M))
human = 1
var/name = M.name
@@ -136,7 +136,7 @@
/proc/near_camera(mob/living/M)
if (!isturf(M.loc))
return 0
if(isrobot(M))
if(iscyborg(M))
var/mob/living/silicon/robot/R = M
if(!(R.camera && R.camera.can_use()) && !cameranet.checkCameraVis(M))
return 0