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:
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/assemblies/new_assemblies.dmi'
|
||||
icon_state = ""
|
||||
flags = CONDUCT
|
||||
w_class = 2
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=100)
|
||||
throwforce = 2
|
||||
throw_speed = 3
|
||||
@@ -14,7 +14,6 @@
|
||||
var/secured = 1
|
||||
var/list/attached_overlays = null
|
||||
var/obj/item/device/assembly_holder/holder = null
|
||||
var/cooldown = 0//To prevent spam
|
||||
var/wire_type = WIRE_RECEIVE | WIRE_PULSE
|
||||
var/attachable = 0 // can this be attached to wires
|
||||
var/datum/wires/connected = null
|
||||
@@ -25,6 +24,8 @@
|
||||
var/const/WIRE_RADIO_RECEIVE = 8 //Allows Pulsed(1) to call Activate()
|
||||
var/const/WIRE_RADIO_PULSE = 16 //Allows Pulse(1) to send a radio message
|
||||
|
||||
var/next_activate = 0 //When we're next allowed to activate - for spam control
|
||||
|
||||
/obj/item/device/assembly/proc/on_attach()
|
||||
|
||||
/obj/item/device/assembly/proc/on_detach()
|
||||
@@ -43,16 +44,6 @@
|
||||
return 1
|
||||
|
||||
|
||||
//Called via spawn(10) to have it count down the cooldown var
|
||||
/obj/item/device/assembly/proc/process_cooldown()
|
||||
cooldown--
|
||||
if(cooldown <= 0)
|
||||
return 0
|
||||
spawn(10)
|
||||
process_cooldown()
|
||||
return 1
|
||||
|
||||
|
||||
//Called when another assembly acts on this one, var/radio will determine where it came from for wire calcs
|
||||
/obj/item/device/assembly/proc/pulsed(radio = 0)
|
||||
if(wire_type & WIRE_RECEIVE)
|
||||
@@ -78,12 +69,10 @@
|
||||
|
||||
// What the device does when turned on
|
||||
/obj/item/device/assembly/proc/activate()
|
||||
if(!secured || (cooldown > 0))
|
||||
return 0
|
||||
cooldown = 2
|
||||
spawn(10)
|
||||
process_cooldown()
|
||||
return 1
|
||||
if(qdeleted(src) || !secured || (next_activate > world.time))
|
||||
return FALSE
|
||||
next_activate = world.time + 30
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/device/assembly/proc/toggle_secure()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
icon = 'icons/obj/tank.dmi'
|
||||
item_state = "assembly"
|
||||
throwforce = 5
|
||||
w_class = 3
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
throw_speed = 2
|
||||
throw_range = 4
|
||||
flags = CONDUCT
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
attachable = 1
|
||||
var/id = null
|
||||
var/can_change_id = 0
|
||||
var/cooldown = 0//Door cooldowns
|
||||
|
||||
/obj/item/device/assembly/control/examine(mob/user)
|
||||
..()
|
||||
@@ -46,13 +47,14 @@
|
||||
|
||||
/obj/item/device/assembly/control/airlock/activate()
|
||||
cooldown = 1
|
||||
var/doors_need_closing = FALSE
|
||||
var/list/obj/machinery/door/airlock/open_or_close = list()
|
||||
for(var/obj/machinery/door/airlock/D in airlocks)
|
||||
if(D.id_tag == src.id)
|
||||
if(specialfunctions & OPEN)
|
||||
if(D.density)
|
||||
D.open()
|
||||
else
|
||||
D.close()
|
||||
open_or_close += D
|
||||
if(!D.density)
|
||||
doors_need_closing = TRUE
|
||||
if(specialfunctions & IDSCAN)
|
||||
D.aiDisabledIdScanner = !D.aiDisabledIdScanner
|
||||
if(specialfunctions & BOLTS)
|
||||
@@ -68,6 +70,10 @@
|
||||
D.secondsElectrified = 0
|
||||
if(specialfunctions & SAFE)
|
||||
D.safe = !D.safe
|
||||
|
||||
for(var/D in open_or_close)
|
||||
addtimer(D, doors_need_closing ? "close" : "open",0, TIMER_NORMAL)
|
||||
|
||||
sleep(10)
|
||||
cooldown = 0
|
||||
|
||||
@@ -147,4 +153,4 @@
|
||||
C.cremate(usr)
|
||||
|
||||
sleep(50)
|
||||
cooldown = 0
|
||||
cooldown = 0
|
||||
|
||||
+101
-23
@@ -4,7 +4,7 @@
|
||||
icon_state = "flash"
|
||||
item_state = "flashtool"
|
||||
throwforce = 0
|
||||
w_class = 1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
materials = list(MAT_METAL = 300, MAT_GLASS = 300)
|
||||
origin_tech = "magnets=2;combat=1"
|
||||
|
||||
@@ -48,7 +48,8 @@
|
||||
crit_fail = 1
|
||||
update_icon()
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("The [src.name] burns out!")
|
||||
if(T)
|
||||
T.visible_message("[src] burns out!")
|
||||
|
||||
|
||||
/obj/item/device/assembly/flash/proc/flash_recharge(interval=10)
|
||||
@@ -85,7 +86,7 @@
|
||||
if(user && targeted)
|
||||
if(M.weakeyes)
|
||||
M.Weaken(3) //quick weaken bypasses eye protection but has no eye flash
|
||||
if(M.flash_eyes(1, 1))
|
||||
if(M.flash_act(1, 1))
|
||||
M.confused += power
|
||||
terrible_conversion_proc(M, user)
|
||||
M.Stun(1)
|
||||
@@ -100,7 +101,7 @@
|
||||
user << "<span class='warning'>You fail to blind [M] with the flash!</span>"
|
||||
M << "<span class='danger'>[user] fails to blind you with the flash!</span>"
|
||||
else
|
||||
if(M.flash_eyes())
|
||||
if(M.flash_act())
|
||||
M.confused += power
|
||||
|
||||
/obj/item/device/assembly/flash/attack(mob/living/M, mob/user)
|
||||
@@ -115,9 +116,9 @@
|
||||
var/mob/living/silicon/robot/R = M
|
||||
add_logs(user, R, "flashed", src)
|
||||
update_icon(1)
|
||||
M.Weaken(3)
|
||||
M.Weaken(6)
|
||||
R.confused += 5
|
||||
R.flash_eyes(affect_silicon = 1)
|
||||
R.flash_act(affect_silicon = 1)
|
||||
user.visible_message("<span class='disarm'>[user] overloads [R]'s sensors with the flash!</span>", "<span class='danger'>You overload [R]'s sensors with the flash!</span>")
|
||||
return 1
|
||||
|
||||
@@ -135,10 +136,10 @@
|
||||
|
||||
|
||||
/obj/item/device/assembly/flash/emp_act(severity)
|
||||
if(!try_use_flash() || !loc)
|
||||
if(!try_use_flash())
|
||||
return 0
|
||||
for(var/mob/living/carbon/M in viewers(3, loc))
|
||||
flash_carbon(M, null, 10, 0)
|
||||
if(iscarbon(loc))
|
||||
flash_carbon(loc, null, 10, 0)
|
||||
burn_out()
|
||||
..()
|
||||
|
||||
@@ -150,7 +151,7 @@
|
||||
if(M.stat == CONSCIOUS)
|
||||
M.mind_initialize() //give them a mind datum if they don't have one.
|
||||
var/resisted
|
||||
if(!isloyal(M))
|
||||
if(!M.isloyal())
|
||||
if(user.mind in ticker.mode.head_revolutionaries)
|
||||
if(ticker.mode.add_revolutionary(M.mind))
|
||||
M.Stun(3)
|
||||
@@ -173,26 +174,15 @@
|
||||
|
||||
/obj/item/device/assembly/flash/cyborg/attack(mob/living/M, mob/user)
|
||||
..()
|
||||
cyborg_flash_animation(user)
|
||||
PoolOrNew(/obj/effect/overlay/temp/borgflash, get_turf(src))
|
||||
|
||||
/obj/item/device/assembly/flash/cyborg/attack_self(mob/user)
|
||||
..()
|
||||
cyborg_flash_animation(user)
|
||||
PoolOrNew(/obj/effect/overlay/temp/borgflash, get_turf(src))
|
||||
|
||||
/obj/item/device/assembly/flash/cyborg/attackby(obj/item/weapon/W, mob/user, params)
|
||||
return
|
||||
|
||||
/obj/item/device/assembly/flash/cyborg/proc/cyborg_flash_animation(mob/living/user)
|
||||
var/atom/movable/overlay/animation = new(user.loc)
|
||||
animation.layer = user.layer + 1
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = user
|
||||
flick("blspell", animation)
|
||||
sleep(5)
|
||||
qdel(animation)
|
||||
|
||||
|
||||
/obj/item/device/assembly/flash/memorizer
|
||||
name = "memorizer"
|
||||
desc = "If you see this, you're not likely to remember it any time soon."
|
||||
@@ -201,3 +191,91 @@
|
||||
item_state = "nullrod"
|
||||
|
||||
/obj/item/device/assembly/flash/handheld //this is now the regular pocket flashes
|
||||
|
||||
/obj/item/device/assembly/flash/armimplant
|
||||
name = "photon projector"
|
||||
desc = "A high-powered photon projector implant normally used for lighting purposes, but also doubles as a flashbulb weapon. Self-repair protocals fix the flashbulb if it ever burns out."
|
||||
var/flashcd = 20
|
||||
var/overheat = 0
|
||||
var/obj/item/organ/cyberimp/arm/flash/I = null
|
||||
|
||||
/obj/item/device/assembly/flash/armimplant/burn_out()
|
||||
if(I && I.owner)
|
||||
I.owner << "<span class='warning'>Your photon projector implant overheats and deactivates!</span>"
|
||||
I.Retract()
|
||||
overheat = FALSE
|
||||
addtimer(src, "cooldown", flashcd * 2)
|
||||
|
||||
/obj/item/device/assembly/flash/armimplant/try_use_flash(mob/user = null)
|
||||
if(overheat)
|
||||
if(I && I.owner)
|
||||
I.owner << "<span class='warning'>Your photon projector is running too hot to be used again so quickly!</span>"
|
||||
return FALSE
|
||||
overheat = TRUE
|
||||
addtimer(src, "cooldown", flashcd)
|
||||
playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
|
||||
update_icon(1)
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/device/assembly/flash/armimplant/proc/cooldown()
|
||||
overheat = FALSE
|
||||
|
||||
/obj/item/device/assembly/flash/shield
|
||||
name = "strobe shield"
|
||||
desc = "A shield with a built in, high intensity light capable of blinding and disorienting suspects. Takes regular handheld flashes as bulbs."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "flashshield"
|
||||
item_state = "flashshield"
|
||||
slot_flags = SLOT_BACK
|
||||
force = 10
|
||||
throwforce = 5
|
||||
throw_speed = 2
|
||||
throw_range = 3
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
materials = list(MAT_GLASS=7500, MAT_METAL=1000)
|
||||
origin_tech = "materials=3;combat=4"
|
||||
attack_verb = list("shoved", "bashed")
|
||||
block_chance = 50
|
||||
armor = list(melee = 50, bullet = 50, laser = 50, energy = 0, bomb = 30, bio = 0, rad = 0, fire = 80, acid = 70)
|
||||
|
||||
/obj/item/device/assembly/flash/shield/flash_recharge(interval=10)
|
||||
if(times_used >= 4)
|
||||
burn_out()
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/device/assembly/flash/shield/attackby(obj/item/weapon/W, mob/user)
|
||||
if(istype(W, /obj/item/device/assembly/flash/handheld))
|
||||
var/obj/item/device/assembly/flash/handheld/flash = W
|
||||
if(flash.crit_fail)
|
||||
user << "No sense replacing it with a broken bulb."
|
||||
return
|
||||
else
|
||||
user << "You begin to replace the bulb."
|
||||
if(do_after(user, 20, target = src))
|
||||
if(flash.crit_fail || !flash || qdeleted(flash))
|
||||
return
|
||||
crit_fail = FALSE
|
||||
times_used = 0
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
update_icon()
|
||||
flash.crit_fail = TRUE
|
||||
flash.update_icon()
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/device/assembly/flash/shield/update_icon(flash = 0)
|
||||
item_state = "flashshield"
|
||||
item_state = "flashshield"
|
||||
|
||||
if(crit_fail)
|
||||
icon_state = "riot"
|
||||
item_state = "riot"
|
||||
else if(flash)
|
||||
item_state = "flashshield_flash"
|
||||
item_state = "flashshield_flash"
|
||||
addtimer(src, "update_icon", 5)
|
||||
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
@@ -5,7 +5,7 @@
|
||||
item_state = "assembly"
|
||||
flags = CONDUCT
|
||||
throwforce = 5
|
||||
w_class = 2
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throw_speed = 2
|
||||
throw_range = 7
|
||||
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
/obj/item/device/assembly/igniter/Destroy()
|
||||
qdel(sparks)
|
||||
sparks = null
|
||||
return ..()
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/assembly/igniter/activate()
|
||||
if(!..())
|
||||
@@ -27,8 +26,12 @@
|
||||
sparks.start()
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/device/assembly/igniter/attack_self(mob/user)
|
||||
activate()
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/device/assembly/igniter/ignition_effect(atom/A, mob/user)
|
||||
. = "<span class='notice'>[user] fiddles with [src], and manages to \
|
||||
light [A].</span>"
|
||||
activate()
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -92,17 +92,15 @@
|
||||
/obj/item/device/assembly/infra/holder_movement()
|
||||
if(!holder)
|
||||
return 0
|
||||
// setDir(holder.dir)
|
||||
qdel(first)
|
||||
return 1
|
||||
|
||||
/obj/item/device/assembly/infra/proc/trigger_beam()
|
||||
if((!secured)||(!on)||(cooldown > 0))
|
||||
return 0
|
||||
if(!secured || !on || next_activate > world.time)
|
||||
return FALSE
|
||||
pulse(0)
|
||||
audible_message("\icon[src] *beep* *beep*", null, 3)
|
||||
cooldown = 2
|
||||
addtimer(src, "process_cooldown", 10)
|
||||
next_activate = world.time + 30
|
||||
|
||||
/obj/item/device/assembly/infra/interact(mob/user)//TODO: change this this to the wire control panel
|
||||
if(is_secured(user))
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
var/obj/item/bodypart/affecting = null
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(PIERCEIMMUNE in H.dna.species.specflags)
|
||||
if(PIERCEIMMUNE in H.dna.species.species_traits)
|
||||
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
|
||||
armed = 0
|
||||
update_icon()
|
||||
@@ -59,9 +59,8 @@
|
||||
affecting = H.get_bodypart(type)
|
||||
H.Stun(3)
|
||||
if(affecting)
|
||||
if(affecting.take_damage(1, 0))
|
||||
H.update_damage_overlays(0)
|
||||
H.updatehealth()
|
||||
if(affecting.receive_damage(1, 0))
|
||||
H.update_damage_overlays()
|
||||
else if(ismouse(target))
|
||||
var/mob/living/simple_animal/mouse/M = target
|
||||
visible_message("<span class='boldannounce'>SPLAT!</span>")
|
||||
@@ -78,7 +77,7 @@
|
||||
else
|
||||
if(((user.getBrainLoss() >= 60) || user.disabilities & CLUMSY) && prob(50))
|
||||
var/which_hand = "l_hand"
|
||||
if(!user.hand)
|
||||
if(!(user.active_hand_index % 2))
|
||||
which_hand = "r_hand"
|
||||
triggered(user, which_hand)
|
||||
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
|
||||
@@ -94,7 +93,7 @@
|
||||
if(armed)
|
||||
if(((user.getBrainLoss() >= 60) || user.disabilities & CLUMSY) && prob(50))
|
||||
var/which_hand = "l_hand"
|
||||
if(!user.hand)
|
||||
if(!(user.active_hand_index % 2))
|
||||
which_hand = "r_hand"
|
||||
triggered(user, which_hand)
|
||||
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
|
||||
@@ -105,16 +104,15 @@
|
||||
|
||||
/obj/item/device/assembly/mousetrap/Crossed(atom/movable/AM as mob|obj)
|
||||
if(armed)
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/H = AM
|
||||
if(H.m_intent == "run")
|
||||
triggered(H)
|
||||
H.visible_message("<span class='warning'>[H] accidentally steps on [src].</span>", \
|
||||
"<span class='warning'>You accidentally step on [src]</span>")
|
||||
else if(isanimal(AM))
|
||||
var/mob/living/simple_animal/SA = AM
|
||||
if(!SA.flying)
|
||||
triggered(AM)
|
||||
if(ismob(AM))
|
||||
var/mob/MM = AM
|
||||
if(!(MM.movement_type & FLYING))
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/H = AM
|
||||
if(H.m_intent == MOVE_INTENT_RUN)
|
||||
triggered(H)
|
||||
H.visible_message("<span class='warning'>[H] accidentally steps on [src].</span>", \
|
||||
"<span class='warning'>You accidentally step on [src]</span>")
|
||||
else if(AM.density) // For mousetrap grenades, set off by anything heavy
|
||||
triggered(AM)
|
||||
..()
|
||||
@@ -124,7 +122,7 @@
|
||||
if(armed)
|
||||
finder.visible_message("<span class='warning'>[finder] accidentally sets off [src], breaking their fingers.</span>", \
|
||||
"<span class='warning'>You accidentally trigger [src]!</span>")
|
||||
triggered(finder, finder.hand ? "l_hand" : "r_hand")
|
||||
triggered(finder, (finder.active_hand_index % 2 == 0) ? "r_hand" : "l_hand")
|
||||
return 1 //end the search!
|
||||
return 0
|
||||
|
||||
|
||||
@@ -59,12 +59,11 @@
|
||||
|
||||
|
||||
/obj/item/device/assembly/prox_sensor/sense()
|
||||
if((!secured)||(cooldown > 0))
|
||||
if(!secured || next_activate > world.time)
|
||||
return 0
|
||||
pulse(0)
|
||||
audible_message("\icon[src] *beep* *beep*", null, 3)
|
||||
cooldown = 2
|
||||
addtimer(src, "process_cooldown", 10)
|
||||
next_activate = world.time + 30
|
||||
|
||||
|
||||
/obj/item/device/assembly/prox_sensor/process()
|
||||
@@ -81,6 +80,9 @@
|
||||
if(scanning)
|
||||
addtimer(src, "sense", 0)
|
||||
|
||||
/obj/item/device/assembly/prox_sensor/Destroy()
|
||||
remove_from_proximity_list(src, sensitivity)
|
||||
..()
|
||||
|
||||
/obj/item/device/assembly/prox_sensor/toggle_scan(scan)
|
||||
if(!secured)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon_state = "shock_kit"
|
||||
var/obj/item/clothing/head/helmet/part1 = null
|
||||
var/obj/item/device/electropack/part2 = null
|
||||
w_class = 5
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
flags = CONDUCT
|
||||
|
||||
/obj/item/assembly/shock_kit/Destroy()
|
||||
|
||||
@@ -25,14 +25,10 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/device/assembly/signaler/activate()
|
||||
if(cooldown > 0)
|
||||
return 0
|
||||
cooldown = 2
|
||||
spawn(10)
|
||||
process_cooldown()
|
||||
|
||||
if(!..())//cooldown processing
|
||||
return FALSE
|
||||
signal()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/device/assembly/signaler/update_icon()
|
||||
if(holder)
|
||||
@@ -188,4 +184,4 @@ Code:
|
||||
A.anomalyNeutralize()
|
||||
|
||||
/obj/item/device/assembly/signaler/anomaly/attack_self()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -42,15 +42,12 @@
|
||||
|
||||
|
||||
/obj/item/device/assembly/timer/proc/timer_end()
|
||||
if((!secured)||(cooldown > 0))
|
||||
return 0
|
||||
if(!secured || next_activate > world.time)
|
||||
return FALSE
|
||||
pulse(0)
|
||||
audible_message("\icon[src] *beep* *beep*", null, 3)
|
||||
cooldown = 2
|
||||
spawn(10)
|
||||
process_cooldown()
|
||||
if(loop)
|
||||
timing = 1
|
||||
if(loop)
|
||||
timing = 1
|
||||
update_icon()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user