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
+78 -86
View File
@@ -5,9 +5,11 @@
desc = "A display case for prized possessions."
density = 1
anchored = 1
unacidable = 1//Dissolving the case would also delete the gun.
var/health = 30
var/destroyed = 0
resistance_flags = ACID_PROOF
armor = list(melee = 30, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 0, rad = 0, fire = 70, acid = 100)
obj_integrity = 200
max_integrity = 200
integrity_failure = 50
var/obj/item/showpiece = null
var/alert = 0
var/open = 0
@@ -20,16 +22,14 @@
showpiece = new start_showpiece_type (src)
update_icon()
/obj/structure/displaycase/ex_act(severity, target)
switch(severity)
if (1)
new /obj/item/weapon/shard( src.loc )
dump()
qdel(src)
if (2)
take_damage(rand(10,20), BRUTE, 0)
if (3)
take_damage(5, BRUTE, 0)
/obj/structure/displaycase/Destroy()
if(electronics)
qdel(electronics)
electronics = null
if(showpiece)
qdel(showpiece)
showpiece = null
return ..()
/obj/structure/displaycase/examine(mob/user)
..()
@@ -39,51 +39,45 @@
user << "<span class='notice'>Hooked up with an anti-theft system.</span>"
/obj/structure/displaycase/bullet_act(obj/item/projectile/P)
. = ..()
take_damage(P.damage, P.damage_type, 0)
/obj/structure/displaycase/proc/dump()
if (showpiece)
showpiece.loc = src.loc
showpiece.forceMove(loc)
showpiece = null
/obj/structure/displaycase/blob_act(obj/effect/blob/B)
if (prob(75))
new /obj/item/weapon/shard( src.loc )
dump()
qdel(src)
/obj/structure/displaycase/hitby(atom/movable/AM)
..()
if(isobj(AM))
var/obj/item/I = AM
take_damage(I.throwforce * 0.2)
/obj/structure/displaycase/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
/obj/structure/displaycase/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(sound_effect)
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
if(BURN)
if(sound_effect)
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
else
return
health = max( health - damage, 0)
if(!health && !destroyed)
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
/obj/structure/displaycase/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
dump()
if(!disassembled)
new /obj/item/weapon/shard( src.loc )
trigger_alarm()
qdel(src)
/obj/structure/displaycase/obj_break(damage_flag)
if(!broken && !(flags & NODECONSTRUCT))
density = 0
destroyed = 1
broken = 1
new /obj/item/weapon/shard( src.loc )
playsound(src, "shatter", 70, 1)
update_icon()
trigger_alarm()
//Activate Anti-theft
if(alert)
var/area/alarmed = get_area(src)
alarmed.burglaralert(src)
playsound(src, "sound/effects/alert.ogg", 50, 1)
/obj/structure/displaycase/proc/trigger_alarm()
//Activate Anti-theft
if(alert)
var/area/alarmed = get_area(src)
alarmed.burglaralert(src)
playsound(src, "sound/effects/alert.ogg", 50, 1)
/*
*/
/obj/structure/displaycase/proc/is_directional(atom/A)
try
@@ -91,6 +85,7 @@
catch
return 0
return 1
/obj/structure/displaycase/proc/get_flat_icon_directional(atom/A)
//Get flatIcon even if dir is mismatched for directionless icons
//SLOW
@@ -110,7 +105,7 @@
I = icon('icons/obj/stationobjs.dmi',"glassbox_open")
else
I = icon('icons/obj/stationobjs.dmi',"glassbox0")
if(destroyed)
if(broken)
I = icon('icons/obj/stationobjs.dmi',"glassboxb0")
if(showpiece)
var/icon/S = get_flat_icon_directional(showpiece)
@@ -120,15 +115,27 @@
return
/obj/structure/displaycase/attackby(obj/item/weapon/W, mob/user, params)
if(W.GetID() && electronics && !destroyed)
if(W.GetID() && !broken)
if(allowed(user))
user << "<span class='notice'>You [open ? "close":"open"] the [src]</span>"
open = !open
update_icon()
toggle_lock(user)
else
user << "<span class='warning'>Access denied.</span>"
else if(!alert && istype(W,/obj/item/weapon/crowbar))
if(destroyed)
else if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent == INTENT_HELP && !broken)
var/obj/item/weapon/weldingtool/WT = W
if(obj_integrity < max_integrity && WT.remove_fuel(5, user))
user << "<span class='notice'>You begin repairing [src].</span>"
playsound(loc, WT.usesound, 40, 1)
if(do_after(user, 40*W.toolspeed, target = src))
obj_integrity = max_integrity
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
update_icon()
user << "<span class='notice'>You repair [src].</span>"
else
user << "<span class='warning'>[src] is already in good condition!</span>"
return
else if(!alert && istype(W,/obj/item/weapon/crowbar)) //Only applies to the lab cage and player made display cases
if(broken)
if(showpiece)
user << "<span class='notice'>Remove the displayed object first.</span>"
else
@@ -136,55 +143,39 @@
qdel(src)
else
user << "<span class='notice'>You start to [open ? "close":"open"] the [src]</span>"
if(do_after(user, 20/W.toolspeed, target = src))
if(do_after(user, 20*W.toolspeed, target = src))
user << "<span class='notice'>You [open ? "close":"open"] the [src]</span>"
open = !open
update_icon()
toggle_lock(user)
else if(open && !showpiece)
if(user.drop_item())
W.loc = src
showpiece = W
user << "<span class='notice'>You put [W] on display</span>"
update_icon()
else if(istype(W, /obj/item/stack/sheet/glass) && destroyed)
else if(istype(W, /obj/item/stack/sheet/glass) && broken)
var/obj/item/stack/sheet/glass/G = W
if(G.get_amount() < 2)
user << "<span class='warning'>You need two glass sheets to fix the case!</span>"
return
user << "<span class='notice'>You start fixing the [src]...</span>"
user << "<span class='notice'>You start fixing [src]...</span>"
if(do_after(user, 20, target = src))
G.use(2)
destroyed = 0
health = initial(health)
broken = 0
obj_integrity = max_integrity
update_icon()
else
return ..()
/obj/structure/displaycase/attacked_by(obj/item/weapon/W, mob/living/user)
..()
take_damage(W.force, W.damtype)
/obj/structure/displaycase/proc/toggle_lock(mob/user)
open = !open
update_icon()
/obj/structure/displaycase/attack_paw(mob/user)
return src.attack_hand(user)
/obj/structure/displaycase/attack_alien(mob/living/carbon/alien/humanoid/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
visible_message("<span class='warning'>\The [user] slashes at [src]!</span>")
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
take_damage(20, BRUTE, 0)
/obj/structure/displaycase/attack_animal(mob/living/simple_animal/M)
M.changeNext_move(CLICK_CD_MELEE)
M.do_attack_animation(src)
if(M.melee_damage_upper > 0)
M.visible_message("<span class='danger'>[M.name] smashes against \the [src.name].</span>",\
"<span class='danger'>You smash against the [src.name].</span>")
take_damage(M.melee_damage_upper, M.melee_damage_type, 1)
/obj/structure/displaycase/attack_hand(mob/user)
user.changeNext_move(CLICK_CD_MELEE)
if (showpiece && (destroyed || open))
if (showpiece && (broken || open))
dump()
user << "<span class='notice'>You deactivate the hover field built into the case.</span>"
src.add_fingerprint(user)
@@ -194,9 +185,8 @@
//prevents remote "kicks" with TK
if (!Adjacent(user))
return
user.do_attack_animation(src)
user.visible_message("<span class='danger'>[user] kicks the display case.</span>", \
"<span class='notice'>You kick the display case.</span>")
user.visible_message("<span class='danger'>[user] kicks the display case.</span>", null, null, COMBAT_MESSAGE_RANGE)
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
take_damage(2)
@@ -212,17 +202,17 @@
/obj/structure/displaycase_chassis/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/wrench))
if(istype(I, /obj/item/weapon/wrench)) //The player can only deconstruct the wooden frame
user << "<span class='notice'>You start disassembling [src]...</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 30/I.toolspeed, target = src))
playsound(src.loc, I.usesound, 50, 1)
if(do_after(user, 30*I.toolspeed, target = src))
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
new /obj/item/stack/sheet/mineral/wood(get_turf(src))
qdel(src)
else if(istype(I, /obj/item/weapon/electronics/airlock))
user << "<span class='notice'>You start installing the electronics into [src]...</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, I.usesound, 50, 1)
if(user.unEquip(I) && do_after(user, 30, target = src))
I.loc = src
electronics = I
@@ -248,13 +238,15 @@
else
return ..()
//The captains display case requiring specops ID access is intentional.
//The lab cage and captains display case do not spawn with electronics, which is why req_access is needed.
/obj/structure/displaycase/captain
alert = 1
start_showpiece_type = /obj/item/weapon/gun/energy/laser/captain
req_access = list(access_cent_specops)
/obj/structure/displaycase/labcage
name = "lab cage"
desc = "A glass lab container for storing interesting creatures."
start_showpiece_type = /obj/item/clothing/mask/facehugger/lamarr
req_access = list(access_rd)