Skip to content

Commit

Permalink
Merge pull request ParadiseSS13#12 from ParadiseSS13/master
Browse files Browse the repository at this point in the history
Merge
  • Loading branch information
mvanalphen committed Dec 17, 2014
2 parents 33eeb01 + 607a547 commit 46cd4c4
Show file tree
Hide file tree
Showing 38 changed files with 809 additions and 2,103 deletions.
64 changes: 0 additions & 64 deletions code/_onclick/other_mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,70 +99,6 @@
/mob/living/carbon/alien/RestrainedClickOn(var/atom/A)
return

/mob/living/carbon/alien/humanoid/RangedAttack(var/atom/A)
if(!large && a_intent == "harm")
Neurotox(A)
return
else if(large && a_intent == "harm")
NeuroAOE(A)
return

/mob/living/carbon/alien/humanoid/proc/Neurotox(atom/A)
if(world.time < next_attack)
return

var/turf/T = get_turf(src)
var/turf/U = get_turf(A) // Get the tile infront of the move, based on their direction

if(!isturf(U) || !isturf(T))
return

var/obj/item/projectile/bullet/neurotoxin/NT = new /obj/item/projectile/bullet/neurotoxin(loc)
NT.firer = src
// NT.def_zone = get_organ_target()
NT.original = A
NT.current = T
NT.yo = U.y - T.y
NT.xo = U.x - T.x
spawn(1)
NT.process()
next_attack = world.time + 60

/mob/living/carbon/alien/humanoid/proc/NeuroAOE(atom/A)
if(world.time < next_attack)
return

var/direction = get_dir(src,A)
var/turf/T = get_turf(A)
var/turf/T1 = get_step(T,turn(direction, 90))
var/turf/T2 = get_step(T,turn(direction, -90))

var/list/the_targets = list(T,T1,T2)

for(var/a=0, a<5, a++)
spawn(0)
var/obj/effect/effect/water/D = new /obj/effect/effect/water( get_turf(src) )
D.color = "#00FF21"
var/turf/my_target = pick(the_targets)
for(var/b=0, b<5, b++)
if(!step_towards(D,my_target)) return
if(!D) return
// D.reagents.reaction(get_turf(D))
for(var/atom/atm in get_turf(D))
if(!D) return
if(istype(atm, /mob/living/carbon/alien))
return
if(istype(atm, /mob/living/carbon))
var/mob/living/carbon/C = atm
C.Weaken(5)
C.adjustToxLoss(20)
C << "You were drenched with neurotoxin!"
// D.reagents.reaction(atm, TOUCH) // Touch, since we sprayed it.
if(D.loc == my_target) break
sleep(2)
next_attack = world.time + 60


// Babby aliens
/mob/living/carbon/alien/larva/UnarmedAttack(var/atom/A)
A.attack_larva(src)
Expand Down
8 changes: 0 additions & 8 deletions code/datums/uplink_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,6 @@ var/list/uplink_items = list()
cost = 8
job = list("Clown")

//Detective
/datum/uplink_item/jobspecific/evidenceforger
name = "Evidence Forger"
desc = "An evidence scanner that allows you forge evidence by setting the output before scanning the item."
item = /obj/item/device/detective_scanner/forger
cost = 6
job = list("Detective")

/datum/uplink_item/jobspecific/conversionkit
name = "Conversion Kit Bundle"
desc = "A bundle that comes with a professional revolver conversion kit and 1 box of .357 ammo. The kit allows you to convert your revolver to fire lethal rounds or vice versa, modification is nearly perfect and will not result in catastrophic failure."
Expand Down
8 changes: 4 additions & 4 deletions code/game/asteroid.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor , va

//world << "Room spawned at [start_loc.x],[start_loc.y],[start_loc.z]"
if(!wall)
wall = pick(/turf/simulated/wall/r_wall,/turf/simulated/wall,/obj/effect/alien/resin)
wall = pick(/turf/simulated/wall/r_wall,/turf/simulated/wall,/obj/structure/alien/resin)
if(!floor)
floor = pick(/turf/simulated/floor,/turf/simulated/floor/engine)

Expand All @@ -44,9 +44,9 @@ proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor , va


