Merge branch 'master' into syntheticbloods

This commit is contained in:
Poojawa
2019-10-21 21:06:18 -05:00
committed by GitHub
35 changed files with 542 additions and 395 deletions
+84
View File
@@ -0,0 +1,84 @@
/obj/machinery/turnstile
name = "turnstile"
desc = "A mechanical door that permits one-way access and prevents tailgating."
icon = 'icons/obj/turnstile.dmi'
icon_state = "turnstile_map"
density = FALSE
armor = list(melee = 50, bullet = 50, laser = 50, energy = 50, bomb = 10, bio = 100, rad = 100, fire = 90, acid = 70)
anchored = TRUE
use_power = FALSE
idle_power_usage = 2
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
layer = OPEN_DOOR_LAYER
/obj/machinery/turnstile/Initialize()
. = ..()
icon_state = "turnstile"
/obj/machinery/turnstile/CanAtmosPass(turf/T)
return TRUE
/obj/machinery/turnstile/bullet_act(obj/item/projectile/P, def_zone)
return -1 //Pass through!
/obj/machinery/turnstile/proc/allowed_access(var/mob/B)
if(B.pulledby && ismob(B.pulledby))
return allowed(B.pulledby) | allowed(B)
else
return allowed(B)
/obj/machinery/turnstile/CanPass(atom/movable/AM, turf/T)
if(ismob(AM))
var/mob/B = AM
if(isliving(AM))
var/mob/living/M = AM
if(world.time - M.last_bumped <= 5)
return FALSE
M.last_bumped = world.time
var/allowed_access = FALSE
var/turf/behind = get_step(src, dir)
if(B in behind.contents)
allowed_access = allowed_access(B)
else
to_chat(usr, "<span class='notice'>\the [src] resists your efforts.</span>")
return FALSE
if(allowed_access)
flick("operate", src)
playsound(src,'sound/items/ratchet.ogg',50,0,3)
return TRUE
else
flick("deny", src)
playsound(src,'sound/machines/deniedbeep.ogg',50,0,3)
return FALSE
if(ispath(AM, /obj/item/))
return TRUE
else
return FALSE
/obj/machinery/turnstile/CheckExit(atom/movable/AM as mob|obj, target)
if(isliving(AM))
var/mob/living/M = AM
var/outdir = dir
if(allowed_access(M))
switch(dir)
if(NORTH)
outdir = SOUTH
if(SOUTH)
outdir = NORTH
if(EAST)
outdir = WEST
if(WEST)
outdir = EAST
var/turf/outturf = get_step(src, outdir)
var/canexit = (target == src.loc) | (target == outturf)
if(!canexit && world.time - M.last_bumped <= 5)
to_chat(usr, "<span class='notice'>\the [src] resists your efforts.</span>")
M.last_bumped = world.time
return canexit
else
return TRUE
+96
View File
@@ -0,0 +1,96 @@
/obj/mecha/combat/neovgre
name = "Neovgre, the Anima Bulwark"
desc = "Nezbere's most powerful creation, a mighty war machine of unmatched power said to have ended wars in a single night."
icon = 'icons/mecha/neovgre.dmi'
icon_state = "neovgre"
max_integrity = 500 //This is THE ratvarian superweaon, its deployment is an investment
armor = list("melee" = 50, "bullet" = 40, "laser" = 25, "energy" = 25, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100) //Its similar to the clockwork armour albeit with a few buffs becuase RATVARIAN SUPERWEAPON!!
force = 50 //SMASHY SMASHY!!
internal_damage_threshold = 0
step_in = 3
pixel_x = -16
layer = ABOVE_MOB_LAYER
breach_time = 100 //ten seconds till all goes to shit
recharge_rate = 100
wreckage = /obj/structure/mecha_wreckage/durand/neovgre
/obj/mecha/combat/neovgre/GrantActions(mob/living/user, human_occupant = 0) //No Eject action for you sonny jim, your life for Ratvar!
internals_action.Grant(user, src)
cycle_action.Grant(user, src)
lights_action.Grant(user, src)
stats_action.Grant(user, src)
strafing_action.Grant(user, src)
/obj/mecha/combat/neovgre/RemoveActions(mob/living/user, human_occupant = 0)
internals_action.Remove(user)
cycle_action.Remove(user)
lights_action.Remove(user)
stats_action.Remove(user)
strafing_action.Remove(user)
/obj/mecha/combat/neovgre/MouseDrop_T(mob/M, mob/user)
if(!is_servant_of_ratvar(user))
to_chat(user, "<span class='brass'>BEGONE HERETIC!</span>")
return
else
..()
/obj/mecha/combat/neovgre/moved_inside(mob/living/carbon/human/H)
var/list/Itemlist = H.get_contents()
for(var/obj/item/clockwork/slab/W in Itemlist)
to_chat(H, "<span class='brass'>You safely store [W] inside [src].</span>")
qdel(W)
. = ..()
/obj/mecha/combat/neovgre/obj_destruction()
for(var/mob/M in src)
to_chat(M, "<span class='brass'>You are consumed by the fires raging within Neovgre...</span>")
M.dust()
playsound(src, 'sound/magic/lightning_chargeup.ogg', 100, 0)
src.visible_message("<span class = 'userdanger'>The reactor has gone critical, its going to blow!</span>")
addtimer(CALLBACK(src,.proc/go_critical),breach_time)
/obj/mecha/combat/neovgre/proc/go_critical()
explosion(get_turf(loc), 3, 5, 10, 20, 30)
Destroy(src)
/obj/mecha/combat/neovgre/container_resist(mob/living/user)
to_chat(user, "<span class='brass'>Neovgre requires a lifetime commitment friend, no backing out now!</span>")
return
/obj/mecha/combat/neovgre/process()
..()
if(GLOB.ratvar_awakens) // At this point only timley intervention by lord singulo could hople to stop the superweapon
cell.charge = INFINITY
max_integrity = INFINITY
obj_integrity = max_integrity
CHECK_TICK //Just to be on the safe side lag wise
else if(cell.charge < cell.maxcharge)
for(var/obj/effect/clockwork/sigil/transmission/T in range(SIGIL_ACCESS_RANGE, src))
var/delta = min(recharge_rate, cell.maxcharge - cell.charge)
if (get_clockwork_power() <= delta)
cell.charge += delta
adjust_clockwork_power(-delta)
CHECK_TICK
/obj/mecha/combat/neovgre/Initialize()
.=..()
GLOB.neovgre_exists ++
var/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy/neovgre/N = new
N.attach(src)
/obj/structure/mecha_wreckage/durand/neovgre
name = "\improper Neovgre wreckage?"
desc = "On closer inspection this looks like the wreck of a durand with some spraypainted cardboard duct taped to it!"
/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy/neovgre
equip_cooldown = 8 //Rapid fire heavy laser cannon, simple yet elegant
energy_drain = 30
name = "Aribter Laser Cannon"
desc = "Please re-attach this to neovgre and stop asking questions about why it looks like a normal Nanotrasen issue Solaris laser cannon - Nezbere"
fire_sound = "sound/weapons/neovgre_laser.ogg"
/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy/neovgre/can_attach(obj/mecha/combat/neovgre/M)
if(istype(M))
return 1
return 0
+2
View File
@@ -49,6 +49,8 @@
var/lights = FALSE
var/lights_power = 6
var/last_user_hud = 1 // used to show/hide the mecha hud while preserving previous preference
var/breach_time = 0
var/recharge_rate = 0
var/bumpsmash = 0 //Whether or not the mech destroys walls by running into it.
//inner atmos
+32 -3
View File
@@ -342,12 +342,41 @@ update_label("John Doe", "Clowny")
lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi'
assignment = "Prisoner"
registered_name = "Scum"
access = list(ACCESS_ENTER_GENPOP)
//Lavaland labor camp
var/goal = 0 //How far from freedom?
var/points = 0
//Genpop
var/sentence = 0 //When world.time is greater than this number, the card will have its ACCESS_ENTER_GENPOP access replaced with ACCESS_LEAVE_GENPOP the next time it's checked, unless this value is 0/null
var/crime= "\[REDACTED\]"
/obj/item/card/id/prisoner/attack_self(mob/user)
to_chat(usr, "<span class='notice'>You have accumulated [points] out of the [goal] points you need for freedom.</span>")
/obj/item/card/id/prisoner/GetAccess()
if((sentence && world.time >= sentence) || (goal && points >= goal))
access = list(ACCESS_LEAVE_GENPOP)
return ..()
/obj/item/card/id/prisoner/process()
if(!sentence)
STOP_PROCESSING(SSobj, src)
return
if(world.time >= sentence)
playsound(loc, 'sound/machines/ping.ogg', 50, 1)
if(isliving(loc))
to_chat(loc, "<span class='boldnotice'>[src]</span><span class='notice'> buzzes: You have served your sentence! You may now exit prison through the turnstiles and collect your belongings.</span>")
STOP_PROCESSING(SSobj, src)
return
/obj/item/card/id/prisoner/examine(mob/user)
. = ..()
if(sentence && world.time < sentence)
to_chat(user, "<span class='notice'>You're currently serving a sentence for [crime]. <b>[DisplayTimeText(sentence - world.time)]</b> left.</span>")
else if(goal)
to_chat(user, "<span class='notice'>You have accumulated [points] out of the [goal] points you need for freedom.</span>")
else if(!sentence)
to_chat(user, "<span class='warning'>You are currently serving a permanent sentence for [crime].</span>")
else
to_chat(user, "<span class='notice'>Your sentence is up! You're free!</span>")
/obj/item/card/id/prisoner/one
name = "Prisoner #13-001"
@@ -0,0 +1,117 @@
/obj/structure/closet/secure_closet/genpop
desc = "It's a secure locker for inmates's personal belongings."
var/default_desc = "It's a secure locker for the storage inmates's personal belongings during their time in prison."
name = "prisoner closet"
var/default_name = "prisoner closet"
req_access = list(ACCESS_BRIG)
var/obj/item/card/id/prisoner/registered_id = null
icon_state = "prisoner"
locked = FALSE
anchored = TRUE
opened = TRUE
density = FALSE
/obj/structure/closet/secure_closet/genpop/attackby(obj/item/W, mob/user, params)
if(!broken && locked && W == registered_id) //Prisoner opening
handle_prisoner_id(user)
return
return ..()
/obj/structure/closet/secure_closet/genpop/proc/handle_prisoner_id(mob/user)
var/obj/item/card/id/prisoner/prisoner_id = null
for(prisoner_id in user.held_items)
if(prisoner_id != registered_id)
prisoner_id = null
else
break
if(!prisoner_id)
to_chat(user, "<span class='danger'>Access Denied.</span>")
return FALSE
qdel(registered_id)
registered_id = null
locked = FALSE
open(user)
desc = "It's a secure locker for prisoner effects."
to_chat(user, "<span class='notice'>You insert your prisoner id into \the [src] and it springs open!</span>")
return TRUE
/obj/structure/closet/secure_closet/genpop/proc/handle_edit_sentence(mob/user)
var/prisoner_name = input(user, "Please input the name of the prisoner.", "Prisoner Name", registered_id.registered_name) as text|null
if(prisoner_name == null | !user.Adjacent(src))
return FALSE
var/sentence_length = input(user, "Please input the length of their sentence in minutes (0 for perma).", "Sentence Length", registered_id.sentence) as num|null
if(sentence_length == null | !user.Adjacent(src))
return FALSE
var/crimes = input(user, "Please input their crimes.", "Crimes", registered_id.crime) as text|null
if(crimes == null | !user.Adjacent(src))
return FALSE
registered_id.registered_name = prisoner_name
var/filteredsentlength = text2num(sentence_length)
registered_id.sentence = filteredsentlength ? (filteredsentlength MINUTES) + world.time : 0
registered_id.crime = crimes
registered_id.update_label(prisoner_name, registered_id.assignment)
if(registered_id.sentence)
START_PROCESSING(SSobj, registered_id)
else
STOP_PROCESSING(SSobj, registered_id)
name = "[default_name] ([prisoner_name])"
desc = "[default_desc] It contains the personal effects of [prisoner_name]."
return TRUE
/obj/structure/closet/secure_closet/genpop/togglelock(mob/living/user)
if(!allowed(user))
return ..()
if(!broken && locked && registered_id != null)
var/name = registered_id.registered_name
var/result = alert(user, "This locker currently contains [name]'s personal belongings ","Locker In Use","Reset","Amend ID", "Open")
if(!user.Adjacent(src))
return
if(result == "Reset")
name = default_name
desc = default_desc
registered_id = null
if(result == "Open" | result == "Reset")
locked = FALSE
open(user)
if(result == "Amend ID")
handle_edit_sentence(user)
else
return ..()
/obj/structure/closet/secure_closet/genpop/close(mob/living/user)
if(registered_id != null)
locked = TRUE
return ..()
/obj/structure/closet/secure_closet/genpop/attack_hand(mob/user)
if(user.lying && get_dist(src, user) > 0)
return
if(!broken && registered_id != null && registered_id in user.held_items)
handle_prisoner_id(user)
return
if(!broken && opened && !locked && allowed(user) && !registered_id) //Genpop setup
registered_id = new /obj/item/card/id/prisoner/(src.contents)
if(handle_edit_sentence(user))
close(user)
locked = TRUE
update_icon()
registered_id.forceMove(src.loc)
new /obj/item/clothing/under/rank/prisoner(src.loc)
else
qdel(registered_id)
registered_id = null
return
..()