if(x == 0 || x==x_size-1 || y==0 || y==y_size-1)
if(wall == /obj/effect/alien/resin)
if(wall == /obj/structure/alien/resin)
T = new floor(cur_loc)
new /obj/effect/alien/resin(T)
new /obj/structure/alien/resin(T)
else
T = new wall(cur_loc)
room_turfs["walls"] += T
Expand Down Expand Up @@ -74,7 +74,7 @@ proc/admin_spawn_room_at_pos()
if("Regular wall")
wall=/turf/simulated/wall
if("Resin wall")
wall=/obj/effect/alien/resin
wall=/obj/structure/alien/resin
switch(alert("Floor type",null,"Regular floor","Reinforced floor"))
if("Regular floor")
floor=/turf/simulated/floor
Expand Down
129 changes: 44 additions & 85 deletions code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -251,35 +251,32 @@ its easier to just keep the beam vertical.
/atom/proc/add_hiddenprint(mob/living/M as mob)
if(isnull(M)) return
if(isnull(M.key)) return
if (!( src.flags ) & FPRINT)
return
if (ishuman(M))
if(ishuman(M))
var/mob/living/carbon/human/H = M
if (!istype(H.dna, /datum/dna))
if(!istype(H.dna, /datum/dna))
return 0
if (H.gloves)
if(src.fingerprintslast != H.key)
src.fingerprintshidden += text("\[[time_stamp()]\] (Wearing gloves). Real name: [], Key: []",H.real_name, H.key)
src.fingerprintslast = H.key
if(H.gloves)
if(fingerprintslast != H.ckey)
fingerprintshidden += text("\[[time_stamp()]\] (Wearing gloves). Real name: [], Key: []",H.real_name, H.key)
fingerprintslast = H.ckey
return 0
if (!( src.fingerprints ))
if(src.fingerprintslast != H.key)
src.fingerprintshidden += text("\[[time_stamp()]\] Real name: [], Key: []",H.real_name, H.key)
src.fingerprintslast = H.key
if(!( fingerprints ))
if(fingerprintslast != H.ckey)
fingerprintshidden += text("\[[time_stamp()]\] Real name: [], Key: []",H.real_name, H.key)
fingerprintslast = H.ckey
return 1
else
if(src.fingerprintslast != M.key)
src.fingerprintshidden += text("\[[time_stamp()]\] Real name: [], Key: []",M.real_name, M.key)
src.fingerprintslast = M.key
if(fingerprintslast != M.ckey)
fingerprintshidden += text("\[[time_stamp()]\] Real name: [], Key: []",M.real_name, M.key)
fingerprintslast = M.ckey
return


//Set ignoregloves to add prints irrespective of the mob having gloves on.
/atom/proc/add_fingerprint(mob/living/M as mob, ignoregloves = 0)
if(isnull(M)) return
if(isAI(M)) return
if(isnull(M.key)) return
if (!( src.flags ) & FPRINT)
return
if (ishuman(M))
if(ishuman(M))
//Add the list if it does not exist.
if(!fingerprintshidden)
fingerprintshidden = list()
Expand All @@ -301,25 +298,25 @@ its easier to just keep the beam vertical.
H.dna.real_name = H.real_name
H.check_dna()

//Now, deal with gloves.
if (H.gloves && H.gloves != src)
if(fingerprintslast != H.key)
fingerprintshidden += text("\[[]\](Wearing gloves). Real name: [], Key: []",time_stamp(), H.real_name, H.key)
fingerprintslast = H.key
H.gloves.add_fingerprint(M)
//Check if the gloves (if any) hide fingerprints
if(H.gloves)
var/obj/item/clothing/gloves/G = H.gloves
if(G.transfer_prints)
ignoregloves = 1

//Deal with gloves the pass finger/palm prints.
//Now, deal with gloves.
if(!ignoregloves)
if(H.gloves != src)
if(prob(75) && istype(H.gloves, /obj/item/clothing/gloves/latex))
return 0
else if(H.gloves && !istype(H.gloves, /obj/item/clothing/gloves/latex))
return 0
if(H.gloves && H.gloves != src)
if(fingerprintslast != H.ckey)
fingerprintshidden += text("\[[]\](Wearing gloves). Real name: [], Key: []",time_stamp(), H.real_name, H.key)
fingerprintslast = H.ckey
H.gloves.add_fingerprint(M)
return 0

//More adminstuffz
if(fingerprintslast != H.key)
if(fingerprintslast != H.ckey)
fingerprintshidden += text("\[[]\]Real name: [], Key: []",time_stamp(), H.real_name, H.key)
fingerprintslast = H.key
fingerprintslast = H.ckey

//Make the list if it does not exist.
if(!fingerprints)
Expand All @@ -329,75 +326,37 @@ its easier to just keep the beam vertical.
var/full_print = md5(H.dna.uni_identity)

// Add the fingerprints
//
if(fingerprints[full_print])
switch(stringpercent(fingerprints[full_print])) //tells us how many stars are in the current prints.

if(28 to 32)
if(prob(1))
fingerprints[full_print] = full_print // You rolled a one buddy.
else
fingerprints[full_print] = stars(full_print, rand(0,40)) // 24 to 32

if(24 to 27)
if(prob(3))
fingerprints[full_print] = full_print //Sucks to be you.
else
fingerprints[full_print] = stars(full_print, rand(15, 55)) // 20 to 29

if(20 to 23)
if(prob(5))
fingerprints[full_print] = full_print //Had a good run didn't ya.
else
fingerprints[full_print] = stars(full_print, rand(30, 70)) // 15 to 25

if(16 to 19)
if(prob(5))
fingerprints[full_print] = full_print //Welp.
else
fingerprints[full_print] = stars(full_print, rand(40, 100)) // 0 to 21

if(0 to 15)
if(prob(5))
fingerprints[full_print] = stars(full_print, rand(0,50)) // small chance you can smudge.
else
fingerprints[full_print] = full_print

else
fingerprints[full_print] = stars(full_print, rand(0, 20)) //Initial touch, not leaving much evidence the first time.

fingerprints[full_print] = full_print

return 1
else
//Smudge up dem prints some
if(fingerprintslast != M.key)
if(fingerprintslast != M.ckey)
fingerprintshidden += text("\[[]\]Real name: [], Key: []",time_stamp(), M.real_name, M.key)
fingerprintslast = M.key
fingerprintslast = M.ckey

//Cleaning up shit.
if(fingerprints && !fingerprints.len)
del(fingerprints)
return


/atom/proc/transfer_fingerprints_to(var/atom/A)

if(!istype(A.fingerprints,/list))
// Make sure everything are lists.
if(!islist(A.fingerprints))
A.fingerprints = list()

if(!istype(A.fingerprintshidden,/list))
if(!islist(A.fingerprintshidden))
A.fingerprintshidden = list()

if(!istype(fingerprintshidden, /list))
if(!islist(fingerprints))
fingerprints = list()
if(!islist(fingerprintshidden))
fingerprintshidden = list()

//skytodo
//A.fingerprints |= fingerprints //detective
//A.fingerprintshidden |= fingerprintshidden //admin
if(A.fingerprints && fingerprints)
// Transfer
if(fingerprints)
A.fingerprints |= fingerprints.Copy() //detective
if(A.fingerprintshidden && fingerprintshidden)
A.fingerprintshidden |= fingerprintshidden.Copy() //admin A.fingerprintslast = fingerprintslast
if(fingerprintshidden)
A.fingerprintshidden |= fingerprintshidden.Copy() //admin
A.fingerprintslast = fingerprintslast


//returns 1 if made bloody, returns 0 otherwise
Expand Down
15 changes: 9 additions & 6 deletions code/game/machinery/bots/secbot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
var/check_records = 1 //Does it check security records?
var/arrest_type = 0 //If true, don't handcuff
var/harmbaton = 0
var/base_icon = "secbot"
radio_frequency = SEC_FREQ //Security channel
radio_name = "Security"
bot_type = SEC_BOT
Expand Down Expand Up @@ -54,6 +55,8 @@
/obj/machinery/bot/secbot/buzzsky
name = "Officer Buzzsky"
desc = "It's Officer Buzzsky! Rusted and falling apart, he seems less than thrilled with the crew for leaving him in his current state."
base_icon = "rustbot"
icon_state = "rustbot0"
declare_arrests = 0
arrest_type = 1
harmbaton = 1
Expand All @@ -72,7 +75,7 @@

/obj/machinery/bot/secbot/New()
..()
icon_state = "secbot[on]"
icon_state = "[base_icon][on]"
spawn(3)

var/datum/job/detective/J = new/datum/job/detective
Expand All @@ -83,12 +86,12 @@

/obj/machinery/bot/secbot/turn_on()
..()
icon_state = "secbot[on]"
icon_state = "[base_icon][on]"
updateUsrDialog()

/obj/machinery/bot/secbot/turn_off()
..()
icon_state = "secbot[on]"
icon_state = "[base_icon][on]"
updateUsrDialog()

/obj/machinery/bot/secbot/bot_reset()
Expand Down Expand Up @@ -199,7 +202,7 @@ Auto Patrol: []"},
oldtarget_name = user.name
visible_message("<span class='danger'>[src] buzzes oddly!</span>")
declare_arrests = 0
icon_state = "secbot[on]"
icon_state = "[base_icon][on]"

/obj/machinery/bot/secbot/bot_process()
if (!..())
Expand Down Expand Up @@ -227,9 +230,9 @@ Auto Patrol: []"},
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
if(harmbaton)
playsound(loc, 'sound/weapons/genhit1.ogg', 50, 1, -1)
icon_state = "secbot-c"
icon_state = "[base_icon]-c"
spawn(2)
icon_state = "secbot[on]"
icon_state = "[base_icon][on]"
var/mob/living/carbon/M = target
if(istype(M, /mob/living/carbon/human))
if( M.stuttering < 5 && !(M_HULK in M.mutations) )
Expand Down
Loading

0 comments on commit 46cd4c4

Please sign in to comment.